diff options
Diffstat (limited to 'test/Transforms/InstCombine/2007-11-22-IcmpCrash.ll')
-rw-r--r-- | test/Transforms/InstCombine/2007-11-22-IcmpCrash.ll | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/2007-11-22-IcmpCrash.ll b/test/Transforms/InstCombine/2007-11-22-IcmpCrash.ll new file mode 100644 index 0000000..f71b99c --- /dev/null +++ b/test/Transforms/InstCombine/2007-11-22-IcmpCrash.ll @@ -0,0 +1,16 @@ +; RUN: opt < %s -instcombine -disable-output +; PR1817 + +define i1 @test1(i32 %X) { + %A = icmp slt i32 %X, 10 + %B = icmp ult i32 %X, 10 + %C = and i1 %A, %B + ret i1 %C +} + +define i1 @test2(i32 %X) { + %A = icmp slt i32 %X, 10 + %B = icmp ult i32 %X, 10 + %C = or i1 %A, %B + ret i1 %C +} |