Changeset View
Changeset View
Standalone View
Standalone View
test/Transforms/InstSimplify/compare.ll
Show First 20 Lines • Show All 327 Lines • ▼ Show 20 Lines | |||||
define i1 @or(i32 %x) { | define i1 @or(i32 %x) { | ||||
; CHECK-LABEL: @or( | ; CHECK-LABEL: @or( | ||||
%o = or i32 %x, 1 | %o = or i32 %x, 1 | ||||
%c = icmp eq i32 %o, 0 | %c = icmp eq i32 %o, 0 | ||||
ret i1 %c | ret i1 %c | ||||
; CHECK: ret i1 false | ; CHECK: ret i1 false | ||||
} | } | ||||
; Do not expect to simplify if we cannot guarantee that | |||||
mcrosier: Please drop "expect to".
Also, please maximize 80-column. | |||||
; the ConstantExpr is a non-zero constant. | |||||
@GV = common global i32* null | |||||
define i1 @or_constexp(i32 %x) { | |||||
; CHECK-LABEL: @or_constexp( | |||||
entry: | |||||
%0 = and i32 ptrtoint (i32** @GV to i32), 32 | |||||
%o = or i32 %x, %0 | |||||
%c = icmp eq i32 %o, 0 | |||||
ret i1 %c | |||||
; CHECK: or | |||||
; CHECK-NEXT: icmp eq | |||||
; CHECK-NOT: ret i1 false | |||||
} | |||||
define i1 @shl1(i32 %x) { | define i1 @shl1(i32 %x) { | ||||
; CHECK-LABEL: @shl1( | ; CHECK-LABEL: @shl1( | ||||
%s = shl i32 1, %x | %s = shl i32 1, %x | ||||
%c = icmp eq i32 %s, 0 | %c = icmp eq i32 %s, 0 | ||||
ret i1 %c | ret i1 %c | ||||
; CHECK: ret i1 false | ; CHECK: ret i1 false | ||||
} | } | ||||
▲ Show 20 Lines • Show All 847 Lines • Show Last 20 Lines |
Please drop "expect to".
Also, please maximize 80-column.