@@ -1176,9 +1176,7 @@ define i8 @not_ashr_wrong_const(i8 %x) {
1176
1176
1177
1177
define <2 x i32 > @xor_andn_commute1 (<2 x i32 > %a , <2 x i32 > %b ) {
1178
1178
; CHECK-LABEL: @xor_andn_commute1(
1179
- ; CHECK-NEXT: [[NOTA:%.*]] = xor <2 x i32> [[A:%.*]], <i32 -1, i32 -1>
1180
- ; CHECK-NEXT: [[R:%.*]] = and <2 x i32> [[NOTA]], [[B:%.*]]
1181
- ; CHECK-NEXT: [[Z:%.*]] = xor <2 x i32> [[R]], [[A]]
1179
+ ; CHECK-NEXT: [[Z:%.*]] = or <2 x i32> [[A:%.*]], [[B:%.*]]
1182
1180
; CHECK-NEXT: ret <2 x i32> [[Z]]
1183
1181
;
1184
1182
%nota = xor <2 x i32 > %a , <i32 -1 , i32 -1 >
@@ -1192,9 +1190,7 @@ define <2 x i32> @xor_andn_commute1(<2 x i32> %a, <2 x i32> %b) {
1192
1190
define i33 @xor_andn_commute2 (i33 %a , i33 %pb ) {
1193
1191
; CHECK-LABEL: @xor_andn_commute2(
1194
1192
; CHECK-NEXT: [[B:%.*]] = udiv i33 42, [[PB:%.*]]
1195
- ; CHECK-NEXT: [[NOTA:%.*]] = xor i33 [[A:%.*]], -1
1196
- ; CHECK-NEXT: [[R:%.*]] = and i33 [[B]], [[NOTA]]
1197
- ; CHECK-NEXT: [[Z:%.*]] = xor i33 [[R]], [[A]]
1193
+ ; CHECK-NEXT: [[Z:%.*]] = or i33 [[B]], [[A:%.*]]
1198
1194
; CHECK-NEXT: ret i33 [[Z]]
1199
1195
;
1200
1196
%b = udiv i33 42 , %pb ; thwart complexity-based canonicalization
@@ -1209,9 +1205,7 @@ define i33 @xor_andn_commute2(i33 %a, i33 %pb) {
1209
1205
define i32 @xor_andn_commute3 (i32 %pa , i32 %b ) {
1210
1206
; CHECK-LABEL: @xor_andn_commute3(
1211
1207
; CHECK-NEXT: [[A:%.*]] = udiv i32 42, [[PA:%.*]]
1212
- ; CHECK-NEXT: [[NOTA:%.*]] = xor i32 [[A]], -1
1213
- ; CHECK-NEXT: [[R:%.*]] = and i32 [[NOTA]], [[B:%.*]]
1214
- ; CHECK-NEXT: [[Z:%.*]] = xor i32 [[A]], [[R]]
1208
+ ; CHECK-NEXT: [[Z:%.*]] = or i32 [[A]], [[B:%.*]]
1215
1209
; CHECK-NEXT: ret i32 [[Z]]
1216
1210
;
1217
1211
%a = udiv i32 42 , %pa ; thwart complexity-based canonicalization
@@ -1227,9 +1221,7 @@ define i32 @xor_andn_commute4(i32 %pa, i32 %pb) {
1227
1221
; CHECK-LABEL: @xor_andn_commute4(
1228
1222
; CHECK-NEXT: [[A:%.*]] = udiv i32 42, [[PA:%.*]]
1229
1223
; CHECK-NEXT: [[B:%.*]] = udiv i32 42, [[PB:%.*]]
1230
- ; CHECK-NEXT: [[NOTA:%.*]] = xor i32 [[A]], -1
1231
- ; CHECK-NEXT: [[R:%.*]] = and i32 [[B]], [[NOTA]]
1232
- ; CHECK-NEXT: [[Z:%.*]] = xor i32 [[A]], [[R]]
1224
+ ; CHECK-NEXT: [[Z:%.*]] = or i32 [[A]], [[B]]
1233
1225
; CHECK-NEXT: ret i32 [[Z]]
1234
1226
;
1235
1227
%a = udiv i32 42 , %pa ; thwart complexity-based canonicalization
0 commit comments