1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -passes=simplifycfg -S | FileCheck %s
4 ; ModuleID = 'test/Transforms/SimplifyCFG/pr-new.ll'
5 source_filename = "test/Transforms/SimplifyCFG/pr-new.ll"
7 define i32 @test(float %arg, i1 %c) gc "statepoint-example" personality ptr @blam {
10 ; CHECK-NEXT: [[TMP:%.*]] = call i1 @llvm.experimental.widenable.condition()
11 ; CHECK-NEXT: br i1 [[TMP]], label [[BB2:%.*]], label [[BB1:%.*]]
13 ; CHECK-NEXT: br i1 [[C:%.*]], label [[BB7:%.*]], label [[BB5:%.*]]
15 ; CHECK-NEXT: [[TMP3:%.*]] = getelementptr inbounds i8, ptr addrspace(1) undef, i64 16
16 ; CHECK-NEXT: br i1 [[C]], label [[BB7]], label [[BB4:%.*]]
18 ; CHECK-NEXT: call void @snork() [ "deopt"() ]
19 ; CHECK-NEXT: unreachable
21 ; CHECK-NEXT: ret i32 0
23 ; CHECK-NEXT: [[TMP8:%.*]] = call i32 (...) @llvm.experimental.deoptimize.i32(i32 10) [ "deopt"() ]
24 ; CHECK-NEXT: ret i32 [[TMP8]]
27 %tmp = call i1 @llvm.experimental.widenable.condition()
28 br i1 %tmp, label %bb2, label %bb1
31 br i1 %c, label %bb7, label %bb5
34 %tmp3 = getelementptr inbounds i8, ptr addrspace(1) undef, i64 16
35 br i1 %c, label %bb6, label %bb4
38 call void @snork() [ "deopt"() ]
47 bb7: ; preds = %bb6, %bb1
48 %tmp8 = call i32 (...) @llvm.experimental.deoptimize.i32(i32 10) [ "deopt"() ]
56 declare i32 @llvm.experimental.deoptimize.i32(...)
58 ; Function Attrs: inaccessiblememonly nofree nosync nounwind speculatable willreturn
59 declare i1 @llvm.experimental.widenable.condition() #0
61 attributes #0 = { inaccessiblememonly nofree nosync nounwind speculatable willreturn }