@@ -83,7 +83,7 @@ define i1 @test_ne_cp2(i8 %x, i8 %yy) {
83
83
; CHECK-NEXT: [[AND_X_Y:%.*]] = and i8 [[X]], 16
84
84
; CHECK-NEXT: call void @use.i8(i8 [[AND_X_NEG_Y]])
85
85
; CHECK-NEXT: call void @use.i8(i8 [[AND_X_Y]])
86
- ; CHECK-NEXT: [[R:%.*]] = icmp ne i8 [[AND_X_NEG_Y ]], [[AND_X_Y]]
86
+ ; CHECK-NEXT: [[R:%.*]] = icmp ugt i8 [[X ]], 31
87
87
; CHECK-NEXT: ret i1 [[R]]
88
88
;
89
89
%and_x_neg_y = and i8 %x , -16
@@ -100,7 +100,7 @@ define i1 @test_ne_cp2_2(i8 %x, i8 %yy) {
100
100
; CHECK-NEXT: [[AND_X_Y:%.*]] = and i8 [[X]], 4
101
101
; CHECK-NEXT: call void @use.i8(i8 [[AND_X_NEG_Y]])
102
102
; CHECK-NEXT: call void @use.i8(i8 [[AND_X_Y]])
103
- ; CHECK-NEXT: [[R:%.*]] = icmp eq i8 [[AND_X_Y ]], [[AND_X_NEG_Y]]
103
+ ; CHECK-NEXT: [[R:%.*]] = icmp ult i8 [[X ]], 8
104
104
; CHECK-NEXT: ret i1 [[R]]
105
105
;
106
106
%and_x_neg_y = and i8 %x , -4
@@ -117,7 +117,7 @@ define i1 @test_ne_cp2_other_okay_all_ones(i8 %x, i8 %yy) {
117
117
; CHECK-NEXT: [[AND_X_Y:%.*]] = and i8 [[X]], 16
118
118
; CHECK-NEXT: call void @use.i8(i8 [[AND_X_NEG_Y]])
119
119
; CHECK-NEXT: call void @use.i8(i8 [[AND_X_Y]])
120
- ; CHECK-NEXT: [[R:%.*]] = icmp ne i8 [[AND_X_NEG_Y ]], [[AND_X_Y]]
120
+ ; CHECK-NEXT: [[R:%.*]] = icmp ne i8 [[X ]], 0
121
121
; CHECK-NEXT: ret i1 [[R]]
122
122
;
123
123
%and_x_neg_y = and i8 %x , -17
@@ -147,10 +147,9 @@ define i1 @test_ne_cp2_other_fail2(i8 %x, i8 %yy) {
147
147
148
148
define i1 @test_ne_cp2_other_okay (i8 %x , i8 %yy ) {
149
149
; CHECK-LABEL: @test_ne_cp2_other_okay(
150
- ; CHECK-NEXT: [[AND_X_NEG_Y:%.*]] = and i8 [[X:%.*]], -17
151
- ; CHECK-NEXT: [[AND_X_Y:%.*]] = and i8 [[X]], 16
150
+ ; CHECK-NEXT: [[AND_X_Y:%.*]] = and i8 [[X:%.*]], 16
152
151
; CHECK-NEXT: call void @use.i8(i8 [[AND_X_Y]])
153
- ; CHECK-NEXT: [[R:%.*]] = icmp ne i8 [[AND_X_NEG_Y ]], [[AND_X_Y]]
152
+ ; CHECK-NEXT: [[R:%.*]] = icmp ne i8 [[X ]], 0
154
153
; CHECK-NEXT: ret i1 [[R]]
155
154
;
156
155
%and_x_neg_y = and i8 %x , -17
@@ -162,10 +161,9 @@ define i1 @test_ne_cp2_other_okay(i8 %x, i8 %yy) {
162
161
163
162
define i1 @test_ne_cp2_other_okay2 (i8 %x , i8 %yy ) {
164
163
; CHECK-LABEL: @test_ne_cp2_other_okay2(
165
- ; CHECK-NEXT: [[AND_X_NEG_Y:%.*]] = and i8 [[X:%.*]], -17
166
- ; CHECK-NEXT: [[AND_X_Y:%.*]] = and i8 [[X]], 16
164
+ ; CHECK-NEXT: [[AND_X_Y:%.*]] = and i8 [[X:%.*]], 16
167
165
; CHECK-NEXT: call void @use.i8(i8 [[AND_X_Y]])
168
- ; CHECK-NEXT: [[R:%.*]] = icmp ne i8 [[AND_X_Y ]], [[AND_X_NEG_Y]]
166
+ ; CHECK-NEXT: [[R:%.*]] = icmp ne i8 [[X ]], 0
169
167
; CHECK-NEXT: ret i1 [[R]]
170
168
;
171
169
%and_x_neg_y = and i8 %x , -17
0 commit comments