30 lines · plain
1; RUN: opt -passes="function(slp-vectorizer),module(hotcoldsplit),function(slp-vectorizer,print<assumptions>)" -hotcoldsplit-threshold=-1 -disable-output %s 2>&1 | FileCheck %s2;3; Make sure this compiles. Check that function assumption cache is refreshed4; after extracting blocks with assume calls from the function.5 6; CHECK: Cached assumptions for function: fun7; CHECK-NEXT: Cached assumptions for function: fun.cold8; CHECK-NOT: icmp uge9 10declare void @fun2(i32) #011 12define void @fun(i32 %x, i1 %arg) {13entry:14 br i1 %arg, label %if.then, label %if.else15 16if.then:17 ret void18 19if.else:20 %cmp = icmp uge i32 %x, 6421 call void @llvm.assume(i1 %cmp)22 call void @fun2(i32 %x)23 unreachable24}25 26declare void @llvm.assume(i1) #127 28attributes #0 = { alwaysinline }29attributes #1 = { nounwind }30