@@ -17,13 +17,13 @@ define noundef i64 @foo(i64 noundef %0) {
1717; CHECK-NEXT: ret i64 [[TMP3]]
1818;
1919; SSE-LABEL: @foo(
20- ; SSE-NEXT: [[TMP2:%.*]] = shl i64 [[TMP0:%.*]], 44
21- ; SSE-NEXT: [[TMP3:%.*]] = sub nuw nsw i64 -17592186044416, [[TMP2]]
20+ ; SSE-NEXT: [[TMP2:%.*]] = xor i64 [[TMP0:%.*]], -1
21+ ; SSE-NEXT: [[TMP3:%.*]] = shl i64 [[TMP2]], 44
2222; SSE-NEXT: ret i64 [[TMP3]]
2323;
2424; AVX-LABEL: @foo(
25- ; AVX-NEXT: [[TMP2:%.*]] = shl i64 [[TMP0:%.*]], 44
26- ; AVX-NEXT: [[TMP3:%.*]] = sub nuw nsw i64 -17592186044416, [[TMP2]]
25+ ; AVX-NEXT: [[TMP2:%.*]] = xor i64 [[TMP0:%.*]], -1
26+ ; AVX-NEXT: [[TMP3:%.*]] = shl i64 [[TMP2]], 44
2727; AVX-NEXT: ret i64 [[TMP3]]
2828;
2929 %2 = sub i64 1048575 , %0
@@ -34,35 +34,35 @@ define noundef i64 @foo(i64 noundef %0) {
3434define void @bar (ptr noundef %0 ) {
3535; SSE-LABEL: @bar(
3636; SSE-NEXT: [[TMP2:%.*]] = load <2 x i64>, ptr [[TMP0:%.*]], align 8
37- ; SSE-NEXT: [[TMP3:%.*]] = shl <2 x i64> [[TMP2]], <i64 44 , i64 44 >
38- ; SSE-NEXT: [[TMP4:%.*]] = sub nuw nsw <2 x i64> <i64 -17592186044416 , i64 -17592186044416>, [[TMP3]]
37+ ; SSE-NEXT: [[TMP3:%.*]] = xor <2 x i64> [[TMP2]], <i64 -1 , i64 -1 >
38+ ; SSE-NEXT: [[TMP4:%.*]] = shl <2 x i64> [[TMP3]], <i64 44 , i64 44>
3939; SSE-NEXT: store <2 x i64> [[TMP4]], ptr [[TMP0]], align 8
4040; SSE-NEXT: [[TMP5:%.*]] = getelementptr inbounds i8, ptr [[TMP0]], i64 16
4141; SSE-NEXT: [[TMP6:%.*]] = load <2 x i64>, ptr [[TMP5]], align 8
42- ; SSE-NEXT: [[TMP7:%.*]] = shl <2 x i64> [[TMP6]], <i64 44 , i64 44 >
43- ; SSE-NEXT: [[TMP8:%.*]] = sub nuw nsw <2 x i64> <i64 -17592186044416 , i64 -17592186044416>, [[TMP7]]
42+ ; SSE-NEXT: [[TMP7:%.*]] = xor <2 x i64> [[TMP6]], <i64 -1 , i64 -1 >
43+ ; SSE-NEXT: [[TMP8:%.*]] = shl <2 x i64> [[TMP7]], <i64 44 , i64 44>
4444; SSE-NEXT: store <2 x i64> [[TMP8]], ptr [[TMP5]], align 8
4545; SSE-NEXT: [[TMP9:%.*]] = getelementptr inbounds i8, ptr [[TMP0]], i64 32
4646; SSE-NEXT: [[TMP10:%.*]] = load <2 x i64>, ptr [[TMP9]], align 8
47- ; SSE-NEXT: [[TMP11:%.*]] = shl <2 x i64> [[TMP10]], <i64 44 , i64 44 >
48- ; SSE-NEXT: [[TMP12:%.*]] = sub nuw nsw <2 x i64> <i64 -17592186044416 , i64 -17592186044416>, [[TMP11]]
47+ ; SSE-NEXT: [[TMP11:%.*]] = xor <2 x i64> [[TMP10]], <i64 -1 , i64 -1 >
48+ ; SSE-NEXT: [[TMP12:%.*]] = shl <2 x i64> [[TMP11]], <i64 44 , i64 44>
4949; SSE-NEXT: store <2 x i64> [[TMP12]], ptr [[TMP9]], align 8
5050; SSE-NEXT: [[TMP13:%.*]] = getelementptr inbounds i8, ptr [[TMP0]], i64 48
5151; SSE-NEXT: [[TMP14:%.*]] = load <2 x i64>, ptr [[TMP13]], align 8
52- ; SSE-NEXT: [[TMP15:%.*]] = shl <2 x i64> [[TMP14]], <i64 44 , i64 44 >
53- ; SSE-NEXT: [[TMP16:%.*]] = sub nuw nsw <2 x i64> <i64 -17592186044416 , i64 -17592186044416>, [[TMP15]]
52+ ; SSE-NEXT: [[TMP15:%.*]] = xor <2 x i64> [[TMP14]], <i64 -1 , i64 -1 >
53+ ; SSE-NEXT: [[TMP16:%.*]] = shl <2 x i64> [[TMP15]], <i64 44 , i64 44>
5454; SSE-NEXT: store <2 x i64> [[TMP16]], ptr [[TMP13]], align 8
5555; SSE-NEXT: ret void
5656;
5757; AVX-LABEL: @bar(
5858; AVX-NEXT: [[TMP2:%.*]] = load <4 x i64>, ptr [[TMP0:%.*]], align 8
59- ; AVX-NEXT: [[TMP3:%.*]] = shl <4 x i64> [[TMP2]], <i64 44 , i64 44 , i64 44 , i64 44 >
60- ; AVX-NEXT: [[TMP4:%.*]] = sub nuw nsw <4 x i64> <i64 -17592186044416 , i64 -17592186044416 , i64 -17592186044416 , i64 -17592186044416>, [[TMP3]]
59+ ; AVX-NEXT: [[TMP3:%.*]] = xor <4 x i64> [[TMP2]], <i64 -1 , i64 -1 , i64 -1 , i64 -1 >
60+ ; AVX-NEXT: [[TMP4:%.*]] = shl <4 x i64> [[TMP3]], <i64 44 , i64 44 , i64 44 , i64 44>
6161; AVX-NEXT: store <4 x i64> [[TMP4]], ptr [[TMP0]], align 8
6262; AVX-NEXT: [[TMP5:%.*]] = getelementptr inbounds i8, ptr [[TMP0]], i64 32
6363; AVX-NEXT: [[TMP6:%.*]] = load <4 x i64>, ptr [[TMP5]], align 8
64- ; AVX-NEXT: [[TMP7:%.*]] = shl <4 x i64> [[TMP6]], <i64 44 , i64 44 , i64 44 , i64 44 >
65- ; AVX-NEXT: [[TMP8:%.*]] = sub nuw nsw <4 x i64> <i64 -17592186044416 , i64 -17592186044416 , i64 -17592186044416 , i64 -17592186044416>, [[TMP7]]
64+ ; AVX-NEXT: [[TMP7:%.*]] = xor <4 x i64> [[TMP6]], <i64 -1 , i64 -1 , i64 -1 , i64 -1 >
65+ ; AVX-NEXT: [[TMP8:%.*]] = shl <4 x i64> [[TMP7]], <i64 44 , i64 44 , i64 44 , i64 44>
6666; AVX-NEXT: store <4 x i64> [[TMP8]], ptr [[TMP5]], align 8
6767; AVX-NEXT: ret void
6868;
0 commit comments