[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.

llvm-svn: 312015
This commit is contained in:
Davide Italiano 2017-08-29 17:24:09 +00:00
parent 90b17420e8
commit 16a426e9a9
1 changed files with 27 additions and 14 deletions

View File

@ -1,30 +1,43 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt -loop-unroll %s -S | FileCheck %s
; RUN: opt -S -loop-unroll -unroll-peel-count=1 < %s | FileCheck %s
declare zeroext i8 @patatino()
define fastcc void @tinky() {
; CHECK-LABEL: @tinky(
; CHECK-NEXT: entry:
; CHECK-NEXT: br label [[FOR_COND93:%.*]]
; CHECK: for.cond93:
; CHECK-NEXT: br label [[FOR_BODY198:%.*]]
; CHECK: for.body198:
; CHECK-NEXT: [[CALL593:%.*]] = tail call zeroext i8 @patatino()
; CHECK-NEXT: br label [[NEXT:%.*]]
; CHECK: loopexit:
; CHECK-NEXT: ret void
; CHECK: next:
; CHECK-NEXT: br label [[LOOP_PEEL_BEGIN:%.*]]
; CHECK: loop.peel.begin:
; CHECK-NEXT: br label [[LOOP_PEEL:%.*]]
; CHECK: loop.peel:
; CHECK-NEXT: [[CALL593_PEEL:%.*]] = tail call zeroext i8 @patatino()
; CHECK-NEXT: br i1 false, label [[LOOP_PEEL_NEXT:%.*]], label [[LOOPEXIT:%.*]]
; CHECK: loop.peel.next:
; CHECK-NEXT: br label [[LOOP_PEEL_NEXT1:%.*]]
; CHECK: loop.peel.next1:
; CHECK-NEXT: br label [[NEXT_PEEL_NEWPH:%.*]]
; CHECK: next.peel.newph:
; CHECK-NEXT: br label [[LOOP:%.*]]
; CHECK: loop:
; CHECK-NEXT: [[CALL593:%.*]] = tail call zeroext i8 @patatino()
; CHECK-NEXT: br label [[LOOPEXIT]]
;
entry:
br label %for.cond93
br label %next
for.cond93.loopexit:
loopexit:
ret void
for.cond93:
br label %for.body198
next:
br label %loop
for.body198:
%l_249.12 = phi i8 [ undef, %for.cond93 ], [ %call593, %for.body198 ]
%l_522.01 = phi i32 [ 0, %for.cond93 ], [ 1, %for.body198 ]
loop:
%a = phi i8 [ undef, %next ], [ %call593, %loop ]
%b = phi i32 [ 0, %next ], [ 1, %loop ]
%call593 = tail call zeroext i8 @patatino()
br i1 false, label %for.body198, label %for.cond93.loopexit
br i1 false, label %loop, label %loopexit
}