blob: b79c6a6913753be323987377194acc05230df826 [file] [log] [blame]
Eric Christophercee313d2019-04-17 04:52:47 +00001; RUN: opt -passes="function(slp-vectorizer),module(hotcoldsplit),function(slp-vectorizer,print<assumptions>)" -disable-output %s 2>&1 | FileCheck %s
2;
3; Make sure this compiles. Check that function assumption cache is refreshed
4; after extracting blocks with assume calls from the function.
5
6; CHECK: Cached assumptions for function: fun
7; CHECK-NEXT: Cached assumptions for function: fun.cold
8; CHECK-NEXT: %cmp = icmp uge i32 %x, 64
9
10declare void @fun2(i32) #0
11
12define void @fun(i32 %x) {
13entry:
14 br i1 undef, label %if.then, label %if.else
15
16if.then:
17 ret void
18
19if.else:
20 %cmp = icmp uge i32 %x, 64
21 call void @llvm.assume(i1 %cmp)
22 call void @fun2(i32 %x)
23 unreachable
24}
25
26declare void @llvm.assume(i1) #1
27
28attributes #0 = { alwaysinline }
29attributes #1 = { nounwind }