2009-09-12 02:01:28 +08:00
|
|
|
; RUN: opt < %s -instcombine -S | not grep {a.off}
|
2008-02-04 00:35:19 +08:00
|
|
|
; PR1949
|
2008-02-04 00:33:09 +08:00
|
|
|
|
|
|
|
define i1 @test1(i32 %a) {
|
|
|
|
%a.off = add i32 %a, 4 ; <i32> [#uses=1]
|
|
|
|
%C = icmp ult i32 %a.off, 4 ; <i1> [#uses=1]
|
|
|
|
ret i1 %C
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @test2(i32 %a) {
|
|
|
|
%a.off = sub i32 %a, 4 ; <i32> [#uses=1]
|
|
|
|
%C = icmp ugt i32 %a.off, -5 ; <i1> [#uses=1]
|
|
|
|
ret i1 %C
|
|
|
|
}
|
|
|
|
|
|
|
|
define i1 @test3(i32 %a) {
|
|
|
|
%a.off = add i32 %a, 4 ; <i32> [#uses=1]
|
|
|
|
%C = icmp slt i32 %a.off, 2147483652 ; <i1> [#uses=1]
|
|
|
|
ret i1 %C
|
|
|
|
}
|