diff options
author | Chris Lattner <sabre@nondot.org> | 2011-01-08 08:24:46 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-01-08 08:24:46 +0000 |
commit | d9ec3572f3d0997348361334446f942194522127 (patch) | |
tree | 485ac863b85c5c16384201857fe935ed24d10cf4 /test/Transforms/LoopRotate | |
parent | c3942eb95d10fac62c6b5227f344bcda3f578077 (diff) | |
download | external_llvm-d9ec3572f3d0997348361334446f942194522127.zip external_llvm-d9ec3572f3d0997348361334446f942194522127.tar.gz external_llvm-d9ec3572f3d0997348361334446f942194522127.tar.bz2 |
Have loop-rotate simplify instructions (yay instsimplify!) as it clones
them into the loop preheader, eliminating silly instructions like
"icmp i32 0, 100" in fixed tripcount loops. This also better exposes the
bigger problem with loop rotate that I'd like to fix: once this has been
folded, the duplicated conditional branch *often* turns into an uncond branch.
Not aggressively handling this is pessimizing later loop optimizations
somethin' fierce by making "dominates all exit blocks" checks fail.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123060 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/LoopRotate')
-rw-r--r-- | test/Transforms/LoopRotate/phi-duplicate.ll | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/test/Transforms/LoopRotate/phi-duplicate.ll b/test/Transforms/LoopRotate/phi-duplicate.ll index 5403e72..c252a32 100644 --- a/test/Transforms/LoopRotate/phi-duplicate.ll +++ b/test/Transforms/LoopRotate/phi-duplicate.ll @@ -34,14 +34,13 @@ for.end: ; preds = %for.cond ; CHECK: define void @test ; CHECK-NEXT: entry: -; CHECK-NEXT: icmp slt i64 -; CHECK-NEXT: br i1 +; CHECK-NEXT: br i1 true, label %bb.nph, label %for.end ; CHECK-NOT: : ; CHECK: bb.nph: ; CHECK-NEXT: br label %for.body ; CHECK-NOT: : ; CHECK: for.body: -; CHECK-NEXT: %j.02 = phi i64 +; CHECK-NEXT: %j.01 = phi i64 ; CHECK-NOT: phi ; CHECK: ret void ; CHECK-NEXT: } |