@@ -17,13 +17,13 @@ define noundef i64 @foo(i64 noundef %0) {
17
17
; CHECK-NEXT: ret i64 [[TMP3]]
18
18
;
19
19
; 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
22
22
; SSE-NEXT: ret i64 [[TMP3]]
23
23
;
24
24
; 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
27
27
; AVX-NEXT: ret i64 [[TMP3]]
28
28
;
29
29
%2 = sub i64 1048575 , %0
@@ -34,35 +34,35 @@ define noundef i64 @foo(i64 noundef %0) {
34
34
define void @bar (ptr noundef %0 ) {
35
35
; SSE-LABEL: @bar(
36
36
; 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>
39
39
; SSE-NEXT: store <2 x i64> [[TMP4]], ptr [[TMP0]], align 8
40
40
; SSE-NEXT: [[TMP5:%.*]] = getelementptr inbounds i8, ptr [[TMP0]], i64 16
41
41
; 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>
44
44
; SSE-NEXT: store <2 x i64> [[TMP8]], ptr [[TMP5]], align 8
45
45
; SSE-NEXT: [[TMP9:%.*]] = getelementptr inbounds i8, ptr [[TMP0]], i64 32
46
46
; 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>
49
49
; SSE-NEXT: store <2 x i64> [[TMP12]], ptr [[TMP9]], align 8
50
50
; SSE-NEXT: [[TMP13:%.*]] = getelementptr inbounds i8, ptr [[TMP0]], i64 48
51
51
; 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>
54
54
; SSE-NEXT: store <2 x i64> [[TMP16]], ptr [[TMP13]], align 8
55
55
; SSE-NEXT: ret void
56
56
;
57
57
; AVX-LABEL: @bar(
58
58
; 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>
61
61
; AVX-NEXT: store <4 x i64> [[TMP4]], ptr [[TMP0]], align 8
62
62
; AVX-NEXT: [[TMP5:%.*]] = getelementptr inbounds i8, ptr [[TMP0]], i64 32
63
63
; 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>
66
66
; AVX-NEXT: store <4 x i64> [[TMP8]], ptr [[TMP5]], align 8
67
67
; AVX-NEXT: ret void
68
68
;
0 commit comments