diff options
author | Chris Lattner <sabre@nondot.org> | 2011-02-18 05:05:01 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-02-18 05:05:01 +0000 |
commit | 6b88c76f13855fe07eacb8c671e1f37e35a0670c (patch) | |
tree | de10d3ff8e270ee0095691ce316818249fd31712 /llvm/test/Transforms/LoopUnroll | |
parent | 0a1a36dc46e85f83cf778c9fd695ff9286f070c1 (diff) | |
download | bcm5719-llvm-6b88c76f13855fe07eacb8c671e1f37e35a0670c.tar.gz bcm5719-llvm-6b88c76f13855fe07eacb8c671e1f37e35a0670c.zip |
add a testcase for r125827
llvm-svn: 125831
Diffstat (limited to 'llvm/test/Transforms/LoopUnroll')
-rw-r--r-- | llvm/test/Transforms/LoopUnroll/basic.ll | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/llvm/test/Transforms/LoopUnroll/basic.ll b/llvm/test/Transforms/LoopUnroll/basic.ll new file mode 100644 index 00000000000..eeb3e9a57b0 --- /dev/null +++ b/llvm/test/Transforms/LoopUnroll/basic.ll @@ -0,0 +1,24 @@ +; RUN: opt < %s -loop-unroll -S | FileCheck %s + + +; This should not unroll since the address of the loop header is taken. + +; CHECK: @test1 +; CHECK: store i8* blockaddress(@test1, %l1), i8** %P +; CHECK: l1: +; CHECK-NEXT: phi i32 +; rdar://8287027 +define i32 @test1(i8** %P) nounwind ssp { +entry: + store i8* blockaddress(@test1, %l1), i8** %P + br label %l1 + +l1: ; preds = %l1, %entry + %x.0 = phi i32 [ 0, %entry ], [ %inc, %l1 ] + %inc = add nsw i32 %x.0, 1 + %exitcond = icmp eq i32 %inc, 3 + br i1 %exitcond, label %l2, label %l1 + +l2: ; preds = %l1 + ret i32 0 +} |