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 | de5ab4860fcc53d91b3d8663c1c080d9031e291c (patch) | |
tree | a7a66fb1d47a397bb56e0c62a25945a524588970 /llvm/test/Transforms/JumpThreading/crash.ll | |
parent | 249da5cb73cb9e55d2edfe831fc2cf33402b76d7 (diff) | |
download | bcm5719-llvm-de5ab4860fcc53d91b3d8663c1c080d9031e291c.tar.gz bcm5719-llvm-de5ab4860fcc53d91b3d8663c1c080d9031e291c.zip |
fix a crash in jump threading, PR6119
llvm-svn: 94319
Diffstat (limited to 'llvm/test/Transforms/JumpThreading/crash.ll')
-rw-r--r-- | llvm/test/Transforms/JumpThreading/crash.ll | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/llvm/test/Transforms/JumpThreading/crash.ll b/llvm/test/Transforms/JumpThreading/crash.ll index 361ec6cfb5a..c0ef078ed20 100644 --- a/llvm/test/Transforms/JumpThreading/crash.ll +++ b/llvm/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 +} |