diff options
author | Chris Lattner <sabre@nondot.org> | 2010-07-12 00:47:34 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-07-12 00:47:34 +0000 |
commit | 0a96144aac449114330a5264b649eb449dc19a37 (patch) | |
tree | e98a448764dc0607ad6b92d062bfec1f344029fd /test/Transforms/JumpThreading/crash.ll | |
parent | eae2895120500d06bf6de9725efeeff498f60385 (diff) | |
download | external_llvm-0a96144aac449114330a5264b649eb449dc19a37.zip external_llvm-0a96144aac449114330a5264b649eb449dc19a37.tar.gz external_llvm-0a96144aac449114330a5264b649eb449dc19a37.tar.bz2 |
if jump threading is able to infer interesting values on both
the LHS and RHS of an and/or instruction, don't multiply add
known predecessor values. This fixes the crash on testcase
from PR7498
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108114 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/JumpThreading/crash.ll')
-rw-r--r-- | test/Transforms/JumpThreading/crash.ll | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/Transforms/JumpThreading/crash.ll b/test/Transforms/JumpThreading/crash.ll index 378c51a..480b4a0 100644 --- a/test/Transforms/JumpThreading/crash.ll +++ b/test/Transforms/JumpThreading/crash.ll @@ -363,3 +363,27 @@ F: ret i32 1422 } + +; PR7498 +define void @test14() nounwind { +entry: + %cmp33 = icmp slt i8 undef, 0 ; <i1> [#uses=1] + %tobool = icmp eq i8 undef, 0 ; <i1> [#uses=1] + br i1 %tobool, label %land.end69, label %land.rhs + +land.rhs: ; preds = %entry + br label %land.end69 + +land.end69: ; preds = %land.rhs, %entry + %0 = phi i1 [ undef, %land.rhs ], [ true, %entry ] ; <i1> [#uses=1] + %cmp71 = or i1 true, %0 ; <i1> [#uses=1] + %cmp73 = xor i1 %cmp33, %cmp71 ; <i1> [#uses=1] + br i1 %cmp73, label %if.then, label %if.end + +if.then: ; preds = %land.end69 + ret void + +if.end: ; preds = %land.end69 + ret void +} + |