new testcase for PR1253
[oota-llvm.git] / test / Transforms / InstCombine / xor2.ll
1 ; This test makes sure that these instructions are properly eliminated.
2 ;
3
4 ; RUN: llvm-as < %s | opt -instcombine -disable-output &&
5 ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep 'xor '
6
7 ; PR1253
8 define i1 @test0(i32 %A) {
9         %B = xor i32 %A, -2147483648
10         %C = icmp sgt i32 %B, -1
11         ret i1 %C
12 }
13
14 define i1 @test1(i32 %A) {
15         %B = xor i32 %A, 12345
16         %C = icmp slt i32 %B, 0
17         ret i1 %C
18 }
19