1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -passes=loop-unroll -S | FileCheck %s
4 define i64 @hoge(i1 %c) {
7 ; CHECK-NEXT: br label [[BB1_PEEL_BEGIN:%.*]]
8 ; CHECK: bb1.peel.begin:
9 ; CHECK-NEXT: br label [[BB1_PEEL:%.*]]
11 ; CHECK-NEXT: br i1 [[C:%.*]], label [[BB2_PEEL:%.*]], label [[BB4:%.*]]
13 ; CHECK-NEXT: [[TMP3_PEEL:%.*]] = icmp slt i32 0, 9
14 ; CHECK-NEXT: br i1 [[TMP3_PEEL]], label [[BB1_PEEL_NEXT:%.*]], label [[BB4]]
15 ; CHECK: bb1.peel.next:
16 ; CHECK-NEXT: br label [[BB1_PEEL_NEXT1:%.*]]
17 ; CHECK: bb1.peel.next1:
18 ; CHECK-NEXT: br label [[BB_PEEL_NEWPH:%.*]]
19 ; CHECK: bb.peel.newph:
20 ; CHECK-NEXT: br label [[BB1:%.*]]
22 ; CHECK-NEXT: br i1 [[C]], label [[BB1]], label [[BB4_LOOPEXIT:%.*]], [[LOOP0:!llvm.loop !.*]]
23 ; CHECK: bb4.loopexit:
24 ; CHECK-NEXT: [[TMP5_PH:%.*]] = phi i32 [ 8, [[BB1]] ]
25 ; CHECK-NEXT: br label [[BB4]]
27 ; CHECK-NEXT: [[TMP5:%.*]] = phi i32 [ 0, [[BB1_PEEL]] ], [ 8, [[BB2_PEEL]] ], [ [[TMP5_PH]], [[BB4_LOOPEXIT]] ]
28 ; CHECK-NEXT: [[TMP6:%.*]] = call i64 (...) @llvm.experimental.deoptimize.i64(i32 10) [ "deopt"() ]
29 ; CHECK-NEXT: ret i64 [[TMP6]]
34 bb1: ; preds = %bb2, %bb
35 %tmp = phi i32 [ 8, %bb2 ], [ 0, %bb ]
36 br i1 %c, label %bb2, label %bb4
39 %tmp3 = icmp slt i32 %tmp, 9
40 br i1 %tmp3, label %bb1, label %bb4
42 bb4: ; preds = %bb2, %bb1
43 %tmp5 = phi i32 [ 8, %bb2 ], [ %tmp, %bb1 ]
44 %tmp6 = call i64 (...) @llvm.experimental.deoptimize.i64(i32 10) [ "deopt"() ]
48 declare i64 @llvm.experimental.deoptimize.i64(...)