aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-10-22 00:17:26 +0000
committerChris Lattner <sabre@nondot.org>2009-10-22 00:17:26 +0000
commit7f23958aa4bebdb81c09ab1dc709c8b88118f8b4 (patch)
tree3f8a669ad3a8158537505c06556fab41bedade21 /test
parentf32df4ce3e576b317230a6dbd5cf543a32653ca0 (diff)
downloadexternal_llvm-7f23958aa4bebdb81c09ab1dc709c8b88118f8b4.zip
external_llvm-7f23958aa4bebdb81c09ab1dc709c8b88118f8b4.tar.gz
external_llvm-7f23958aa4bebdb81c09ab1dc709c8b88118f8b4.tar.bz2
fix PR5262.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84810 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Transforms/InstCombine/crash.ll28
1 files changed, 27 insertions, 1 deletions
diff --git a/test/Transforms/InstCombine/crash.ll b/test/Transforms/InstCombine/crash.ll
index ab61856..fbac472 100644
--- a/test/Transforms/InstCombine/crash.ll
+++ b/test/Transforms/InstCombine/crash.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -instcombine | llvm-dis
+; RUN: opt < %s -instcombine -S
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
target triple = "i386-apple-darwin10.0"
@@ -99,3 +99,29 @@ define void @bar3(i1, i1) nounwind align 2 {
%15 = tail call %t0* @bar2(i64 %14) nounwind ; <%0*> [#uses=0]
ret void
}
+
+
+
+
+; PR5262
+; Make sure the PHI node gets put in a place where all of its operands dominate
+; it.
+define i64 @test4(i1 %c, i64* %P) nounwind align 2 {
+BB0:
+ br i1 %c, label %BB1, label %BB2
+
+BB1:
+ br label %BB2
+
+BB2:
+ %v5_ = phi i1 [ true, %BB0], [false, %BB1]
+ %v6 = load i64* %P
+ br label %l8
+
+l8:
+ br label %l10
+
+l10:
+ %v11 = select i1 %v5_, i64 0, i64 %v6
+ ret i64 %v11
+}