@@ -311,15 +311,15 @@ define i5 @sdiv_mul_shl_nsw(i5 %x, i5 %y, i5 %z) {
311
311
312
312
; (Y * Z) s/ (X << Z) --> Y s/ (1 << Z)
313
313
314
- define i5 @sdiv_mul_shl_nsw_commute1 (i5 %x , i5 %y , i5 %z ) {
315
- ; CHECK-LABEL: @sdiv_mul_shl_nsw_commute1 (
314
+ define i5 @sdiv_mul_shl_nsw_exact_commute1 (i5 %x , i5 %y , i5 %z ) {
315
+ ; CHECK-LABEL: @sdiv_mul_shl_nsw_exact_commute1 (
316
316
; CHECK-NEXT: [[TMP1:%.*]] = shl nuw i5 1, [[Z:%.*]]
317
317
; CHECK-NEXT: [[D:%.*]] = sdiv i5 [[Y:%.*]], [[TMP1]]
318
318
; CHECK-NEXT: ret i5 [[D]]
319
319
;
320
320
%m1 = mul nsw i5 %y , %x
321
321
%m2 = shl nsw i5 %x , %z
322
- %d = sdiv i5 %m1 , %m2
322
+ %d = sdiv exact i5 %m1 , %m2
323
323
ret i5 %d
324
324
}
325
325
@@ -451,14 +451,14 @@ define i5 @udiv_mul_shl_nuw(i5 %x, i5 %y, i5 %z) {
451
451
452
452
; (Y * X) u/ (X << Z) --> Y u>> Z
453
453
454
- define i5 @udiv_mul_shl_nuw_commute1 (i5 %x , i5 %y , i5 %z ) {
455
- ; CHECK-LABEL: @udiv_mul_shl_nuw_commute1 (
454
+ define i5 @udiv_mul_shl_nuw_exact_commute1 (i5 %x , i5 %y , i5 %z ) {
455
+ ; CHECK-LABEL: @udiv_mul_shl_nuw_exact_commute1 (
456
456
; CHECK-NEXT: [[D:%.*]] = lshr i5 [[Y:%.*]], [[Z:%.*]]
457
457
; CHECK-NEXT: ret i5 [[D]]
458
458
;
459
459
%m1 = mul nuw i5 %y , %x
460
460
%m2 = shl nuw i5 %x , %z
461
- %d = udiv i5 %m1 , %m2
461
+ %d = udiv exact i5 %m1 , %m2
462
462
ret i5 %d
463
463
}
464
464
0 commit comments