summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/JumpThreading/crash.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-08-18 03:14:36 +0000
committerChris Lattner <sabre@nondot.org>2010-08-18 03:14:36 +0000
commit3c603024bbaaeb41c105aa0aa922e5b08208533c (patch)
tree583fa84a8a2ff03de6248d820c26375d0dd0c67f /llvm/test/Transforms/JumpThreading/crash.ll
parentf0b5b67ba5e4ea270f89f7a3a655af18798a7610 (diff)
downloadbcm5719-llvm-3c603024bbaaeb41c105aa0aa922e5b08208533c.tar.gz
bcm5719-llvm-3c603024bbaaeb41c105aa0aa922e5b08208533c.zip
Fix PR7755: knowing something about an inval for a pred
from the LHS should disable reconsidering that pred on the RHS. However, knowing something about the pred on the RHS shouldn't disable subsequent additions on the RHS from happening. llvm-svn: 111349
Diffstat (limited to 'llvm/test/Transforms/JumpThreading/crash.ll')
-rw-r--r--llvm/test/Transforms/JumpThreading/crash.ll24
1 files changed, 24 insertions, 0 deletions
diff --git a/llvm/test/Transforms/JumpThreading/crash.ll b/llvm/test/Transforms/JumpThreading/crash.ll
index 4fe94e5ea0c..cfd90424312 100644
--- a/llvm/test/Transforms/JumpThreading/crash.ll
+++ b/llvm/test/Transforms/JumpThreading/crash.ll
@@ -436,4 +436,28 @@ for.cond1040: ; preds = %for.body1044, %for.
ret void
}
+; PR7755
+define void @test16(i1 %c, i1 %c2, i1 %c3, i1 %c4) nounwind ssp {
+entry:
+ %cmp = icmp sgt i32 undef, 1 ; <i1> [#uses=1]
+ br i1 %c, label %land.end, label %land.rhs
+
+land.rhs: ; preds = %entry
+ br i1 %c2, label %lor.lhs.false.i, label %land.end
+
+lor.lhs.false.i: ; preds = %land.rhs
+ br i1 %c3, label %land.end, label %land.end
+
+land.end:
+ %0 = phi i1 [ true, %entry ], [ false, %land.rhs ], [false, %lor.lhs.false.i], [false, %lor.lhs.false.i] ; <i1> [#uses=1]
+ %cmp12 = and i1 %cmp, %0
+ %xor1 = xor i1 %cmp12, %c4
+ br i1 %xor1, label %if.then, label %if.end
+
+if.then:
+ ret void
+
+if.end:
+ ret void
+}
OpenPOWER on IntegriCloud