aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/JumpThreading/crash.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-01-23 19:16:25 +0000
committerChris Lattner <sabre@nondot.org>2010-01-23 19:16:25 +0000
commit2dd7657a5b063e6f77c34f418b7e23654b6fe4a0 (patch)
tree67f0ddc05fc97745156f5dac4a37e0b8ef0cb670 /test/Transforms/JumpThreading/crash.ll
parent8231fd1e6ca940511843381ea5f0dbfbc740b1e6 (diff)
downloadexternal_llvm-2dd7657a5b063e6f77c34f418b7e23654b6fe4a0.zip
external_llvm-2dd7657a5b063e6f77c34f418b7e23654b6fe4a0.tar.gz
external_llvm-2dd7657a5b063e6f77c34f418b7e23654b6fe4a0.tar.bz2
add an early out to ProcessBranchOnXOR to speed it up,
handle the case when we can infer an input to the xor from all inputs that agree, instead of going into an infinite loop. Another part of PR6199 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94321 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/JumpThreading/crash.ll')
-rw-r--r--test/Transforms/JumpThreading/crash.ll27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/Transforms/JumpThreading/crash.ll b/test/Transforms/JumpThreading/crash.ll
index c0ef078..ff980ff 100644
--- a/test/Transforms/JumpThreading/crash.ll
+++ b/test/Transforms/JumpThreading/crash.ll
@@ -259,3 +259,30 @@ for.cond: ; preds = %for.body, %lor.end
for.body: ; preds = %for.cond
br label %for.cond
}
+
+; PR6119
+define i32 @test9(i32 %action) nounwind {
+entry:
+ switch i32 %action, label %lor.rhs [
+ i32 1, label %if.then
+ i32 0, label %lor.end
+ ]
+
+if.then: ; preds = %for.cond, %lor.end, %entry
+ ret i32 undef
+
+lor.rhs: ; preds = %entry
+ br label %lor.end
+
+lor.end: ; preds = %lor.rhs, %entry
+ %0 = phi i1 [ undef, %lor.rhs ], [ true, %entry ] ; <i1> [#uses=1]
+ %cmp103 = xor i1 undef, %0 ; <i1> [#uses=1]
+ br i1 %cmp103, label %for.cond, label %if.then
+
+for.cond: ; preds = %for.body, %lor.end
+ br i1 undef, label %if.then, label %for.body
+
+for.body: ; preds = %for.cond
+ br label %for.cond
+}
+