@@ -1607,7 +1607,7 @@ define i32 @combine_mul_nabs_i32(i32 %0) {
1607
1607
1608
1608
define i32 @combine_mul_nabs_i32_unsigned_wrap (i32 %0 ) {
1609
1609
; CHECK-LABEL: @combine_mul_nabs_i32_unsigned_wrap(
1610
- ; CHECK-NEXT: [[M:%.*]] = mul i32 [[TMP0:%.*]], [[TMP0]]
1610
+ ; CHECK-NEXT: [[M:%.*]] = mul nuw nsw i32 [[TMP0:%.*]], [[TMP0]]
1611
1611
; CHECK-NEXT: ret i32 [[M]]
1612
1612
;
1613
1613
%c = icmp slt i32 %0 , 0
@@ -1619,7 +1619,7 @@ define i32 @combine_mul_nabs_i32_unsigned_wrap(i32 %0) {
1619
1619
1620
1620
define i32 @combine_mul_nabs_i32_signed_wrap (i32 %0 ) {
1621
1621
; CHECK-LABEL: @combine_mul_nabs_i32_signed_wrap(
1622
- ; CHECK-NEXT: [[M:%.*]] = mul i32 [[TMP0:%.*]], [[TMP0]]
1622
+ ; CHECK-NEXT: [[M:%.*]] = mul nsw i32 [[TMP0:%.*]], [[TMP0]]
1623
1623
; CHECK-NEXT: ret i32 [[M]]
1624
1624
;
1625
1625
%c = icmp slt i32 %0 , 0
@@ -1644,7 +1644,7 @@ define <4 x i32> @combine_mul_nabs_v4i32(<4 x i32> %0) {
1644
1644
1645
1645
define <4 x i32 > @combine_mul_nabs_v4i32_unsigned_wrap (<4 x i32 > %0 ) {
1646
1646
; CHECK-LABEL: @combine_mul_nabs_v4i32_unsigned_wrap(
1647
- ; CHECK-NEXT: [[M:%.*]] = mul <4 x i32> [[TMP0:%.*]], [[TMP0]]
1647
+ ; CHECK-NEXT: [[M:%.*]] = mul nuw nsw <4 x i32> [[TMP0:%.*]], [[TMP0]]
1648
1648
; CHECK-NEXT: ret <4 x i32> [[M]]
1649
1649
;
1650
1650
%c = icmp slt <4 x i32 > %0 , zeroinitializer
@@ -1656,7 +1656,7 @@ define <4 x i32> @combine_mul_nabs_v4i32_unsigned_wrap(<4 x i32> %0) {
1656
1656
1657
1657
define <4 x i32 > @combine_mul_nabs_v4i32_signed_wrap (<4 x i32 > %0 ) {
1658
1658
; CHECK-LABEL: @combine_mul_nabs_v4i32_signed_wrap(
1659
- ; CHECK-NEXT: [[M:%.*]] = mul <4 x i32> [[TMP0:%.*]], [[TMP0]]
1659
+ ; CHECK-NEXT: [[M:%.*]] = mul nsw <4 x i32> [[TMP0:%.*]], [[TMP0]]
1660
1660
; CHECK-NEXT: ret <4 x i32> [[M]]
1661
1661
;
1662
1662
%c = icmp slt <4 x i32 > %0 , zeroinitializer
@@ -1689,7 +1689,7 @@ define i32 @combine_mul_nabs_intrin(i32 %x) {
1689
1689
1690
1690
define i32 @combine_mul_nabs_intrin_unsigned_flags (i32 %x ) {
1691
1691
; CHECK-LABEL: @combine_mul_nabs_intrin_unsigned_flags(
1692
- ; CHECK-NEXT: [[MUL:%.*]] = mul i32 [[X:%.*]], [[X]]
1692
+ ; CHECK-NEXT: [[MUL:%.*]] = mul nuw nsw i32 [[X:%.*]], [[X]]
1693
1693
; CHECK-NEXT: ret i32 [[MUL]]
1694
1694
;
1695
1695
%abs = call i32 @llvm.abs.i32 (i32 %x , i1 false )
@@ -1700,7 +1700,7 @@ define i32 @combine_mul_nabs_intrin_unsigned_flags(i32 %x) {
1700
1700
1701
1701
define i32 @combine_mul_nabs_intrin_signed_flags (i32 %x ) {
1702
1702
; CHECK-LABEL: @combine_mul_nabs_intrin_signed_flags(
1703
- ; CHECK-NEXT: [[MUL:%.*]] = mul i32 [[X:%.*]], [[X]]
1703
+ ; CHECK-NEXT: [[MUL:%.*]] = mul nsw i32 [[X:%.*]], [[X]]
1704
1704
; CHECK-NEXT: ret i32 [[MUL]]
1705
1705
;
1706
1706
%abs = call i32 @llvm.abs.i32 (i32 %x , i1 false )
0 commit comments