summaryrefslogtreecommitdiff
path: root/test/Transforms
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms')
-rw-r--r--test/Transforms/LoopRotate/phi-duplicate.ll22
1 files changed, 17 insertions, 5 deletions
diff --git a/test/Transforms/LoopRotate/phi-duplicate.ll b/test/Transforms/LoopRotate/phi-duplicate.ll
index 9a64e2a9a8..5403e723ee 100644
--- a/test/Transforms/LoopRotate/phi-duplicate.ll
+++ b/test/Transforms/LoopRotate/phi-duplicate.ll
@@ -27,9 +27,21 @@ for.body: ; preds = %for.cond
for.end: ; preds = %for.cond
ret void
}
-; Should only end up with one phi.
-; CHECK: for.body:
-; CHECK-NEXT: %j.02 = phi i64
-; CHECK-NOT: phi
-; CHECK: ret void
+; Should only end up with one phi. Also, the original for.cond block should
+; be moved to the end of the loop so that the new loop header pleasantly
+; ends up at the top.
+
+; CHECK: define void @test
+; CHECK-NEXT: entry:
+; CHECK-NEXT: icmp slt i64
+; CHECK-NEXT: br i1
+; CHECK-NOT: :
+; CHECK: bb.nph:
+; CHECK-NEXT: br label %for.body
+; CHECK-NOT: :
+; CHECK: for.body:
+; CHECK-NEXT: %j.02 = phi i64
+; CHECK-NOT: phi
+; CHECK: ret void
+; CHECK-NEXT: }