aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/MachineSink-PHIUse.ll
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2013-04-03 14:07:16 +0000
committerAlexander Kornienko <alexfh@google.com>2013-04-03 14:07:16 +0000
commite133bc868944822bf8961f825d3aa63d6fa48fb7 (patch)
treeebbd4a8040181471467a9737d90d94dc6b58b316 /test/CodeGen/X86/MachineSink-PHIUse.ll
parent647735c781c5b37061ee03d6e9e6c7dda92218e2 (diff)
parent080e3c523e87ec68ca1ea5db4cd49816028dd8bd (diff)
Updating branches/google/stable to r178511stable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/google/stable@178655 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/MachineSink-PHIUse.ll')
-rw-r--r--test/CodeGen/X86/MachineSink-PHIUse.ll40
1 files changed, 40 insertions, 0 deletions
diff --git a/test/CodeGen/X86/MachineSink-PHIUse.ll b/test/CodeGen/X86/MachineSink-PHIUse.ll
new file mode 100644
index 0000000000..1329200c3e
--- /dev/null
+++ b/test/CodeGen/X86/MachineSink-PHIUse.ll
@@ -0,0 +1,40 @@
+; REQUIRES: asserts
+; RUN: llc < %s -mtriple=x86_64-appel-darwin -disable-cgp-branch-opts -stats 2>&1 | grep "machine-sink"
+
+define fastcc void @t() nounwind ssp {
+entry:
+ br i1 undef, label %bb, label %bb4
+
+bb: ; preds = %entry
+ br i1 undef, label %return, label %bb3
+
+bb3: ; preds = %bb
+ unreachable
+
+bb4: ; preds = %entry
+ br i1 undef, label %bb.nph, label %return
+
+bb.nph: ; preds = %bb4
+ br label %bb5
+
+bb5: ; preds = %bb9, %bb.nph
+ %indvar = phi i64 [ 0, %bb.nph ], [ %tmp12, %bb9 ] ; <i64> [#uses=1]
+ %tmp12 = add i64 %indvar, 1 ; <i64> [#uses=2]
+ %tmp13 = trunc i64 %tmp12 to i32 ; <i32> [#uses=0]
+ br i1 undef, label %bb9, label %bb6
+
+bb6: ; preds = %bb5
+ br i1 undef, label %bb9, label %bb7
+
+bb7: ; preds = %bb6
+ br i1 undef, label %bb9, label %bb8
+
+bb8: ; preds = %bb7
+ unreachable
+
+bb9: ; preds = %bb7, %bb6, %bb5
+ br i1 undef, label %bb5, label %return
+
+return: ; preds = %bb9, %bb4, %bb
+ ret void
+}