llvm.org GIT mirror llvm / fac36eb
[LoopUnroll] Make the test for PR33437 actually useful. I forgot to specify -unroll-loop-peel, making this test not really effective. While here, adjust some details (naming and run line). Thanks to Sanjoy and Michael Z. for pointing out in their post-commit reviews. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312015 91177308-0d34-0410-b5e6-96231b3b80d8 Davide Italiano 2 years ago
1 changed file(s) with 27 addition(s) and 14 deletion(s). Raw diff Collapse all Expand all
0 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
1 ; RUN: opt -loop-unroll %s -S | FileCheck %s
1 ; RUN: opt -S -loop-unroll -unroll-peel-count=1 < %s | FileCheck %s
22
33 declare zeroext i8 @patatino()
44
55 define fastcc void @tinky() {
66 ; CHECK-LABEL: @tinky(
77 ; CHECK-NEXT: entry:
8 ; CHECK-NEXT: br label [[FOR_COND93:%.*]]
9 ; CHECK: for.cond93:
10 ; CHECK-NEXT: br label [[FOR_BODY198:%.*]]
11 ; CHECK: for.body198:
8 ; CHECK-NEXT: br label [[NEXT:%.*]]
9 ; CHECK: loopexit:
10 ; CHECK-NEXT: ret void
11 ; CHECK: next:
12 ; CHECK-NEXT: br label [[LOOP_PEEL_BEGIN:%.*]]
13 ; CHECK: loop.peel.begin:
14 ; CHECK-NEXT: br label [[LOOP_PEEL:%.*]]
15 ; CHECK: loop.peel:
16 ; CHECK-NEXT: [[CALL593_PEEL:%.*]] = tail call zeroext i8 @patatino()
17 ; CHECK-NEXT: br i1 false, label [[LOOP_PEEL_NEXT:%.*]], label [[LOOPEXIT:%.*]]
18 ; CHECK: loop.peel.next:
19 ; CHECK-NEXT: br label [[LOOP_PEEL_NEXT1:%.*]]
20 ; CHECK: loop.peel.next1:
21 ; CHECK-NEXT: br label [[NEXT_PEEL_NEWPH:%.*]]
22 ; CHECK: next.peel.newph:
23 ; CHECK-NEXT: br label [[LOOP:%.*]]
24 ; CHECK: loop:
1225 ; CHECK-NEXT: [[CALL593:%.*]] = tail call zeroext i8 @patatino()
13 ; CHECK-NEXT: ret void
26 ; CHECK-NEXT: br label [[LOOPEXIT]]
1427 ;
1528 entry:
16 br label %for.cond93
29 br label %next
1730
18 for.cond93.loopexit:
31 loopexit:
1932 ret void
2033
21 for.cond93:
22 br label %for.body198
34 next:
35 br label %loop
2336
24 for.body198:
25 %l_249.12 = phi i8 [ undef, %for.cond93 ], [ %call593, %for.body198 ]
26 %l_522.01 = phi i32 [ 0, %for.cond93 ], [ 1, %for.body198 ]
37 loop:
38 %a = phi i8 [ undef, %next ], [ %call593, %loop ]
39 %b = phi i32 [ 0, %next ], [ 1, %loop ]
2740 %call593 = tail call zeroext i8 @patatino()
28 br i1 false, label %for.body198, label %for.cond93.loopexit
41 br i1 false, label %loop, label %loopexit
2942 }