diff options
author | Chris Lattner <sabre@nondot.org> | 2010-01-23 18:56:07 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-01-23 18:56:07 +0000 |
commit | 8231fd1e6ca940511843381ea5f0dbfbc740b1e6 (patch) | |
tree | 8a8167a77c8a4ce3a111c6995ec940ecee541381 /test/Transforms/JumpThreading/crash.ll | |
parent | 818ff34bc0841edda10951b7b043076b6e7159ef (diff) | |
download | external_llvm-8231fd1e6ca940511843381ea5f0dbfbc740b1e6.zip external_llvm-8231fd1e6ca940511843381ea5f0dbfbc740b1e6.tar.gz external_llvm-8231fd1e6ca940511843381ea5f0dbfbc740b1e6.tar.bz2 |
fix a crash in jump threading, PR6119
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94319 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/JumpThreading/crash.ll')
-rw-r--r-- | test/Transforms/JumpThreading/crash.ll | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/Transforms/JumpThreading/crash.ll b/test/Transforms/JumpThreading/crash.ll index 361ec6c..c0ef078 100644 --- a/test/Transforms/JumpThreading/crash.ll +++ b/test/Transforms/JumpThreading/crash.ll @@ -234,3 +234,28 @@ bb2: return: ret void } + +; PR6119 +define i32 @test8(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 + %cmp103 = xor i1 undef, undef ; <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 +} |