43604b8b130045b08e2f982b8c3c6ce640d4b005
[oota-llvm.git] / test / Transforms / InstCombine / 2008-01-29-AddICmp.ll
1 ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep {a.off}
2
3 define i1 @test1(i32 %a) {
4   %a.off = add i32 %a, 4          ; <i32> [#uses=1]
5   %C = icmp ult i32 %a.off, 4             ; <i1> [#uses=1]
6   ret i1 %C
7 }
8
9 define i1 @test2(i32 %a) {
10   %a.off = sub i32 %a, 4          ; <i32> [#uses=1]
11   %C = icmp ugt i32 %a.off, -5             ; <i1> [#uses=1]
12   ret i1 %C
13 }
14
15 define i1 @test3(i32 %a) {
16   %a.off = add i32 %a, 4          ; <i32> [#uses=1]
17   %C = icmp slt i32 %a.off, 2147483652             ; <i1> [#uses=1]
18   ret i1 %C
19 }