1
1
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2
- ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+sse4.1 | FileCheck %s --check-prefix= SSE
3
- ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx2 | FileCheck %s --check-prefix= AVX
2
+ ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+sse4.1 | FileCheck %s --check-prefixes=CHECK, SSE
3
+ ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx2 | FileCheck %s --check-prefixes=CHECK, AVX
4
4
5
5
declare {i32 , i1 } @llvm.ssub.with.overflow.i32 (i32 , i32 ) nounwind readnone
6
6
declare {i32 , i1 } @llvm.usub.with.overflow.i32 (i32 , i32 ) nounwind readnone
@@ -10,15 +10,10 @@ declare {<4 x i32>, <4 x i1>} @llvm.usub.with.overflow.v4i32(<4 x i32>, <4 x i32
10
10
11
11
; fold (ssub x, 0) -> x
12
12
define i32 @combine_ssub_zero (i32 %a0 , i32 %a1 ) {
13
- ; SSE-LABEL: combine_ssub_zero:
14
- ; SSE: # %bb.0:
15
- ; SSE-NEXT: movl %edi, %eax
16
- ; SSE-NEXT: retq
17
- ;
18
- ; AVX-LABEL: combine_ssub_zero:
19
- ; AVX: # %bb.0:
20
- ; AVX-NEXT: movl %edi, %eax
21
- ; AVX-NEXT: retq
13
+ ; CHECK-LABEL: combine_ssub_zero:
14
+ ; CHECK: # %bb.0:
15
+ ; CHECK-NEXT: movl %edi, %eax
16
+ ; CHECK-NEXT: retq
22
17
%1 = call {i32 , i1 } @llvm.ssub.with.overflow.i32 (i32 %a0 , i32 zeroinitializer )
23
18
%2 = extractvalue {i32 , i1 } %1 , 0
24
19
%3 = extractvalue {i32 , i1 } %1 , 1
@@ -27,13 +22,9 @@ define i32 @combine_ssub_zero(i32 %a0, i32 %a1) {
27
22
}
28
23
29
24
define <4 x i32 > @combine_vec_ssub_zero (<4 x i32 > %a0 , <4 x i32 > %a1 ) {
30
- ; SSE-LABEL: combine_vec_ssub_zero:
31
- ; SSE: # %bb.0:
32
- ; SSE-NEXT: retq
33
- ;
34
- ; AVX-LABEL: combine_vec_ssub_zero:
35
- ; AVX: # %bb.0:
36
- ; AVX-NEXT: retq
25
+ ; CHECK-LABEL: combine_vec_ssub_zero:
26
+ ; CHECK: # %bb.0:
27
+ ; CHECK-NEXT: retq
37
28
%1 = call {<4 x i32 >, <4 x i1 >} @llvm.ssub.with.overflow.v4i32 (<4 x i32 > %a0 , <4 x i32 > zeroinitializer )
38
29
%2 = extractvalue {<4 x i32 >, <4 x i1 >} %1 , 0
39
30
%3 = extractvalue {<4 x i32 >, <4 x i1 >} %1 , 1
@@ -43,15 +34,10 @@ define <4 x i32> @combine_vec_ssub_zero(<4 x i32> %a0, <4 x i32> %a1) {
43
34
44
35
; fold (usub x, 0) -> x
45
36
define i32 @combine_usub_zero (i32 %a0 , i32 %a1 ) {
46
- ; SSE-LABEL: combine_usub_zero:
47
- ; SSE: # %bb.0:
48
- ; SSE-NEXT: movl %edi, %eax
49
- ; SSE-NEXT: retq
50
- ;
51
- ; AVX-LABEL: combine_usub_zero:
52
- ; AVX: # %bb.0:
53
- ; AVX-NEXT: movl %edi, %eax
54
- ; AVX-NEXT: retq
37
+ ; CHECK-LABEL: combine_usub_zero:
38
+ ; CHECK: # %bb.0:
39
+ ; CHECK-NEXT: movl %edi, %eax
40
+ ; CHECK-NEXT: retq
55
41
%1 = call {i32 , i1 } @llvm.usub.with.overflow.i32 (i32 %a0 , i32 zeroinitializer )
56
42
%2 = extractvalue {i32 , i1 } %1 , 0
57
43
%3 = extractvalue {i32 , i1 } %1 , 1
@@ -60,13 +46,9 @@ define i32 @combine_usub_zero(i32 %a0, i32 %a1) {
60
46
}
61
47
62
48
define <4 x i32 > @combine_vec_usub_zero (<4 x i32 > %a0 , <4 x i32 > %a1 ) {
63
- ; SSE-LABEL: combine_vec_usub_zero:
64
- ; SSE: # %bb.0:
65
- ; SSE-NEXT: retq
66
- ;
67
- ; AVX-LABEL: combine_vec_usub_zero:
68
- ; AVX: # %bb.0:
69
- ; AVX-NEXT: retq
49
+ ; CHECK-LABEL: combine_vec_usub_zero:
50
+ ; CHECK: # %bb.0:
51
+ ; CHECK-NEXT: retq
70
52
%1 = call {<4 x i32 >, <4 x i1 >} @llvm.usub.with.overflow.v4i32 (<4 x i32 > %a0 , <4 x i32 > zeroinitializer )
71
53
%2 = extractvalue {<4 x i32 >, <4 x i1 >} %1 , 0
72
54
%3 = extractvalue {<4 x i32 >, <4 x i1 >} %1 , 1
@@ -76,15 +58,10 @@ define <4 x i32> @combine_vec_usub_zero(<4 x i32> %a0, <4 x i32> %a1) {
76
58
77
59
; fold (ssub x, x) -> 0
78
60
define i32 @combine_ssub_self (i32 %a0 , i32 %a1 ) {
79
- ; SSE-LABEL: combine_ssub_self:
80
- ; SSE: # %bb.0:
81
- ; SSE-NEXT: xorl %eax, %eax
82
- ; SSE-NEXT: retq
83
- ;
84
- ; AVX-LABEL: combine_ssub_self:
85
- ; AVX: # %bb.0:
86
- ; AVX-NEXT: xorl %eax, %eax
87
- ; AVX-NEXT: retq
61
+ ; CHECK-LABEL: combine_ssub_self:
62
+ ; CHECK: # %bb.0:
63
+ ; CHECK-NEXT: xorl %eax, %eax
64
+ ; CHECK-NEXT: retq
88
65
%1 = call {i32 , i1 } @llvm.ssub.with.overflow.i32 (i32 %a0 , i32 %a0 )
89
66
%2 = extractvalue {i32 , i1 } %1 , 0
90
67
%3 = extractvalue {i32 , i1 } %1 , 1
@@ -111,15 +88,10 @@ define <4 x i32> @combine_vec_ssub_self(<4 x i32> %a0, <4 x i32> %a1) {
111
88
112
89
; fold (usub x, x) -> x
113
90
define i32 @combine_usub_self (i32 %a0 , i32 %a1 ) {
114
- ; SSE-LABEL: combine_usub_self:
115
- ; SSE: # %bb.0:
116
- ; SSE-NEXT: xorl %eax, %eax
117
- ; SSE-NEXT: retq
118
- ;
119
- ; AVX-LABEL: combine_usub_self:
120
- ; AVX: # %bb.0:
121
- ; AVX-NEXT: xorl %eax, %eax
122
- ; AVX-NEXT: retq
91
+ ; CHECK-LABEL: combine_usub_self:
92
+ ; CHECK: # %bb.0:
93
+ ; CHECK-NEXT: xorl %eax, %eax
94
+ ; CHECK-NEXT: retq
123
95
%1 = call {i32 , i1 } @llvm.usub.with.overflow.i32 (i32 %a0 , i32 %a0 )
124
96
%2 = extractvalue {i32 , i1 } %1 , 0
125
97
%3 = extractvalue {i32 , i1 } %1 , 1
@@ -146,17 +118,11 @@ define <4 x i32> @combine_vec_usub_self(<4 x i32> %a0, <4 x i32> %a1) {
146
118
147
119
; fold (usub -1, x) -> (xor x, -1) + no borrow
148
120
define i32 @combine_usub_negone (i32 %a0 , i32 %a1 ) {
149
- ; SSE-LABEL: combine_usub_negone:
150
- ; SSE: # %bb.0:
151
- ; SSE-NEXT: movl %edi, %eax
152
- ; SSE-NEXT: notl %eax
153
- ; SSE-NEXT: retq
154
- ;
155
- ; AVX-LABEL: combine_usub_negone:
156
- ; AVX: # %bb.0:
157
- ; AVX-NEXT: movl %edi, %eax
158
- ; AVX-NEXT: notl %eax
159
- ; AVX-NEXT: retq
121
+ ; CHECK-LABEL: combine_usub_negone:
122
+ ; CHECK: # %bb.0:
123
+ ; CHECK-NEXT: movl %edi, %eax
124
+ ; CHECK-NEXT: notl %eax
125
+ ; CHECK-NEXT: retq
160
126
%1 = call {i32 , i1 } @llvm.usub.with.overflow.i32 (i32 -1 , i32 %a0 )
161
127
%2 = extractvalue {i32 , i1 } %1 , 0
162
128
%3 = extractvalue {i32 , i1 } %1 , 1
0 commit comments