llvm.org GIT mirror llvm / 04b2a60
[AVX-512] Add -show-mc-encoding to legacy vector intrinsic tests so we can see when VEX or EVEX encoded instructions are being emitted. Make sure the tests all have an avx2 command line and an skx command line. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286055 91177308-0d34-0410-b5e6-96231b3b80d8 Craig Topper 3 years ago
8 changed file(s) with 4127 addition(s) and 4169 deletion(s). Raw diff Collapse all Expand all
0 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
1 ; RUN: llc < %s -mtriple=i686-apple-darwin -mattr=avx,aes,pclmul | FileCheck %s --check-prefix=AVX
2 ; RUN: llc < %s -mtriple=i686-apple-darwin -mattr=avx512vl,aes,pclmul | FileCheck %s --check-prefix=AVX512VL
1 ; RUN: llc < %s -mtriple=i686-apple-darwin -mattr=avx,aes,pclmul -show-mc-encoding | FileCheck %s --check-prefix=CHECK --check-prefix=AVX
2 ; RUN: llc < %s -mtriple=i686-apple-darwin -mcpu=skx -show-mc-encoding | FileCheck %s --check-prefix=CHECK --check-prefix=AVX512VL
33
44 define <2 x i64> @test_x86_aesni_aesdec(<2 x i64> %a0, <2 x i64> %a1) {
5 ; AVX-LABEL: test_x86_aesni_aesdec:
6 ; AVX: ## BB#0:
7 ; AVX-NEXT: vaesdec %xmm1, %xmm0, %xmm0
8 ; AVX-NEXT: retl
9 ;
10 ; AVX512VL-LABEL: test_x86_aesni_aesdec:
11 ; AVX512VL: ## BB#0:
12 ; AVX512VL-NEXT: vaesdec %xmm1, %xmm0, %xmm0
13 ; AVX512VL-NEXT: retl
5 ; CHECK-LABEL: test_x86_aesni_aesdec:
6 ; CHECK: ## BB#0:
7 ; CHECK-NEXT: vaesdec %xmm1, %xmm0, %xmm0 ## encoding: [0xc4,0xe2,0x79,0xde,0xc1]
8 ; CHECK-NEXT: retl ## encoding: [0xc3]
149 %res = call <2 x i64> @llvm.x86.aesni.aesdec(<2 x i64> %a0, <2 x i64> %a1) ; <<2 x i64>> [#uses=1]
1510 ret <2 x i64> %res
1611 }
1813
1914
2015 define <2 x i64> @test_x86_aesni_aesdeclast(<2 x i64> %a0, <2 x i64> %a1) {
21 ; AVX-LABEL: test_x86_aesni_aesdeclast:
22 ; AVX: ## BB#0:
23 ; AVX-NEXT: vaesdeclast %xmm1, %xmm0, %xmm0
24 ; AVX-NEXT: retl
25 ;
26 ; AVX512VL-LABEL: test_x86_aesni_aesdeclast:
27 ; AVX512VL: ## BB#0:
28 ; AVX512VL-NEXT: vaesdeclast %xmm1, %xmm0, %xmm0
29 ; AVX512VL-NEXT: retl
16 ; CHECK-LABEL: test_x86_aesni_aesdeclast:
17 ; CHECK: ## BB#0:
18 ; CHECK-NEXT: vaesdeclast %xmm1, %xmm0, %xmm0 ## encoding: [0xc4,0xe2,0x79,0xdf,0xc1]
19 ; CHECK-NEXT: retl ## encoding: [0xc3]
3020 %res = call <2 x i64> @llvm.x86.aesni.aesdeclast(<2 x i64> %a0, <2 x i64> %a1) ; <<2 x i64>> [#uses=1]
3121 ret <2 x i64> %res
3222 }
3424
3525
3626 define <2 x i64> @test_x86_aesni_aesenc(<2 x i64> %a0, <2 x i64> %a1) {
37 ; AVX-LABEL: test_x86_aesni_aesenc:
38 ; AVX: ## BB#0:
39 ; AVX-NEXT: vaesenc %xmm1, %xmm0, %xmm0
40 ; AVX-NEXT: retl
41 ;
42 ; AVX512VL-LABEL: test_x86_aesni_aesenc:
43 ; AVX512VL: ## BB#0:
44 ; AVX512VL-NEXT: vaesenc %xmm1, %xmm0, %xmm0
45 ; AVX512VL-NEXT: retl
27 ; CHECK-LABEL: test_x86_aesni_aesenc:
28 ; CHECK: ## BB#0:
29 ; CHECK-NEXT: vaesenc %xmm1, %xmm0, %xmm0 ## encoding: [0xc4,0xe2,0x79,0xdc,0xc1]
30 ; CHECK-NEXT: retl ## encoding: [0xc3]
4631 %res = call <2 x i64> @llvm.x86.aesni.aesenc(<2 x i64> %a0, <2 x i64> %a1) ; <<2 x i64>> [#uses=1]
4732 ret <2 x i64> %res
4833 }
5035
5136
5237 define <2 x i64> @test_x86_aesni_aesenclast(<2 x i64> %a0, <2 x i64> %a1) {
53 ; AVX-LABEL: test_x86_aesni_aesenclast:
54 ; AVX: ## BB#0:
55 ; AVX-NEXT: vaesenclast %xmm1, %xmm0, %xmm0
56 ; AVX-NEXT: retl
57 ;
58 ; AVX512VL-LABEL: test_x86_aesni_aesenclast:
59 ; AVX512VL: ## BB#0:
60 ; AVX512VL-NEXT: vaesenclast %xmm1, %xmm0, %xmm0
61 ; AVX512VL-NEXT: retl
38 ; CHECK-LABEL: test_x86_aesni_aesenclast:
39 ; CHECK: ## BB#0:
40 ; CHECK-NEXT: vaesenclast %xmm1, %xmm0, %xmm0 ## encoding: [0xc4,0xe2,0x79,0xdd,0xc1]
41 ; CHECK-NEXT: retl ## encoding: [0xc3]
6242 %res = call <2 x i64> @llvm.x86.aesni.aesenclast(<2 x i64> %a0, <2 x i64> %a1) ; <<2 x i64>> [#uses=1]
6343 ret <2 x i64> %res
6444 }
6646
6747
6848 define <2 x i64> @test_x86_aesni_aesimc(<2 x i64> %a0) {
69 ; AVX-LABEL: test_x86_aesni_aesimc:
70 ; AVX: ## BB#0:
71 ; AVX-NEXT: vaesimc %xmm0, %xmm0
72 ; AVX-NEXT: retl
73 ;
74 ; AVX512VL-LABEL: test_x86_aesni_aesimc:
75 ; AVX512VL: ## BB#0:
76 ; AVX512VL-NEXT: vaesimc %xmm0, %xmm0
77 ; AVX512VL-NEXT: retl
49 ; CHECK-LABEL: test_x86_aesni_aesimc:
50 ; CHECK: ## BB#0:
51 ; CHECK-NEXT: vaesimc %xmm0, %xmm0 ## encoding: [0xc4,0xe2,0x79,0xdb,0xc0]
52 ; CHECK-NEXT: retl ## encoding: [0xc3]
7853 %res = call <2 x i64> @llvm.x86.aesni.aesimc(<2 x i64> %a0) ; <<2 x i64>> [#uses=1]
7954 ret <2 x i64> %res
8055 }
8257
8358
8459 define <2 x i64> @test_x86_aesni_aeskeygenassist(<2 x i64> %a0) {
85 ; AVX-LABEL: test_x86_aesni_aeskeygenassist:
86 ; AVX: ## BB#0:
87 ; AVX-NEXT: vaeskeygenassist $7, %xmm0, %xmm0
88 ; AVX-NEXT: retl
89 ;
90 ; AVX512VL-LABEL: test_x86_aesni_aeskeygenassist:
91 ; AVX512VL: ## BB#0:
92 ; AVX512VL-NEXT: vaeskeygenassist $7, %xmm0, %xmm0
93 ; AVX512VL-NEXT: retl
60 ; CHECK-LABEL: test_x86_aesni_aeskeygenassist:
61 ; CHECK: ## BB#0:
62 ; CHECK-NEXT: vaeskeygenassist $7, %xmm0, %xmm0 ## encoding: [0xc4,0xe3,0x79,0xdf,0xc0,0x07]
63 ; CHECK-NEXT: retl ## encoding: [0xc3]
9464 %res = call <2 x i64> @llvm.x86.aesni.aeskeygenassist(<2 x i64> %a0, i8 7) ; <<2 x i64>> [#uses=1]
9565 ret <2 x i64> %res
9666 }
9868
9969
10070 define <2 x double> @test_x86_sse2_add_sd(<2 x double> %a0, <2 x double> %a1) {
101 ; AVX-LABEL: test_x86_sse2_add_sd:
102 ; AVX: ## BB#0:
103 ; AVX-NEXT: vaddsd %xmm1, %xmm0, %xmm0
104 ; AVX-NEXT: retl
105 ;
106 ; AVX512VL-LABEL: test_x86_sse2_add_sd:
107 ; AVX512VL: ## BB#0:
108 ; AVX512VL-NEXT: vaddsd %xmm1, %xmm0, %xmm0
109 ; AVX512VL-NEXT: retl
71 ; CHECK-LABEL: test_x86_sse2_add_sd:
72 ; CHECK: ## BB#0:
73 ; CHECK-NEXT: vaddsd %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xfb,0x58,0xc1]
74 ; CHECK-NEXT: retl ## encoding: [0xc3]
11075 %res = call <2 x double> @llvm.x86.sse2.add.sd(<2 x double> %a0, <2 x double> %a1) ; <<2 x double>> [#uses=1]
11176 ret <2 x double> %res
11277 }
11479
11580
11681 define <2 x double> @test_x86_sse2_cmp_pd(<2 x double> %a0, <2 x double> %a1) {
117 ; AVX-LABEL: test_x86_sse2_cmp_pd:
118 ; AVX: ## BB#0:
119 ; AVX-NEXT: vcmpordpd %xmm1, %xmm0, %xmm0
120 ; AVX-NEXT: retl
121 ;
122 ; AVX512VL-LABEL: test_x86_sse2_cmp_pd:
123 ; AVX512VL: ## BB#0:
124 ; AVX512VL-NEXT: vcmpordpd %xmm1, %xmm0, %xmm0
125 ; AVX512VL-NEXT: retl
82 ; CHECK-LABEL: test_x86_sse2_cmp_pd:
83 ; CHECK: ## BB#0:
84 ; CHECK-NEXT: vcmpordpd %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xf9,0xc2,0xc1,0x07]
85 ; CHECK-NEXT: retl ## encoding: [0xc3]
12686 %res = call <2 x double> @llvm.x86.sse2.cmp.pd(<2 x double> %a0, <2 x double> %a1, i8 7) ; <<2 x double>> [#uses=1]
12787 ret <2 x double> %res
12888 }
13090
13191
13292 define <2 x double> @test_x86_sse2_cmp_sd(<2 x double> %a0, <2 x double> %a1) {
133 ; AVX-LABEL: test_x86_sse2_cmp_sd:
134 ; AVX: ## BB#0:
135 ; AVX-NEXT: vcmpordsd %xmm1, %xmm0, %xmm0
136 ; AVX-NEXT: retl
137 ;
138 ; AVX512VL-LABEL: test_x86_sse2_cmp_sd:
139 ; AVX512VL: ## BB#0:
140 ; AVX512VL-NEXT: vcmpordsd %xmm1, %xmm0, %xmm0
141 ; AVX512VL-NEXT: retl
93 ; CHECK-LABEL: test_x86_sse2_cmp_sd:
94 ; CHECK: ## BB#0:
95 ; CHECK-NEXT: vcmpordsd %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xfb,0xc2,0xc1,0x07]
96 ; CHECK-NEXT: retl ## encoding: [0xc3]
14297 %res = call <2 x double> @llvm.x86.sse2.cmp.sd(<2 x double> %a0, <2 x double> %a1, i8 7) ; <<2 x double>> [#uses=1]
14398 ret <2 x double> %res
14499 }
148103 define i32 @test_x86_sse2_comieq_sd(<2 x double> %a0, <2 x double> %a1) {
149104 ; AVX-LABEL: test_x86_sse2_comieq_sd:
150105 ; AVX: ## BB#0:
151 ; AVX-NEXT: vcomisd %xmm1, %xmm0
152 ; AVX-NEXT: setnp %al
153 ; AVX-NEXT: sete %cl
154 ; AVX-NEXT: andb %al, %cl
155 ; AVX-NEXT: movzbl %cl, %eax
156 ; AVX-NEXT: retl
106 ; AVX-NEXT: vcomisd %xmm1, %xmm0 ## encoding: [0xc5,0xf9,0x2f,0xc1]
107 ; AVX-NEXT: setnp %al ## encoding: [0x0f,0x9b,0xc0]
108 ; AVX-NEXT: sete %cl ## encoding: [0x0f,0x94,0xc1]
109 ; AVX-NEXT: andb %al, %cl ## encoding: [0x20,0xc1]
110 ; AVX-NEXT: movzbl %cl, %eax ## encoding: [0x0f,0xb6,0xc1]
111 ; AVX-NEXT: retl ## encoding: [0xc3]
157112 ;
158113 ; AVX512VL-LABEL: test_x86_sse2_comieq_sd:
159114 ; AVX512VL: ## BB#0:
160 ; AVX512VL-NEXT: vcomisd %xmm1, %xmm0
161 ; AVX512VL-NEXT: setnp %al
162 ; AVX512VL-NEXT: sete %cl
163 ; AVX512VL-NEXT: andb %al, %cl
164 ; AVX512VL-NEXT: movzbl %cl, %eax
165 ; AVX512VL-NEXT: retl
115 ; AVX512VL-NEXT: vcomisd %xmm1, %xmm0 ## encoding: [0x62,0xf1,0xfd,0x08,0x2f,0xc1]
116 ; AVX512VL-NEXT: setnp %al ## encoding: [0x0f,0x9b,0xc0]
117 ; AVX512VL-NEXT: sete %cl ## encoding: [0x0f,0x94,0xc1]
118 ; AVX512VL-NEXT: andb %al, %cl ## encoding: [0x20,0xc1]
119 ; AVX512VL-NEXT: movzbl %cl, %eax ## encoding: [0x0f,0xb6,0xc1]
120 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
166121 %res = call i32 @llvm.x86.sse2.comieq.sd(<2 x double> %a0, <2 x double> %a1) ; [#uses=1]
167122 ret i32 %res
168123 }
172127 define i32 @test_x86_sse2_comige_sd(<2 x double> %a0, <2 x double> %a1) {
173128 ; AVX-LABEL: test_x86_sse2_comige_sd:
174129 ; AVX: ## BB#0:
175 ; AVX-NEXT: xorl %eax, %eax
176 ; AVX-NEXT: vcomisd %xmm1, %xmm0
177 ; AVX-NEXT: setae %al
178 ; AVX-NEXT: retl
130 ; AVX-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
131 ; AVX-NEXT: vcomisd %xmm1, %xmm0 ## encoding: [0xc5,0xf9,0x2f,0xc1]
132 ; AVX-NEXT: setae %al ## encoding: [0x0f,0x93,0xc0]
133 ; AVX-NEXT: retl ## encoding: [0xc3]
179134 ;
180135 ; AVX512VL-LABEL: test_x86_sse2_comige_sd:
181136 ; AVX512VL: ## BB#0:
182 ; AVX512VL-NEXT: xorl %eax, %eax
183 ; AVX512VL-NEXT: vcomisd %xmm1, %xmm0
184 ; AVX512VL-NEXT: setae %al
185 ; AVX512VL-NEXT: retl
137 ; AVX512VL-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
138 ; AVX512VL-NEXT: vcomisd %xmm1, %xmm0 ## encoding: [0x62,0xf1,0xfd,0x08,0x2f,0xc1]
139 ; AVX512VL-NEXT: setae %al ## encoding: [0x0f,0x93,0xc0]
140 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
186141 %res = call i32 @llvm.x86.sse2.comige.sd(<2 x double> %a0, <2 x double> %a1) ; [#uses=1]
187142 ret i32 %res
188143 }
192147 define i32 @test_x86_sse2_comigt_sd(<2 x double> %a0, <2 x double> %a1) {
193148 ; AVX-LABEL: test_x86_sse2_comigt_sd:
194149 ; AVX: ## BB#0:
195 ; AVX-NEXT: xorl %eax, %eax
196 ; AVX-NEXT: vcomisd %xmm1, %xmm0
197 ; AVX-NEXT: seta %al
198 ; AVX-NEXT: retl
150 ; AVX-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
151 ; AVX-NEXT: vcomisd %xmm1, %xmm0 ## encoding: [0xc5,0xf9,0x2f,0xc1]
152 ; AVX-NEXT: seta %al ## encoding: [0x0f,0x97,0xc0]
153 ; AVX-NEXT: retl ## encoding: [0xc3]
199154 ;
200155 ; AVX512VL-LABEL: test_x86_sse2_comigt_sd:
201156 ; AVX512VL: ## BB#0:
202 ; AVX512VL-NEXT: xorl %eax, %eax
203 ; AVX512VL-NEXT: vcomisd %xmm1, %xmm0
204 ; AVX512VL-NEXT: seta %al
205 ; AVX512VL-NEXT: retl
157 ; AVX512VL-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
158 ; AVX512VL-NEXT: vcomisd %xmm1, %xmm0 ## encoding: [0x62,0xf1,0xfd,0x08,0x2f,0xc1]
159 ; AVX512VL-NEXT: seta %al ## encoding: [0x0f,0x97,0xc0]
160 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
206161 %res = call i32 @llvm.x86.sse2.comigt.sd(<2 x double> %a0, <2 x double> %a1) ; [#uses=1]
207162 ret i32 %res
208163 }
212167 define i32 @test_x86_sse2_comile_sd(<2 x double> %a0, <2 x double> %a1) {
213168 ; AVX-LABEL: test_x86_sse2_comile_sd:
214169 ; AVX: ## BB#0:
215 ; AVX-NEXT: xorl %eax, %eax
216 ; AVX-NEXT: vcomisd %xmm0, %xmm1
217 ; AVX-NEXT: setae %al
218 ; AVX-NEXT: retl
170 ; AVX-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
171 ; AVX-NEXT: vcomisd %xmm0, %xmm1 ## encoding: [0xc5,0xf9,0x2f,0xc8]
172 ; AVX-NEXT: setae %al ## encoding: [0x0f,0x93,0xc0]
173 ; AVX-NEXT: retl ## encoding: [0xc3]
219174 ;
220175 ; AVX512VL-LABEL: test_x86_sse2_comile_sd:
221176 ; AVX512VL: ## BB#0:
222 ; AVX512VL-NEXT: xorl %eax, %eax
223 ; AVX512VL-NEXT: vcomisd %xmm0, %xmm1
224 ; AVX512VL-NEXT: setae %al
225 ; AVX512VL-NEXT: retl
177 ; AVX512VL-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
178 ; AVX512VL-NEXT: vcomisd %xmm0, %xmm1 ## encoding: [0x62,0xf1,0xfd,0x08,0x2f,0xc8]
179 ; AVX512VL-NEXT: setae %al ## encoding: [0x0f,0x93,0xc0]
180 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
226181 %res = call i32 @llvm.x86.sse2.comile.sd(<2 x double> %a0, <2 x double> %a1) ; [#uses=1]
227182 ret i32 %res
228183 }
232187 define i32 @test_x86_sse2_comilt_sd(<2 x double> %a0, <2 x double> %a1) {
233188 ; AVX-LABEL: test_x86_sse2_comilt_sd:
234189 ; AVX: ## BB#0:
235 ; AVX-NEXT: xorl %eax, %eax
236 ; AVX-NEXT: vcomisd %xmm0, %xmm1
237 ; AVX-NEXT: seta %al
238 ; AVX-NEXT: retl
190 ; AVX-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
191 ; AVX-NEXT: vcomisd %xmm0, %xmm1 ## encoding: [0xc5,0xf9,0x2f,0xc8]
192 ; AVX-NEXT: seta %al ## encoding: [0x0f,0x97,0xc0]
193 ; AVX-NEXT: retl ## encoding: [0xc3]
239194 ;
240195 ; AVX512VL-LABEL: test_x86_sse2_comilt_sd:
241196 ; AVX512VL: ## BB#0:
242 ; AVX512VL-NEXT: xorl %eax, %eax
243 ; AVX512VL-NEXT: vcomisd %xmm0, %xmm1
244 ; AVX512VL-NEXT: seta %al
245 ; AVX512VL-NEXT: retl
197 ; AVX512VL-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
198 ; AVX512VL-NEXT: vcomisd %xmm0, %xmm1 ## encoding: [0x62,0xf1,0xfd,0x08,0x2f,0xc8]
199 ; AVX512VL-NEXT: seta %al ## encoding: [0x0f,0x97,0xc0]
200 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
246201 %res = call i32 @llvm.x86.sse2.comilt.sd(<2 x double> %a0, <2 x double> %a1) ; [#uses=1]
247202 ret i32 %res
248203 }
252207 define i32 @test_x86_sse2_comineq_sd(<2 x double> %a0, <2 x double> %a1) {
253208 ; AVX-LABEL: test_x86_sse2_comineq_sd:
254209 ; AVX: ## BB#0:
255 ; AVX-NEXT: vcomisd %xmm1, %xmm0
256 ; AVX-NEXT: setp %al
257 ; AVX-NEXT: setne %cl
258 ; AVX-NEXT: orb %al, %cl
259 ; AVX-NEXT: movzbl %cl, %eax
260 ; AVX-NEXT: retl
210 ; AVX-NEXT: vcomisd %xmm1, %xmm0 ## encoding: [0xc5,0xf9,0x2f,0xc1]
211 ; AVX-NEXT: setp %al ## encoding: [0x0f,0x9a,0xc0]
212 ; AVX-NEXT: setne %cl ## encoding: [0x0f,0x95,0xc1]
213 ; AVX-NEXT: orb %al, %cl ## encoding: [0x08,0xc1]
214 ; AVX-NEXT: movzbl %cl, %eax ## encoding: [0x0f,0xb6,0xc1]
215 ; AVX-NEXT: retl ## encoding: [0xc3]
261216 ;
262217 ; AVX512VL-LABEL: test_x86_sse2_comineq_sd:
263218 ; AVX512VL: ## BB#0:
264 ; AVX512VL-NEXT: vcomisd %xmm1, %xmm0
265 ; AVX512VL-NEXT: setp %al
266 ; AVX512VL-NEXT: setne %cl
267 ; AVX512VL-NEXT: orb %al, %cl
268 ; AVX512VL-NEXT: movzbl %cl, %eax
269 ; AVX512VL-NEXT: retl
219 ; AVX512VL-NEXT: vcomisd %xmm1, %xmm0 ## encoding: [0x62,0xf1,0xfd,0x08,0x2f,0xc1]
220 ; AVX512VL-NEXT: setp %al ## encoding: [0x0f,0x9a,0xc0]
221 ; AVX512VL-NEXT: setne %cl ## encoding: [0x0f,0x95,0xc1]
222 ; AVX512VL-NEXT: orb %al, %cl ## encoding: [0x08,0xc1]
223 ; AVX512VL-NEXT: movzbl %cl, %eax ## encoding: [0x0f,0xb6,0xc1]
224 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
270225 %res = call i32 @llvm.x86.sse2.comineq.sd(<2 x double> %a0, <2 x double> %a1) ; [#uses=1]
271226 ret i32 %res
272227 }
274229
275230
276231 define <4 x float> @test_x86_sse2_cvtdq2ps(<4 x i32> %a0) {
277 ; AVX-LABEL: test_x86_sse2_cvtdq2ps:
278 ; AVX: ## BB#0:
279 ; AVX-NEXT: vcvtdq2ps %xmm0, %xmm0
280 ; AVX-NEXT: retl
281 ;
282 ; AVX512VL-LABEL: test_x86_sse2_cvtdq2ps:
283 ; AVX512VL: ## BB#0:
284 ; AVX512VL-NEXT: vcvtdq2ps %xmm0, %xmm0
285 ; AVX512VL-NEXT: retl
232 ; CHECK-LABEL: test_x86_sse2_cvtdq2ps:
233 ; CHECK: ## BB#0:
234 ; CHECK-NEXT: vcvtdq2ps %xmm0, %xmm0 ## encoding: [0xc5,0xf8,0x5b,0xc0]
235 ; CHECK-NEXT: retl ## encoding: [0xc3]
286236 %res = call <4 x float> @llvm.x86.sse2.cvtdq2ps(<4 x i32> %a0) ; <<4 x float>> [#uses=1]
287237 ret <4 x float> %res
288238 }
290240
291241
292242 define <4 x i32> @test_x86_sse2_cvtpd2dq(<2 x double> %a0) {
293 ; AVX-LABEL: test_x86_sse2_cvtpd2dq:
294 ; AVX: ## BB#0:
295 ; AVX-NEXT: vcvtpd2dq %xmm0, %xmm0
296 ; AVX-NEXT: retl
297 ;
298 ; AVX512VL-LABEL: test_x86_sse2_cvtpd2dq:
299 ; AVX512VL: ## BB#0:
300 ; AVX512VL-NEXT: vcvtpd2dq %xmm0, %xmm0
301 ; AVX512VL-NEXT: retl
243 ; CHECK-LABEL: test_x86_sse2_cvtpd2dq:
244 ; CHECK: ## BB#0:
245 ; CHECK-NEXT: vcvtpd2dq %xmm0, %xmm0 ## encoding: [0xc5,0xfb,0xe6,0xc0]
246 ; CHECK-NEXT: retl ## encoding: [0xc3]
302247 %res = call <4 x i32> @llvm.x86.sse2.cvtpd2dq(<2 x double> %a0) ; <<4 x i32>> [#uses=1]
303248 ret <4 x i32> %res
304249 }
308253 define <4 x float> @test_x86_sse2_cvtpd2ps(<2 x double> %a0) {
309254 ; AVX-LABEL: test_x86_sse2_cvtpd2ps:
310255 ; AVX: ## BB#0:
311 ; AVX-NEXT: vcvtpd2ps %xmm0, %xmm0
312 ; AVX-NEXT: retl
256 ; AVX-NEXT: vcvtpd2ps %xmm0, %xmm0 ## encoding: [0xc5,0xf9,0x5a,0xc0]
257 ; AVX-NEXT: retl ## encoding: [0xc3]
313258 ;
314259 ; AVX512VL-LABEL: test_x86_sse2_cvtpd2ps:
315260 ; AVX512VL: ## BB#0:
316 ; AVX512VL-NEXT: vcvtpd2ps %xmm0, %xmm0
317 ; AVX512VL-NEXT: retl
261 ; AVX512VL-NEXT: vcvtpd2ps %xmm0, %xmm0 ## encoding: [0x62,0xf1,0xfd,0x08,0x5a,0xc0]
262 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
318263 %res = call <4 x float> @llvm.x86.sse2.cvtpd2ps(<2 x double> %a0) ; <<4 x float>> [#uses=1]
319264 ret <4 x float> %res
320265 }
322267
323268
324269 define <4 x i32> @test_x86_sse2_cvtps2dq(<4 x float> %a0) {
325 ; AVX-LABEL: test_x86_sse2_cvtps2dq:
326 ; AVX: ## BB#0:
327 ; AVX-NEXT: vcvtps2dq %xmm0, %xmm0
328 ; AVX-NEXT: retl
329 ;
330 ; AVX512VL-LABEL: test_x86_sse2_cvtps2dq:
331 ; AVX512VL: ## BB#0:
332 ; AVX512VL-NEXT: vcvtps2dq %xmm0, %xmm0
333 ; AVX512VL-NEXT: retl
270 ; CHECK-LABEL: test_x86_sse2_cvtps2dq:
271 ; CHECK: ## BB#0:
272 ; CHECK-NEXT: vcvtps2dq %xmm0, %xmm0 ## encoding: [0xc5,0xf9,0x5b,0xc0]
273 ; CHECK-NEXT: retl ## encoding: [0xc3]
334274 %res = call <4 x i32> @llvm.x86.sse2.cvtps2dq(<4 x float> %a0) ; <<4 x i32>> [#uses=1]
335275 ret <4 x i32> %res
336276 }
340280 define i32 @test_x86_sse2_cvtsd2si(<2 x double> %a0) {
341281 ; AVX-LABEL: test_x86_sse2_cvtsd2si:
342282 ; AVX: ## BB#0:
343 ; AVX-NEXT: vcvtsd2si %xmm0, %eax
344 ; AVX-NEXT: retl
283 ; AVX-NEXT: vcvtsd2si %xmm0, %eax ## encoding: [0xc5,0xfb,0x2d,0xc0]
284 ; AVX-NEXT: retl ## encoding: [0xc3]
345285 ;
346286 ; AVX512VL-LABEL: test_x86_sse2_cvtsd2si:
347287 ; AVX512VL: ## BB#0:
348 ; AVX512VL-NEXT: vcvtsd2si %xmm0, %eax
349 ; AVX512VL-NEXT: retl
288 ; AVX512VL-NEXT: vcvtsd2si %xmm0, %eax ## encoding: [0x62,0xf1,0x7f,0x08,0x2d,0xc0]
289 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
350290 %res = call i32 @llvm.x86.sse2.cvtsd2si(<2 x double> %a0) ; [#uses=1]
351291 ret i32 %res
352292 }
354294
355295
356296 define <4 x float> @test_x86_sse2_cvtsd2ss(<4 x float> %a0, <2 x double> %a1) {
357 ; AVX-LABEL: test_x86_sse2_cvtsd2ss:
358 ; AVX: ## BB#0:
359 ; AVX-NEXT: vcvtsd2ss %xmm1, %xmm0, %xmm0
360 ; AVX-NEXT: retl
361 ;
362 ; AVX512VL-LABEL: test_x86_sse2_cvtsd2ss:
363 ; AVX512VL: ## BB#0:
364 ; AVX512VL-NEXT: vcvtsd2ss %xmm1, %xmm0, %xmm0
365 ; AVX512VL-NEXT: retl
297 ; CHECK-LABEL: test_x86_sse2_cvtsd2ss:
298 ; CHECK: ## BB#0:
299 ; CHECK-NEXT: vcvtsd2ss %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xfb,0x5a,0xc1]
300 ; CHECK-NEXT: retl ## encoding: [0xc3]
366301 %res = call <4 x float> @llvm.x86.sse2.cvtsd2ss(<4 x float> %a0, <2 x double> %a1) ; <<4 x float>> [#uses=1]
367302 ret <4 x float> %res
368303 }
372307 define <2 x double> @test_x86_sse2_cvtsi2sd(<2 x double> %a0, i32 %a1) {
373308 ; AVX-LABEL: test_x86_sse2_cvtsi2sd:
374309 ; AVX: ## BB#0:
375 ; AVX-NEXT: vcvtsi2sdl {{[0-9]+}}(%esp), %xmm0, %xmm0
376 ; AVX-NEXT: retl
310 ; AVX-NEXT: vcvtsi2sdl {{[0-9]+}}(%esp), %xmm0, %xmm0 ## encoding: [0xc5,0xfb,0x2a,0x44,0x24,0x04]
311 ; AVX-NEXT: retl ## encoding: [0xc3]
377312 ;
378313 ; AVX512VL-LABEL: test_x86_sse2_cvtsi2sd:
379314 ; AVX512VL: ## BB#0:
380 ; AVX512VL-NEXT: vcvtsi2sdl {{[0-9]+}}(%esp), %xmm0, %xmm0
381 ; AVX512VL-NEXT: retl
315 ; AVX512VL-NEXT: vcvtsi2sdl {{[0-9]+}}(%esp), %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7f,0x08,0x2a,0x44,0x24,0x01]
316 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
382317 %res = call <2 x double> @llvm.x86.sse2.cvtsi2sd(<2 x double> %a0, i32 %a1) ; <<2 x double>> [#uses=1]
383318 ret <2 x double> %res
384319 }
386321
387322
388323 define <2 x double> @test_x86_sse2_cvtss2sd(<2 x double> %a0, <4 x float> %a1) {
389 ; AVX-LABEL: test_x86_sse2_cvtss2sd:
390 ; AVX: ## BB#0:
391 ; AVX-NEXT: vcvtss2sd %xmm1, %xmm0, %xmm0
392 ; AVX-NEXT: retl
393 ;
394 ; AVX512VL-LABEL: test_x86_sse2_cvtss2sd:
395 ; AVX512VL: ## BB#0:
396 ; AVX512VL-NEXT: vcvtss2sd %xmm1, %xmm0, %xmm0
397 ; AVX512VL-NEXT: retl
324 ; CHECK-LABEL: test_x86_sse2_cvtss2sd:
325 ; CHECK: ## BB#0:
326 ; CHECK-NEXT: vcvtss2sd %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xfa,0x5a,0xc1]
327 ; CHECK-NEXT: retl ## encoding: [0xc3]
398328 %res = call <2 x double> @llvm.x86.sse2.cvtss2sd(<2 x double> %a0, <4 x float> %a1) ; <<2 x double>> [#uses=1]
399329 ret <2 x double> %res
400330 }
402332
403333
404334 define <4 x i32> @test_x86_sse2_cvttpd2dq(<2 x double> %a0) {
405 ; AVX-LABEL: test_x86_sse2_cvttpd2dq:
406 ; AVX: ## BB#0:
407 ; AVX-NEXT: vcvttpd2dq %xmm0, %xmm0
408 ; AVX-NEXT: retl
409 ;
410 ; AVX512VL-LABEL: test_x86_sse2_cvttpd2dq:
411 ; AVX512VL: ## BB#0:
412 ; AVX512VL-NEXT: vcvttpd2dq %xmm0, %xmm0
413 ; AVX512VL-NEXT: retl
335 ; CHECK-LABEL: test_x86_sse2_cvttpd2dq:
336 ; CHECK: ## BB#0:
337 ; CHECK-NEXT: vcvttpd2dq %xmm0, %xmm0 ## encoding: [0xc5,0xf9,0xe6,0xc0]
338 ; CHECK-NEXT: retl ## encoding: [0xc3]
414339 %res = call <4 x i32> @llvm.x86.sse2.cvttpd2dq(<2 x double> %a0) ; <<4 x i32>> [#uses=1]
415340 ret <4 x i32> %res
416341 }
418343
419344
420345 define <4 x i32> @test_x86_sse2_cvttps2dq(<4 x float> %a0) {
421 ; AVX-LABEL: test_x86_sse2_cvttps2dq:
422 ; AVX: ## BB#0:
423 ; AVX-NEXT: vcvttps2dq %xmm0, %xmm0
424 ; AVX-NEXT: retl
425 ;
426 ; AVX512VL-LABEL: test_x86_sse2_cvttps2dq:
427 ; AVX512VL: ## BB#0:
428 ; AVX512VL-NEXT: vcvttps2dq %xmm0, %xmm0
429 ; AVX512VL-NEXT: retl
346 ; CHECK-LABEL: test_x86_sse2_cvttps2dq:
347 ; CHECK: ## BB#0:
348 ; CHECK-NEXT: vcvttps2dq %xmm0, %xmm0 ## encoding: [0xc5,0xfa,0x5b,0xc0]
349 ; CHECK-NEXT: retl ## encoding: [0xc3]
430350 %res = call <4 x i32> @llvm.x86.sse2.cvttps2dq(<4 x float> %a0) ; <<4 x i32>> [#uses=1]
431351 ret <4 x i32> %res
432352 }
436356 define i32 @test_x86_sse2_cvttsd2si(<2 x double> %a0) {
437357 ; AVX-LABEL: test_x86_sse2_cvttsd2si:
438358 ; AVX: ## BB#0:
439 ; AVX-NEXT: vcvttsd2si %xmm0, %eax
440 ; AVX-NEXT: retl
359 ; AVX-NEXT: vcvttsd2si %xmm0, %eax ## encoding: [0xc5,0xfb,0x2c,0xc0]
360 ; AVX-NEXT: retl ## encoding: [0xc3]
441361 ;
442362 ; AVX512VL-LABEL: test_x86_sse2_cvttsd2si:
443363 ; AVX512VL: ## BB#0:
444 ; AVX512VL-NEXT: vcvttsd2si %xmm0, %eax
445 ; AVX512VL-NEXT: retl
364 ; AVX512VL-NEXT: vcvttsd2si %xmm0, %eax ## encoding: [0x62,0xf1,0x7f,0x08,0x2c,0xc0]
365 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
446366 %res = call i32 @llvm.x86.sse2.cvttsd2si(<2 x double> %a0) ; [#uses=1]
447367 ret i32 %res
448368 }
450370
451371
452372 define <2 x double> @test_x86_sse2_div_sd(<2 x double> %a0, <2 x double> %a1) {
453 ; AVX-LABEL: test_x86_sse2_div_sd:
454 ; AVX: ## BB#0:
455 ; AVX-NEXT: vdivsd %xmm1, %xmm0, %xmm0
456 ; AVX-NEXT: retl
457 ;
458 ; AVX512VL-LABEL: test_x86_sse2_div_sd:
459 ; AVX512VL: ## BB#0:
460 ; AVX512VL-NEXT: vdivsd %xmm1, %xmm0, %xmm0
461 ; AVX512VL-NEXT: retl
373 ; CHECK-LABEL: test_x86_sse2_div_sd:
374 ; CHECK: ## BB#0:
375 ; CHECK-NEXT: vdivsd %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xfb,0x5e,0xc1]
376 ; CHECK-NEXT: retl ## encoding: [0xc3]
462377 %res = call <2 x double> @llvm.x86.sse2.div.sd(<2 x double> %a0, <2 x double> %a1) ; <<2 x double>> [#uses=1]
463378 ret <2 x double> %res
464379 }
469384 define <2 x double> @test_x86_sse2_max_pd(<2 x double> %a0, <2 x double> %a1) {
470385 ; AVX-LABEL: test_x86_sse2_max_pd:
471386 ; AVX: ## BB#0:
472 ; AVX-NEXT: vmaxpd %xmm1, %xmm0, %xmm0
473 ; AVX-NEXT: retl
387 ; AVX-NEXT: vmaxpd %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xf9,0x5f,0xc1]
388 ; AVX-NEXT: retl ## encoding: [0xc3]
474389 ;
475390 ; AVX512VL-LABEL: test_x86_sse2_max_pd:
476391 ; AVX512VL: ## BB#0:
477 ; AVX512VL-NEXT: vmaxpd %xmm1, %xmm0, %xmm0
478 ; AVX512VL-NEXT: retl
392 ; AVX512VL-NEXT: vmaxpd %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0xfd,0x08,0x5f,0xc1]
393 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
479394 %res = call <2 x double> @llvm.x86.sse2.max.pd(<2 x double> %a0, <2 x double> %a1) ; <<2 x double>> [#uses=1]
480395 ret <2 x double> %res
481396 }
483398
484399
485400 define <2 x double> @test_x86_sse2_max_sd(<2 x double> %a0, <2 x double> %a1) {
486 ; AVX-LABEL: test_x86_sse2_max_sd:
487 ; AVX: ## BB#0:
488 ; AVX-NEXT: vmaxsd %xmm1, %xmm0, %xmm0
489 ; AVX-NEXT: retl
490 ;
491 ; AVX512VL-LABEL: test_x86_sse2_max_sd:
492 ; AVX512VL: ## BB#0:
493 ; AVX512VL-NEXT: vmaxsd %xmm1, %xmm0, %xmm0
494 ; AVX512VL-NEXT: retl
401 ; CHECK-LABEL: test_x86_sse2_max_sd:
402 ; CHECK: ## BB#0:
403 ; CHECK-NEXT: vmaxsd %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xfb,0x5f,0xc1]
404 ; CHECK-NEXT: retl ## encoding: [0xc3]
495405 %res = call <2 x double> @llvm.x86.sse2.max.sd(<2 x double> %a0, <2 x double> %a1) ; <<2 x double>> [#uses=1]
496406 ret <2 x double> %res
497407 }
501411 define <2 x double> @test_x86_sse2_min_pd(<2 x double> %a0, <2 x double> %a1) {
502412 ; AVX-LABEL: test_x86_sse2_min_pd:
503413 ; AVX: ## BB#0:
504 ; AVX-NEXT: vminpd %xmm1, %xmm0, %xmm0
505 ; AVX-NEXT: retl
414 ; AVX-NEXT: vminpd %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xf9,0x5d,0xc1]
415 ; AVX-NEXT: retl ## encoding: [0xc3]
506416 ;
507417 ; AVX512VL-LABEL: test_x86_sse2_min_pd:
508418 ; AVX512VL: ## BB#0:
509 ; AVX512VL-NEXT: vminpd %xmm1, %xmm0, %xmm0
510 ; AVX512VL-NEXT: retl
419 ; AVX512VL-NEXT: vminpd %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0xfd,0x08,0x5d,0xc1]
420 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
511421 %res = call <2 x double> @llvm.x86.sse2.min.pd(<2 x double> %a0, <2 x double> %a1) ; <<2 x double>> [#uses=1]
512422 ret <2 x double> %res
513423 }
515425
516426
517427 define <2 x double> @test_x86_sse2_min_sd(<2 x double> %a0, <2 x double> %a1) {
518 ; AVX-LABEL: test_x86_sse2_min_sd:
519 ; AVX: ## BB#0:
520 ; AVX-NEXT: vminsd %xmm1, %xmm0, %xmm0
521 ; AVX-NEXT: retl
522 ;
523 ; AVX512VL-LABEL: test_x86_sse2_min_sd:
524 ; AVX512VL: ## BB#0:
525 ; AVX512VL-NEXT: vminsd %xmm1, %xmm0, %xmm0
526 ; AVX512VL-NEXT: retl
428 ; CHECK-LABEL: test_x86_sse2_min_sd:
429 ; CHECK: ## BB#0:
430 ; CHECK-NEXT: vminsd %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xfb,0x5d,0xc1]
431 ; CHECK-NEXT: retl ## encoding: [0xc3]
527432 %res = call <2 x double> @llvm.x86.sse2.min.sd(<2 x double> %a0, <2 x double> %a1) ; <<2 x double>> [#uses=1]
528433 ret <2 x double> %res
529434 }
531436
532437
533438 define i32 @test_x86_sse2_movmsk_pd(<2 x double> %a0) {
534 ; AVX-LABEL: test_x86_sse2_movmsk_pd:
535 ; AVX: ## BB#0:
536 ; AVX-NEXT: vmovmskpd %xmm0, %eax
537 ; AVX-NEXT: retl
538 ;
539 ; AVX512VL-LABEL: test_x86_sse2_movmsk_pd:
540 ; AVX512VL: ## BB#0:
541 ; AVX512VL-NEXT: vmovmskpd %xmm0, %eax
542 ; AVX512VL-NEXT: retl
439 ; CHECK-LABEL: test_x86_sse2_movmsk_pd:
440 ; CHECK: ## BB#0:
441 ; CHECK-NEXT: vmovmskpd %xmm0, %eax ## encoding: [0xc5,0xf9,0x50,0xc0]
442 ; CHECK-NEXT: retl ## encoding: [0xc3]
543443 %res = call i32 @llvm.x86.sse2.movmsk.pd(<2 x double> %a0) ; [#uses=1]
544444 ret i32 %res
545445 }
549449
550450
551451 define <2 x double> @test_x86_sse2_mul_sd(<2 x double> %a0, <2 x double> %a1) {
552 ; AVX-LABEL: test_x86_sse2_mul_sd:
553 ; AVX: ## BB#0:
554 ; AVX-NEXT: vmulsd %xmm1, %xmm0, %xmm0
555 ; AVX-NEXT: retl
556 ;
557 ; AVX512VL-LABEL: test_x86_sse2_mul_sd:
558 ; AVX512VL: ## BB#0:
559 ; AVX512VL-NEXT: vmulsd %xmm1, %xmm0, %xmm0
560 ; AVX512VL-NEXT: retl
452 ; CHECK-LABEL: test_x86_sse2_mul_sd:
453 ; CHECK: ## BB#0:
454 ; CHECK-NEXT: vmulsd %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xfb,0x59,0xc1]
455 ; CHECK-NEXT: retl ## encoding: [0xc3]
561456 %res = call <2 x double> @llvm.x86.sse2.mul.sd(<2 x double> %a0, <2 x double> %a1) ; <<2 x double>> [#uses=1]
562457 ret <2 x double> %res
563458 }
567462 define <8 x i16> @test_x86_sse2_packssdw_128(<4 x i32> %a0, <4 x i32> %a1) {
568463 ; AVX-LABEL: test_x86_sse2_packssdw_128:
569464 ; AVX: ## BB#0:
570 ; AVX-NEXT: vpackssdw %xmm1, %xmm0, %xmm0
571 ; AVX-NEXT: retl
465 ; AVX-NEXT: vpackssdw %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xf9,0x6b,0xc1]
466 ; AVX-NEXT: retl ## encoding: [0xc3]
572467 ;
573468 ; AVX512VL-LABEL: test_x86_sse2_packssdw_128:
574469 ; AVX512VL: ## BB#0:
575 ; AVX512VL-NEXT: vpackssdw %xmm1, %xmm0, %xmm0
576 ; AVX512VL-NEXT: retl
470 ; AVX512VL-NEXT: vpackssdw %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x08,0x6b,0xc1]
471 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
577472 %res = call <8 x i16> @llvm.x86.sse2.packssdw.128(<4 x i32> %a0, <4 x i32> %a1) ; <<8 x i16>> [#uses=1]
578473 ret <8 x i16> %res
579474 }
583478 define <16 x i8> @test_x86_sse2_packsswb_128(<8 x i16> %a0, <8 x i16> %a1) {
584479 ; AVX-LABEL: test_x86_sse2_packsswb_128:
585480 ; AVX: ## BB#0:
586 ; AVX-NEXT: vpacksswb %xmm1, %xmm0, %xmm0
587 ; AVX-NEXT: retl
481 ; AVX-NEXT: vpacksswb %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xf9,0x63,0xc1]
482 ; AVX-NEXT: retl ## encoding: [0xc3]
588483 ;
589484 ; AVX512VL-LABEL: test_x86_sse2_packsswb_128:
590485 ; AVX512VL: ## BB#0:
591 ; AVX512VL-NEXT: vpacksswb %xmm1, %xmm0, %xmm0
592 ; AVX512VL-NEXT: retl
486 ; AVX512VL-NEXT: vpacksswb %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x08,0x63,0xc1]
487 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
593488 %res = call <16 x i8> @llvm.x86.sse2.packsswb.128(<8 x i16> %a0, <8 x i16> %a1) ; <<16 x i8>> [#uses=1]
594489 ret <16 x i8> %res
595490 }
599494 define <16 x i8> @test_x86_sse2_packuswb_128(<8 x i16> %a0, <8 x i16> %a1) {
600495 ; AVX-LABEL: test_x86_sse2_packuswb_128:
601496 ; AVX: ## BB#0:
602 ; AVX-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
603 ; AVX-NEXT: retl
497 ; AVX-NEXT: vpackuswb %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xf9,0x67,0xc1]
498 ; AVX-NEXT: retl ## encoding: [0xc3]
604499 ;
605500 ; AVX512VL-LABEL: test_x86_sse2_packuswb_128:
606501 ; AVX512VL: ## BB#0:
607 ; AVX512VL-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
608 ; AVX512VL-NEXT: retl
502 ; AVX512VL-NEXT: vpackuswb %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x08,0x67,0xc1]
503 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
609504 %res = call <16 x i8> @llvm.x86.sse2.packuswb.128(<8 x i16> %a0, <8 x i16> %a1) ; <<16 x i8>> [#uses=1]
610505 ret <16 x i8> %res
611506 }
615510 define <16 x i8> @test_x86_sse2_padds_b(<16 x i8> %a0, <16 x i8> %a1) {
616511 ; AVX-LABEL: test_x86_sse2_padds_b:
617512 ; AVX: ## BB#0:
618 ; AVX-NEXT: vpaddsb %xmm1, %xmm0, %xmm0
619 ; AVX-NEXT: retl
513 ; AVX-NEXT: vpaddsb %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xf9,0xec,0xc1]
514 ; AVX-NEXT: retl ## encoding: [0xc3]
620515 ;
621516 ; AVX512VL-LABEL: test_x86_sse2_padds_b:
622517 ; AVX512VL: ## BB#0:
623 ; AVX512VL-NEXT: vpaddsb %xmm1, %xmm0, %xmm0
624 ; AVX512VL-NEXT: retl
518 ; AVX512VL-NEXT: vpaddsb %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x08,0xec,0xc1]
519 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
625520 %res = call <16 x i8> @llvm.x86.sse2.padds.b(<16 x i8> %a0, <16 x i8> %a1) ; <<16 x i8>> [#uses=1]
626521 ret <16 x i8> %res
627522 }
631526 define <8 x i16> @test_x86_sse2_padds_w(<8 x i16> %a0, <8 x i16> %a1) {
632527 ; AVX-LABEL: test_x86_sse2_padds_w:
633528 ; AVX: ## BB#0:
634 ; AVX-NEXT: vpaddsw %xmm1, %xmm0, %xmm0
635 ; AVX-NEXT: retl
529 ; AVX-NEXT: vpaddsw %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xf9,0xed,0xc1]
530 ; AVX-NEXT: retl ## encoding: [0xc3]
636531 ;
637532 ; AVX512VL-LABEL: test_x86_sse2_padds_w:
638533 ; AVX512VL: ## BB#0:
639 ; AVX512VL-NEXT: vpaddsw %xmm1, %xmm0, %xmm0
640 ; AVX512VL-NEXT: retl
534 ; AVX512VL-NEXT: vpaddsw %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x08,0xed,0xc1]
535 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
641536 %res = call <8 x i16> @llvm.x86.sse2.padds.w(<8 x i16> %a0, <8 x i16> %a1) ; <<8 x i16>> [#uses=1]
642537 ret <8 x i16> %res
643538 }
647542 define <16 x i8> @test_x86_sse2_paddus_b(<16 x i8> %a0, <16 x i8> %a1) {
648543 ; AVX-LABEL: test_x86_sse2_paddus_b:
649544 ; AVX: ## BB#0:
650 ; AVX-NEXT: vpaddusb %xmm1, %xmm0, %xmm0
651 ; AVX-NEXT: retl
545 ; AVX-NEXT: vpaddusb %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xf9,0xdc,0xc1]
546 ; AVX-NEXT: retl ## encoding: [0xc3]
652547 ;
653548 ; AVX512VL-LABEL: test_x86_sse2_paddus_b:
654549 ; AVX512VL: ## BB#0:
655 ; AVX512VL-NEXT: vpaddusb %xmm1, %xmm0, %xmm0
656 ; AVX512VL-NEXT: retl
550 ; AVX512VL-NEXT: vpaddusb %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x08,0xdc,0xc1]
551 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
657552 %res = call <16 x i8> @llvm.x86.sse2.paddus.b(<16 x i8> %a0, <16 x i8> %a1) ; <<16 x i8>> [#uses=1]
658553 ret <16 x i8> %res
659554 }
663558 define <8 x i16> @test_x86_sse2_paddus_w(<8 x i16> %a0, <8 x i16> %a1) {
664559 ; AVX-LABEL: test_x86_sse2_paddus_w:
665560 ; AVX: ## BB#0:
666 ; AVX-NEXT: vpaddusw %xmm1, %xmm0, %xmm0
667 ; AVX-NEXT: retl
561 ; AVX-NEXT: vpaddusw %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xf9,0xdd,0xc1]
562 ; AVX-NEXT: retl ## encoding: [0xc3]
668563 ;
669564 ; AVX512VL-LABEL: test_x86_sse2_paddus_w:
670565 ; AVX512VL: ## BB#0:
671 ; AVX512VL-NEXT: vpaddusw %xmm1, %xmm0, %xmm0
672 ; AVX512VL-NEXT: retl
566 ; AVX512VL-NEXT: vpaddusw %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x08,0xdd,0xc1]
567 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
673568 %res = call <8 x i16> @llvm.x86.sse2.paddus.w(<8 x i16> %a0, <8 x i16> %a1) ; <<8 x i16>> [#uses=1]
674569 ret <8 x i16> %res
675570 }
679574 define <16 x i8> @test_x86_sse2_pavg_b(<16 x i8> %a0, <16 x i8> %a1) {
680575 ; AVX-LABEL: test_x86_sse2_pavg_b:
681576 ; AVX: ## BB#0:
682 ; AVX-NEXT: vpavgb %xmm1, %xmm0, %xmm0
683 ; AVX-NEXT: retl
577 ; AVX-NEXT: vpavgb %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xf9,0xe0,0xc1]
578 ; AVX-NEXT: retl ## encoding: [0xc3]
684579 ;
685580 ; AVX512VL-LABEL: test_x86_sse2_pavg_b:
686581 ; AVX512VL: ## BB#0:
687 ; AVX512VL-NEXT: vpavgb %xmm1, %xmm0, %xmm0
688 ; AVX512VL-NEXT: retl
582 ; AVX512VL-NEXT: vpavgb %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x08,0xe0,0xc1]
583 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
689584 %res = call <16 x i8> @llvm.x86.sse2.pavg.b(<16 x i8> %a0, <16 x i8> %a1) ; <<16 x i8>> [#uses=1]
690585 ret <16 x i8> %res
691586 }
695590 define <8 x i16> @test_x86_sse2_pavg_w(<8 x i16> %a0, <8 x i16> %a1) {
696591 ; AVX-LABEL: test_x86_sse2_pavg_w:
697592 ; AVX: ## BB#0:
698 ; AVX-NEXT: vpavgw %xmm1, %xmm0, %xmm0
699 ; AVX-NEXT: retl
593 ; AVX-NEXT: vpavgw %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xf9,0xe3,0xc1]
594 ; AVX-NEXT: retl ## encoding: [0xc3]
700595 ;
701596 ; AVX512VL-LABEL: test_x86_sse2_pavg_w:
702597 ; AVX512VL: ## BB#0:
703 ; AVX512VL-NEXT: vpavgw %xmm1, %xmm0, %xmm0
704 ; AVX512VL-NEXT: retl
598 ; AVX512VL-NEXT: vpavgw %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x08,0xe3,0xc1]
599 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
705600 %res = call <8 x i16> @llvm.x86.sse2.pavg.w(<8 x i16> %a0, <8 x i16> %a1) ; <<8 x i16>> [#uses=1]
706601 ret <8 x i16> %res
707602 }
711606 define <4 x i32> @test_x86_sse2_pmadd_wd(<8 x i16> %a0, <8 x i16> %a1) {
712607 ; AVX-LABEL: test_x86_sse2_pmadd_wd:
713608 ; AVX: ## BB#0:
714 ; AVX-NEXT: vpmaddwd %xmm1, %xmm0, %xmm0
715 ; AVX-NEXT: retl
609 ; AVX-NEXT: vpmaddwd %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xf9,0xf5,0xc1]
610 ; AVX-NEXT: retl ## encoding: [0xc3]
716611 ;
717612 ; AVX512VL-LABEL: test_x86_sse2_pmadd_wd:
718613 ; AVX512VL: ## BB#0:
719 ; AVX512VL-NEXT: vpmaddwd %xmm1, %xmm0, %xmm0
720 ; AVX512VL-NEXT: retl
614 ; AVX512VL-NEXT: vpmaddwd %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x08,0xf5,0xc1]
615 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
721616 %res = call <4 x i32> @llvm.x86.sse2.pmadd.wd(<8 x i16> %a0, <8 x i16> %a1) ; <<4 x i32>> [#uses=1]
722617 ret <4 x i32> %res
723618 }
727622 define <8 x i16> @test_x86_sse2_pmaxs_w(<8 x i16> %a0, <8 x i16> %a1) {
728623 ; AVX-LABEL: test_x86_sse2_pmaxs_w:
729624 ; AVX: ## BB#0:
730 ; AVX-NEXT: vpmaxsw %xmm1, %xmm0, %xmm0
731 ; AVX-NEXT: retl
625 ; AVX-NEXT: vpmaxsw %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xf9,0xee,0xc1]
626 ; AVX-NEXT: retl ## encoding: [0xc3]
732627 ;
733628 ; AVX512VL-LABEL: test_x86_sse2_pmaxs_w:
734629 ; AVX512VL: ## BB#0:
735 ; AVX512VL-NEXT: vpmaxsw %xmm1, %xmm0, %xmm0
736 ; AVX512VL-NEXT: retl
630 ; AVX512VL-NEXT: vpmaxsw %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x08,0xee,0xc1]
631 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
737632 %res = call <8 x i16> @llvm.x86.sse2.pmaxs.w(<8 x i16> %a0, <8 x i16> %a1) ; <<8 x i16>> [#uses=1]
738633 ret <8 x i16> %res
739634 }
743638 define <16 x i8> @test_x86_sse2_pmaxu_b(<16 x i8> %a0, <16 x i8> %a1) {
744639 ; AVX-LABEL: test_x86_sse2_pmaxu_b:
745640 ; AVX: ## BB#0:
746 ; AVX-NEXT: vpmaxub %xmm1, %xmm0, %xmm0
747 ; AVX-NEXT: retl
641 ; AVX-NEXT: vpmaxub %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xf9,0xde,0xc1]
642 ; AVX-NEXT: retl ## encoding: [0xc3]
748643 ;
749644 ; AVX512VL-LABEL: test_x86_sse2_pmaxu_b:
750645 ; AVX512VL: ## BB#0:
751 ; AVX512VL-NEXT: vpmaxub %xmm1, %xmm0, %xmm0
752 ; AVX512VL-NEXT: retl
646 ; AVX512VL-NEXT: vpmaxub %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x08,0xde,0xc1]
647 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
753648 %res = call <16 x i8> @llvm.x86.sse2.pmaxu.b(<16 x i8> %a0, <16 x i8> %a1) ; <<16 x i8>> [#uses=1]
754649 ret <16 x i8> %res
755650 }
759654 define <8 x i16> @test_x86_sse2_pmins_w(<8 x i16> %a0, <8 x i16> %a1) {
760655 ; AVX-LABEL: test_x86_sse2_pmins_w:
761656 ; AVX: ## BB#0:
762 ; AVX-NEXT: vpminsw %xmm1, %xmm0, %xmm0
763 ; AVX-NEXT: retl
657 ; AVX-NEXT: vpminsw %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xf9,0xea,0xc1]
658 ; AVX-NEXT: retl ## encoding: [0xc3]
764659 ;
765660 ; AVX512VL-LABEL: test_x86_sse2_pmins_w:
766661 ; AVX512VL: ## BB#0:
767 ; AVX512VL-NEXT: vpminsw %xmm1, %xmm0, %xmm0
768 ; AVX512VL-NEXT: retl
662 ; AVX512VL-NEXT: vpminsw %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x08,0xea,0xc1]
663 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
769664 %res = call <8 x i16> @llvm.x86.sse2.pmins.w(<8 x i16> %a0, <8 x i16> %a1) ; <<8 x i16>> [#uses=1]
770665 ret <8 x i16> %res
771666 }
775670 define <16 x i8> @test_x86_sse2_pminu_b(<16 x i8> %a0, <16 x i8> %a1) {
776671 ; AVX-LABEL: test_x86_sse2_pminu_b:
777672 ; AVX: ## BB#0:
778 ; AVX-NEXT: vpminub %xmm1, %xmm0, %xmm0
779 ; AVX-NEXT: retl
673 ; AVX-NEXT: vpminub %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xf9,0xda,0xc1]
674 ; AVX-NEXT: retl ## encoding: [0xc3]
780675 ;
781676 ; AVX512VL-LABEL: test_x86_sse2_pminu_b:
782677 ; AVX512VL: ## BB#0:
783 ; AVX512VL-NEXT: vpminub %xmm1, %xmm0, %xmm0
784 ; AVX512VL-NEXT: retl
678 ; AVX512VL-NEXT: vpminub %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x08,0xda,0xc1]
679 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
785680 %res = call <16 x i8> @llvm.x86.sse2.pminu.b(<16 x i8> %a0, <16 x i8> %a1) ; <<16 x i8>> [#uses=1]
786681 ret <16 x i8> %res
787682 }
789684
790685
791686 define i32 @test_x86_sse2_pmovmskb_128(<16 x i8> %a0) {
792 ; AVX-LABEL: test_x86_sse2_pmovmskb_128:
793 ; AVX: ## BB#0:
794 ; AVX-NEXT: vpmovmskb %xmm0, %eax
795 ; AVX-NEXT: retl
796 ;
797 ; AVX512VL-LABEL: test_x86_sse2_pmovmskb_128:
798 ; AVX512VL: ## BB#0:
799 ; AVX512VL-NEXT: vpmovmskb %xmm0, %eax
800 ; AVX512VL-NEXT: retl
687 ; CHECK-LABEL: test_x86_sse2_pmovmskb_128:
688 ; CHECK: ## BB#0:
689 ; CHECK-NEXT: vpmovmskb %xmm0, %eax ## encoding: [0xc5,0xf9,0xd7,0xc0]
690 ; CHECK-NEXT: retl ## encoding: [0xc3]
801691 %res = call i32 @llvm.x86.sse2.pmovmskb.128(<16 x i8> %a0) ; [#uses=1]
802692 ret i32 %res
803693 }
807697 define <8 x i16> @test_x86_sse2_pmulh_w(<8 x i16> %a0, <8 x i16> %a1) {
808698 ; AVX-LABEL: test_x86_sse2_pmulh_w:
809699 ; AVX: ## BB#0:
810 ; AVX-NEXT: vpmulhw %xmm1, %xmm0, %xmm0
811 ; AVX-NEXT: retl
700 ; AVX-NEXT: vpmulhw %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xf9,0xe5,0xc1]
701 ; AVX-NEXT: retl ## encoding: [0xc3]
812702 ;
813703 ; AVX512VL-LABEL: test_x86_sse2_pmulh_w:
814704 ; AVX512VL: ## BB#0:
815 ; AVX512VL-NEXT: vpmulhw %xmm1, %xmm0, %xmm0
816 ; AVX512VL-NEXT: retl
705 ; AVX512VL-NEXT: vpmulhw %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x08,0xe5,0xc1]
706 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
817707 %res = call <8 x i16> @llvm.x86.sse2.pmulh.w(<8 x i16> %a0, <8 x i16> %a1) ; <<8 x i16>> [#uses=1]
818708 ret <8 x i16> %res
819709 }
823713 define <8 x i16> @test_x86_sse2_pmulhu_w(<8 x i16> %a0, <8 x i16> %a1) {
824714 ; AVX-LABEL: test_x86_sse2_pmulhu_w:
825715 ; AVX: ## BB#0:
826 ; AVX-NEXT: vpmulhuw %xmm1, %xmm0, %xmm0
827 ; AVX-NEXT: retl
716 ; AVX-NEXT: vpmulhuw %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xf9,0xe4,0xc1]
717 ; AVX-NEXT: retl ## encoding: [0xc3]
828718 ;
829719 ; AVX512VL-LABEL: test_x86_sse2_pmulhu_w:
830720 ; AVX512VL: ## BB#0:
831 ; AVX512VL-NEXT: vpmulhuw %xmm1, %xmm0, %xmm0
832 ; AVX512VL-NEXT: retl
721 ; AVX512VL-NEXT: vpmulhuw %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x08,0xe4,0xc1]
722 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
833723 %res = call <8 x i16> @llvm.x86.sse2.pmulhu.w(<8 x i16> %a0, <8 x i16> %a1) ; <<8 x i16>> [#uses=1]
834724 ret <8 x i16> %res
835725 }
839729 define <2 x i64> @test_x86_sse2_pmulu_dq(<4 x i32> %a0, <4 x i32> %a1) {
840730 ; AVX-LABEL: test_x86_sse2_pmulu_dq:
841731 ; AVX: ## BB#0:
842 ; AVX-NEXT: vpmuludq %xmm1, %xmm0, %xmm0
843 ; AVX-NEXT: retl
732 ; AVX-NEXT: vpmuludq %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xf9,0xf4,0xc1]
733 ; AVX-NEXT: retl ## encoding: [0xc3]
844734 ;
845735 ; AVX512VL-LABEL: test_x86_sse2_pmulu_dq:
846736 ; AVX512VL: ## BB#0:
847 ; AVX512VL-NEXT: vpmuludq %xmm1, %xmm0, %xmm0
848 ; AVX512VL-NEXT: retl
737 ; AVX512VL-NEXT: vpmuludq %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0xfd,0x08,0xf4,0xc1]
738 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
849739 %res = call <2 x i64> @llvm.x86.sse2.pmulu.dq(<4 x i32> %a0, <4 x i32> %a1) ; <<2 x i64>> [#uses=1]
850740 ret <2 x i64> %res
851741 }
855745 define <2 x i64> @test_x86_sse2_psad_bw(<16 x i8> %a0, <16 x i8> %a1) {
856746 ; AVX-LABEL: test_x86_sse2_psad_bw:
857747 ; AVX: ## BB#0:
858 ; AVX-NEXT: vpsadbw %xmm1, %xmm0, %xmm0
859 ; AVX-NEXT: retl
748 ; AVX-NEXT: vpsadbw %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xf9,0xf6,0xc1]
749 ; AVX-NEXT: retl ## encoding: [0xc3]
860750 ;
861751 ; AVX512VL-LABEL: test_x86_sse2_psad_bw:
862752 ; AVX512VL: ## BB#0:
863 ; AVX512VL-NEXT: vpsadbw %xmm1, %xmm0, %xmm0
864 ; AVX512VL-NEXT: retl
753 ; AVX512VL-NEXT: vpsadbw %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x08,0xf6,0xc1]
754 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
865755 %res = call <2 x i64> @llvm.x86.sse2.psad.bw(<16 x i8> %a0, <16 x i8> %a1) ; <<2 x i64>> [#uses=1]
866756 ret <2 x i64> %res
867757 }
871761 define <4 x i32> @test_x86_sse2_psll_d(<4 x i32> %a0, <4 x i32> %a1) {
872762 ; AVX-LABEL: test_x86_sse2_psll_d:
873763 ; AVX: ## BB#0:
874 ; AVX-NEXT: vpslld %xmm1, %xmm0, %xmm0
875 ; AVX-NEXT: retl
764 ; AVX-NEXT: vpslld %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xf9,0xf2,0xc1]
765 ; AVX-NEXT: retl ## encoding: [0xc3]
876766 ;
877767 ; AVX512VL-LABEL: test_x86_sse2_psll_d:
878768 ; AVX512VL: ## BB#0:
879 ; AVX512VL-NEXT: vpslld %xmm1, %xmm0, %xmm0
880 ; AVX512VL-NEXT: retl
769 ; AVX512VL-NEXT: vpslld %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x08,0xf2,0xc1]
770 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
881771 %res = call <4 x i32> @llvm.x86.sse2.psll.d(<4 x i32> %a0, <4 x i32> %a1) ; <<4 x i32>> [#uses=1]
882772 ret <4 x i32> %res
883773 }
887777 define <2 x i64> @test_x86_sse2_psll_q(<2 x i64> %a0, <2 x i64> %a1) {
888778 ; AVX-LABEL: test_x86_sse2_psll_q:
889779 ; AVX: ## BB#0:
890 ; AVX-NEXT: vpsllq %xmm1, %xmm0, %xmm0
891 ; AVX-NEXT: retl
780 ; AVX-NEXT: vpsllq %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xf9,0xf3,0xc1]
781 ; AVX-NEXT: retl ## encoding: [0xc3]
892782 ;
893783 ; AVX512VL-LABEL: test_x86_sse2_psll_q:
894784 ; AVX512VL: ## BB#0:
895 ; AVX512VL-NEXT: vpsllq %xmm1, %xmm0, %xmm0
896 ; AVX512VL-NEXT: retl
785 ; AVX512VL-NEXT: vpsllq %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0xfd,0x08,0xf3,0xc1]
786 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
897787 %res = call <2 x i64> @llvm.x86.sse2.psll.q(<2 x i64> %a0, <2 x i64> %a1) ; <<2 x i64>> [#uses=1]
898788 ret <2 x i64> %res
899789 }
903793 define <8 x i16> @test_x86_sse2_psll_w(<8 x i16> %a0, <8 x i16> %a1) {
904794 ; AVX-LABEL: test_x86_sse2_psll_w:
905795 ; AVX: ## BB#0:
906 ; AVX-NEXT: vpsllw %xmm1, %xmm0, %xmm0
907 ; AVX-NEXT: retl
796 ; AVX-NEXT: vpsllw %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xf9,0xf1,0xc1]
797 ; AVX-NEXT: retl ## encoding: [0xc3]
908798 ;
909799 ; AVX512VL-LABEL: test_x86_sse2_psll_w:
910800 ; AVX512VL: ## BB#0:
911 ; AVX512VL-NEXT: vpsllw %xmm1, %xmm0, %xmm0
912 ; AVX512VL-NEXT: retl
801 ; AVX512VL-NEXT: vpsllw %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x08,0xf1,0xc1]
802 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
913803 %res = call <8 x i16> @llvm.x86.sse2.psll.w(<8 x i16> %a0, <8 x i16> %a1) ; <<8 x i16>> [#uses=1]
914804 ret <8 x i16> %res
915805 }
919809 define <4 x i32> @test_x86_sse2_pslli_d(<4 x i32> %a0) {
920810 ; AVX-LABEL: test_x86_sse2_pslli_d:
921811 ; AVX: ## BB#0:
922 ; AVX-NEXT: vpslld $7, %xmm0, %xmm0
923 ; AVX-NEXT: retl
812 ; AVX-NEXT: vpslld $7, %xmm0, %xmm0 ## encoding: [0xc5,0xf9,0x72,0xf0,0x07]
813 ; AVX-NEXT: retl ## encoding: [0xc3]
924814 ;
925815 ; AVX512VL-LABEL: test_x86_sse2_pslli_d:
926816 ; AVX512VL: ## BB#0:
927 ; AVX512VL-NEXT: vpslld $7, %xmm0, %xmm0
928 ; AVX512VL-NEXT: retl
817 ; AVX512VL-NEXT: vpslld $7, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x08,0x72,0xf0,0x07]
818 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
929819 %res = call <4 x i32> @llvm.x86.sse2.pslli.d(<4 x i32> %a0, i32 7) ; <<4 x i32>> [#uses=1]
930820 ret <4 x i32> %res
931821 }
935825 define <2 x i64> @test_x86_sse2_pslli_q(<2 x i64> %a0) {
936826 ; AVX-LABEL: test_x86_sse2_pslli_q:
937827 ; AVX: ## BB#0:
938 ; AVX-NEXT: vpsllq $7, %xmm0, %xmm0
939 ; AVX-NEXT: retl
828 ; AVX-NEXT: vpsllq $7, %xmm0, %xmm0 ## encoding: [0xc5,0xf9,0x73,0xf0,0x07]
829 ; AVX-NEXT: retl ## encoding: [0xc3]
940830 ;
941831 ; AVX512VL-LABEL: test_x86_sse2_pslli_q:
942832 ; AVX512VL: ## BB#0:
943 ; AVX512VL-NEXT: vpsllq $7, %xmm0, %xmm0
944 ; AVX512VL-NEXT: retl
833 ; AVX512VL-NEXT: vpsllq $7, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0xfd,0x08,0x73,0xf0,0x07]
834 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
945835 %res = call <2 x i64> @llvm.x86.sse2.pslli.q(<2 x i64> %a0, i32 7) ; <<2 x i64>> [#uses=1]
946836 ret <2 x i64> %res
947837 }
951841 define <8 x i16> @test_x86_sse2_pslli_w(<8 x i16> %a0) {
952842 ; AVX-LABEL: test_x86_sse2_pslli_w:
953843 ; AVX: ## BB#0:
954 ; AVX-NEXT: vpsllw $7, %xmm0, %xmm0
955 ; AVX-NEXT: retl
844 ; AVX-NEXT: vpsllw $7, %xmm0, %xmm0 ## encoding: [0xc5,0xf9,0x71,0xf0,0x07]
845 ; AVX-NEXT: retl ## encoding: [0xc3]
956846 ;
957847 ; AVX512VL-LABEL: test_x86_sse2_pslli_w:
958848 ; AVX512VL: ## BB#0:
959 ; AVX512VL-NEXT: vpsllw $7, %xmm0, %xmm0
960 ; AVX512VL-NEXT: retl
849 ; AVX512VL-NEXT: vpsllw $7, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x08,0x71,0xf0,0x07]
850 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
961851 %res = call <8 x i16> @llvm.x86.sse2.pslli.w(<8 x i16> %a0, i32 7) ; <<8 x i16>> [#uses=1]
962852 ret <8 x i16> %res
963853 }
967857 define <4 x i32> @test_x86_sse2_psra_d(<4 x i32> %a0, <4 x i32> %a1) {
968858 ; AVX-LABEL: test_x86_sse2_psra_d:
969859 ; AVX: ## BB#0:
970 ; AVX-NEXT: vpsrad %xmm1, %xmm0, %xmm0
971 ; AVX-NEXT: retl
860 ; AVX-NEXT: vpsrad %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xf9,0xe2,0xc1]
861 ; AVX-NEXT: retl ## encoding: [0xc3]
972862 ;
973863 ; AVX512VL-LABEL: test_x86_sse2_psra_d:
974864 ; AVX512VL: ## BB#0:
975 ; AVX512VL-NEXT: vpsrad %xmm1, %xmm0, %xmm0
976 ; AVX512VL-NEXT: retl
865 ; AVX512VL-NEXT: vpsrad %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x08,0xe2,0xc1]
866 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
977867 %res = call <4 x i32> @llvm.x86.sse2.psra.d(<4 x i32> %a0, <4 x i32> %a1) ; <<4 x i32>> [#uses=1]
978868 ret <4 x i32> %res
979869 }
983873 define <8 x i16> @test_x86_sse2_psra_w(<8 x i16> %a0, <8 x i16> %a1) {
984874 ; AVX-LABEL: test_x86_sse2_psra_w:
985875 ; AVX: ## BB#0:
986 ; AVX-NEXT: vpsraw %xmm1, %xmm0, %xmm0
987 ; AVX-NEXT: retl
876 ; AVX-NEXT: vpsraw %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xf9,0xe1,0xc1]
877 ; AVX-NEXT: retl ## encoding: [0xc3]
988878 ;
989879 ; AVX512VL-LABEL: test_x86_sse2_psra_w:
990880 ; AVX512VL: ## BB#0:
991 ; AVX512VL-NEXT: vpsraw %xmm1, %xmm0, %xmm0
992 ; AVX512VL-NEXT: retl
881 ; AVX512VL-NEXT: vpsraw %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x08,0xe1,0xc1]
882 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
993883 %res = call <8 x i16> @llvm.x86.sse2.psra.w(<8 x i16> %a0, <8 x i16> %a1) ; <<8 x i16>> [#uses=1]
994884 ret <8 x i16> %res
995885 }
999889 define <4 x i32> @test_x86_sse2_psrai_d(<4 x i32> %a0) {
1000890 ; AVX-LABEL: test_x86_sse2_psrai_d:
1001891 ; AVX: ## BB#0:
1002 ; AVX-NEXT: vpsrad $7, %xmm0, %xmm0
1003 ; AVX-NEXT: retl
892 ; AVX-NEXT: vpsrad $7, %xmm0, %xmm0 ## encoding: [0xc5,0xf9,0x72,0xe0,0x07]
893 ; AVX-NEXT: retl ## encoding: [0xc3]
1004894 ;
1005895 ; AVX512VL-LABEL: test_x86_sse2_psrai_d:
1006896 ; AVX512VL: ## BB#0:
1007 ; AVX512VL-NEXT: vpsrad $7, %xmm0, %xmm0
1008 ; AVX512VL-NEXT: retl
897 ; AVX512VL-NEXT: vpsrad $7, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x08,0x72,0xe0,0x07]
898 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
1009899 %res = call <4 x i32> @llvm.x86.sse2.psrai.d(<4 x i32> %a0, i32 7) ; <<4 x i32>> [#uses=1]
1010900 ret <4 x i32> %res
1011901 }
1015905 define <8 x i16> @test_x86_sse2_psrai_w(<8 x i16> %a0) {
1016906 ; AVX-LABEL: test_x86_sse2_psrai_w:
1017907 ; AVX: ## BB#0:
1018 ; AVX-NEXT: vpsraw $7, %xmm0, %xmm0
1019 ; AVX-NEXT: retl
908 ; AVX-NEXT: vpsraw $7, %xmm0, %xmm0 ## encoding: [0xc5,0xf9,0x71,0xe0,0x07]
909 ; AVX-NEXT: retl ## encoding: [0xc3]
1020910 ;
1021911 ; AVX512VL-LABEL: test_x86_sse2_psrai_w:
1022912 ; AVX512VL: ## BB#0:
1023 ; AVX512VL-NEXT: vpsraw $7, %xmm0, %xmm0
1024 ; AVX512VL-NEXT: retl
913 ; AVX512VL-NEXT: vpsraw $7, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x08,0x71,0xe0,0x07]
914 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
1025915 %res = call <8 x i16> @llvm.x86.sse2.psrai.w(<8 x i16> %a0, i32 7) ; <<8 x i16>> [#uses=1]
1026916 ret <8 x i16> %res
1027917 }
1031921 define <4 x i32> @test_x86_sse2_psrl_d(<4 x i32> %a0, <4 x i32> %a1) {
1032922 ; AVX-LABEL: test_x86_sse2_psrl_d:
1033923 ; AVX: ## BB#0:
1034 ; AVX-NEXT: vpsrld %xmm1, %xmm0, %xmm0
1035 ; AVX-NEXT: retl
924 ; AVX-NEXT: vpsrld %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xf9,0xd2,0xc1]
925 ; AVX-NEXT: retl ## encoding: [0xc3]
1036926 ;
1037927 ; AVX512VL-LABEL: test_x86_sse2_psrl_d:
1038928 ; AVX512VL: ## BB#0:
1039 ; AVX512VL-NEXT: vpsrld %xmm1, %xmm0, %xmm0
1040 ; AVX512VL-NEXT: retl
929 ; AVX512VL-NEXT: vpsrld %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x08,0xd2,0xc1]
930 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
1041931 %res = call <4 x i32> @llvm.x86.sse2.psrl.d(<4 x i32> %a0, <4 x i32> %a1) ; <<4 x i32>> [#uses=1]
1042932 ret <4 x i32> %res
1043933 }
1047937 define <2 x i64> @test_x86_sse2_psrl_q(<2 x i64> %a0, <2 x i64> %a1) {
1048938 ; AVX-LABEL: test_x86_sse2_psrl_q:
1049939 ; AVX: ## BB#0:
1050 ; AVX-NEXT: vpsrlq %xmm1, %xmm0, %xmm0
1051 ; AVX-NEXT: retl
940 ; AVX-NEXT: vpsrlq %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xf9,0xd3,0xc1]
941 ; AVX-NEXT: retl ## encoding: [0xc3]
1052942 ;
1053943 ; AVX512VL-LABEL: test_x86_sse2_psrl_q:
1054944 ; AVX512VL: ## BB#0:
1055 ; AVX512VL-NEXT: vpsrlq %xmm1, %xmm0, %xmm0
1056 ; AVX512VL-NEXT: retl
945 ; AVX512VL-NEXT: vpsrlq %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0xfd,0x08,0xd3,0xc1]
946 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
1057947 %res = call <2 x i64> @llvm.x86.sse2.psrl.q(<2 x i64> %a0, <2 x i64> %a1) ; <<2 x i64>> [#uses=1]
1058948 ret <2 x i64> %res
1059949 }
1063953 define <8 x i16> @test_x86_sse2_psrl_w(<8 x i16> %a0, <8 x i16> %a1) {
1064954 ; AVX-LABEL: test_x86_sse2_psrl_w:
1065955 ; AVX: ## BB#0:
1066 ; AVX-NEXT: vpsrlw %xmm1, %xmm0, %xmm0
1067 ; AVX-NEXT: retl
956 ; AVX-NEXT: vpsrlw %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xf9,0xd1,0xc1]
957 ; AVX-NEXT: retl ## encoding: [0xc3]
1068958 ;
1069959 ; AVX512VL-LABEL: test_x86_sse2_psrl_w:
1070960 ; AVX512VL: ## BB#0:
1071 ; AVX512VL-NEXT: vpsrlw %xmm1, %xmm0, %xmm0
1072 ; AVX512VL-NEXT: retl
961 ; AVX512VL-NEXT: vpsrlw %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x08,0xd1,0xc1]
962 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
1073963 %res = call <8 x i16> @llvm.x86.sse2.psrl.w(<8 x i16> %a0, <8 x i16> %a1) ; <<8 x i16>> [#uses=1]
1074964 ret <8 x i16> %res
1075965 }
1079969 define <4 x i32> @test_x86_sse2_psrli_d(<4 x i32> %a0) {
1080970 ; AVX-LABEL: test_x86_sse2_psrli_d:
1081971 ; AVX: ## BB#0:
1082 ; AVX-NEXT: vpsrld $7, %xmm0, %xmm0
1083 ; AVX-NEXT: retl
972 ; AVX-NEXT: vpsrld $7, %xmm0, %xmm0 ## encoding: [0xc5,0xf9,0x72,0xd0,0x07]
973 ; AVX-NEXT: retl ## encoding: [0xc3]
1084974 ;
1085975 ; AVX512VL-LABEL: test_x86_sse2_psrli_d:
1086976 ; AVX512VL: ## BB#0:
1087 ; AVX512VL-NEXT: vpsrld $7, %xmm0, %xmm0
1088 ; AVX512VL-NEXT: retl
977 ; AVX512VL-NEXT: vpsrld $7, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x08,0x72,0xd0,0x07]
978 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
1089979 %res = call <4 x i32> @llvm.x86.sse2.psrli.d(<4 x i32> %a0, i32 7) ; <<4 x i32>> [#uses=1]
1090980 ret <4 x i32> %res
1091981 }
1095985 define <2 x i64> @test_x86_sse2_psrli_q(<2 x i64> %a0) {
1096986 ; AVX-LABEL: test_x86_sse2_psrli_q:
1097987 ; AVX: ## BB#0:
1098 ; AVX-NEXT: vpsrlq $7, %xmm0, %xmm0
1099 ; AVX-NEXT: retl
988 ; AVX-NEXT: vpsrlq $7, %xmm0, %xmm0 ## encoding: [0xc5,0xf9,0x73,0xd0,0x07]
989 ; AVX-NEXT: retl ## encoding: [0xc3]
1100990 ;
1101991 ; AVX512VL-LABEL: test_x86_sse2_psrli_q:
1102992 ; AVX512VL: ## BB#0:
1103 ; AVX512VL-NEXT: vpsrlq $7, %xmm0, %xmm0
1104 ; AVX512VL-NEXT: retl
993 ; AVX512VL-NEXT: vpsrlq $7, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0xfd,0x08,0x73,0xd0,0x07]
994 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
1105995 %res = call <2 x i64> @llvm.x86.sse2.psrli.q(<2 x i64> %a0, i32 7) ; <<2 x i64>> [#uses=1]
1106996 ret <2 x i64> %res
1107997 }
11111001 define <8 x i16> @test_x86_sse2_psrli_w(<8 x i16> %a0) {
11121002 ; AVX-LABEL: test_x86_sse2_psrli_w:
11131003 ; AVX: ## BB#0:
1114 ; AVX-NEXT: vpsrlw $7, %xmm0, %xmm0
1115 ; AVX-NEXT: retl
1004 ; AVX-NEXT: vpsrlw $7, %xmm0, %xmm0 ## encoding: [0xc5,0xf9,0x71,0xd0,0x07]
1005 ; AVX-NEXT: retl ## encoding: [0xc3]
11161006 ;
11171007 ; AVX512VL-LABEL: test_x86_sse2_psrli_w:
11181008 ; AVX512VL: ## BB#0:
1119 ; AVX512VL-NEXT: vpsrlw $7, %xmm0, %xmm0
1120 ; AVX512VL-NEXT: retl
1009 ; AVX512VL-NEXT: vpsrlw $7, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x08,0x71,0xd0,0x07]
1010 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
11211011 %res = call <8 x i16> @llvm.x86.sse2.psrli.w(<8 x i16> %a0, i32 7) ; <<8 x i16>> [#uses=1]
11221012 ret <8 x i16> %res
11231013 }
11271017 define <16 x i8> @test_x86_sse2_psubs_b(<16 x i8> %a0, <16 x i8> %a1) {
11281018 ; AVX-LABEL: test_x86_sse2_psubs_b:
11291019 ; AVX: ## BB#0:
1130 ; AVX-NEXT: vpsubsb %xmm1, %xmm0, %xmm0
1131 ; AVX-NEXT: retl
1020 ; AVX-NEXT: vpsubsb %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xf9,0xe8,0xc1]
1021 ; AVX-NEXT: retl ## encoding: [0xc3]
11321022 ;
11331023 ; AVX512VL-LABEL: test_x86_sse2_psubs_b:
11341024 ; AVX512VL: ## BB#0:
1135 ; AVX512VL-NEXT: vpsubsb %xmm1, %xmm0, %xmm0
1136 ; AVX512VL-NEXT: retl
1025 ; AVX512VL-NEXT: vpsubsb %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x08,0xe8,0xc1]
1026 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
11371027 %res = call <16 x i8> @llvm.x86.sse2.psubs.b(<16 x i8> %a0, <16 x i8> %a1) ; <<16 x i8>> [#uses=1]
11381028 ret <16 x i8> %res
11391029 }
11431033 define <8 x i16> @test_x86_sse2_psubs_w(<8 x i16> %a0, <8 x i16> %a1) {
11441034 ; AVX-LABEL: test_x86_sse2_psubs_w:
11451035 ; AVX: ## BB#0:
1146 ; AVX-NEXT: vpsubsw %xmm1, %xmm0, %xmm0
1147 ; AVX-NEXT: retl
1036 ; AVX-NEXT: vpsubsw %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xf9,0xe9,0xc1]
1037 ; AVX-NEXT: retl ## encoding: [0xc3]
11481038 ;
11491039 ; AVX512VL-LABEL: test_x86_sse2_psubs_w:
11501040 ; AVX512VL: ## BB#0:
1151 ; AVX512VL-NEXT: vpsubsw %xmm1, %xmm0, %xmm0
1152 ; AVX512VL-NEXT: retl
1041 ; AVX512VL-NEXT: vpsubsw %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x08,0xe9,0xc1]
1042 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
11531043 %res = call <8 x i16> @llvm.x86.sse2.psubs.w(<8 x i16> %a0, <8 x i16> %a1) ; <<8 x i16>> [#uses=1]
11541044 ret <8 x i16> %res
11551045 }
11591049 define <16 x i8> @test_x86_sse2_psubus_b(<16 x i8> %a0, <16 x i8> %a1) {
11601050 ; AVX-LABEL: test_x86_sse2_psubus_b:
11611051 ; AVX: ## BB#0:
1162 ; AVX-NEXT: vpsubusb %xmm1, %xmm0, %xmm0
1163 ; AVX-NEXT: retl
1052 ; AVX-NEXT: vpsubusb %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xf9,0xd8,0xc1]
1053 ; AVX-NEXT: retl ## encoding: [0xc3]
11641054 ;
11651055 ; AVX512VL-LABEL: test_x86_sse2_psubus_b:
11661056 ; AVX512VL: ## BB#0:
1167 ; AVX512VL-NEXT: vpsubusb %xmm1, %xmm0, %xmm0
1168 ; AVX512VL-NEXT: retl
1057 ; AVX512VL-NEXT: vpsubusb %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x08,0xd8,0xc1]
1058 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
11691059 %res = call <16 x i8> @llvm.x86.sse2.psubus.b(<16 x i8> %a0, <16 x i8> %a1) ; <<16 x i8>> [#uses=1]
11701060 ret <16 x i8> %res
11711061 }
11751065 define <8 x i16> @test_x86_sse2_psubus_w(<8 x i16> %a0, <8 x i16> %a1) {
11761066 ; AVX-LABEL: test_x86_sse2_psubus_w:
11771067 ; AVX: ## BB#0:
1178 ; AVX-NEXT: vpsubusw %xmm1, %xmm0, %xmm0
1179 ; AVX-NEXT: retl
1068 ; AVX-NEXT: vpsubusw %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xf9,0xd9,0xc1]
1069 ; AVX-NEXT: retl ## encoding: [0xc3]
11801070 ;
11811071 ; AVX512VL-LABEL: test_x86_sse2_psubus_w:
11821072 ; AVX512VL: ## BB#0:
1183 ; AVX512VL-NEXT: vpsubusw %xmm1, %xmm0, %xmm0
1184 ; AVX512VL-NEXT: retl
1073 ; AVX512VL-NEXT: vpsubusw %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7d,0x08,0xd9,0xc1]
1074 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
11851075 %res = call <8 x i16> @llvm.x86.sse2.psubus.w(<8 x i16> %a0, <8 x i16> %a1) ; <<8 x i16>> [#uses=1]
11861076 ret <8 x i16> %res
11871077 }
11891079
11901080
11911081 define <2 x double> @test_x86_sse2_sqrt_pd(<2 x double> %a0) {
1192 ; AVX-LABEL: test_x86_sse2_sqrt_pd:
1193 ; AVX: ## BB#0:
1194 ; AVX-NEXT: vsqrtpd %xmm0, %xmm0
1195 ; AVX-NEXT: retl
1196 ;
1197 ; AVX512VL-LABEL: test_x86_sse2_sqrt_pd:
1198 ; AVX512VL: ## BB#0:
1199 ; AVX512VL-NEXT: vsqrtpd %xmm0, %xmm0
1200 ; AVX512VL-NEXT: retl
1082 ; CHECK-LABEL: test_x86_sse2_sqrt_pd:
1083 ; CHECK: ## BB#0:
1084 ; CHECK-NEXT: vsqrtpd %xmm0, %xmm0 ## encoding: [0xc5,0xf9,0x51,0xc0]
1085 ; CHECK-NEXT: retl ## encoding: [0xc3]
12011086 %res = call <2 x double> @llvm.x86.sse2.sqrt.pd(<2 x double> %a0) ; <<2 x double>> [#uses=1]
12021087 ret <2 x double> %res
12031088 }
12051090
12061091
12071092 define <2 x double> @test_x86_sse2_sqrt_sd(<2 x double> %a0) {
1208 ; AVX-LABEL: test_x86_sse2_sqrt_sd:
1209 ; AVX: ## BB#0:
1210 ; AVX-NEXT: vsqrtsd %xmm0, %xmm0, %xmm0
1211 ; AVX-NEXT: retl
1212 ;
1213 ; AVX512VL-LABEL: test_x86_sse2_sqrt_sd:
1214 ; AVX512VL: ## BB#0:
1215 ; AVX512VL-NEXT: vsqrtsd %xmm0, %xmm0, %xmm0
1216 ; AVX512VL-NEXT: retl
1093 ; CHECK-LABEL: test_x86_sse2_sqrt_sd:
1094 ; CHECK: ## BB#0:
1095 ; CHECK-NEXT: vsqrtsd %xmm0, %xmm0, %xmm0 ## encoding: [0xc5,0xfb,0x51,0xc0]
1096 ; CHECK-NEXT: retl ## encoding: [0xc3]
12171097 %res = call <2 x double> @llvm.x86.sse2.sqrt.sd(<2 x double> %a0) ; <<2 x double>> [#uses=1]
12181098 ret <2 x double> %res
12191099 }
12211101
12221102
12231103 define <2 x double> @test_x86_sse2_sub_sd(<2 x double> %a0, <2 x double> %a1) {
1224 ; AVX-LABEL: test_x86_sse2_sub_sd:
1225 ; AVX: ## BB#0:
1226 ; AVX-NEXT: vsubsd %xmm1, %xmm0, %xmm0
1227 ; AVX-NEXT: retl
1228 ;
1229 ; AVX512VL-LABEL: test_x86_sse2_sub_sd:
1230 ; AVX512VL: ## BB#0:
1231 ; AVX512VL-NEXT: vsubsd %xmm1, %xmm0, %xmm0
1232 ; AVX512VL-NEXT: retl
1104 ; CHECK-LABEL: test_x86_sse2_sub_sd:
1105 ; CHECK: ## BB#0:
1106 ; CHECK-NEXT: vsubsd %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xfb,0x5c,0xc1]
1107 ; CHECK-NEXT: retl ## encoding: [0xc3]
12331108 %res = call <2 x double> @llvm.x86.sse2.sub.sd(<2 x double> %a0, <2 x double> %a1) ; <<2 x double>> [#uses=1]
12341109 ret <2 x double> %res
12351110 }
12391114 define i32 @test_x86_sse2_ucomieq_sd(<2 x double> %a0, <2 x double> %a1) {
12401115 ; AVX-LABEL: test_x86_sse2_ucomieq_sd:
12411116 ; AVX: ## BB#0:
1242 ; AVX-NEXT: vucomisd %xmm1, %xmm0
1243 ; AVX-NEXT: setnp %al
1244 ; AVX-NEXT: sete %cl
1245 ; AVX-NEXT: andb %al, %cl
1246 ; AVX-NEXT: movzbl %cl, %eax
1247 ; AVX-NEXT: retl
1117 ; AVX-NEXT: vucomisd %xmm1, %xmm0 ## encoding: [0xc5,0xf9,0x2e,0xc1]
1118 ; AVX-NEXT: setnp %al ## encoding: [0x0f,0x9b,0xc0]
1119 ; AVX-NEXT: sete %cl ## encoding: [0x0f,0x94,0xc1]
1120 ; AVX-NEXT: andb %al, %cl ## encoding: [0x20,0xc1]
1121 ; AVX-NEXT: movzbl %cl, %eax ## encoding: [0x0f,0xb6,0xc1]
1122 ; AVX-NEXT: retl ## encoding: [0xc3]
12481123 ;
12491124 ; AVX512VL-LABEL: test_x86_sse2_ucomieq_sd:
12501125 ; AVX512VL: ## BB#0:
1251 ; AVX512VL-NEXT: vucomisd %xmm1, %xmm0
1252 ; AVX512VL-NEXT: setnp %al
1253 ; AVX512VL-NEXT: sete %cl
1254 ; AVX512VL-NEXT: andb %al, %cl
1255 ; AVX512VL-NEXT: movzbl %cl, %eax
1256 ; AVX512VL-NEXT: retl
1126 ; AVX512VL-NEXT: vucomisd %xmm1, %xmm0 ## encoding: [0x62,0xf1,0xfd,0x08,0x2e,0xc1]
1127 ; AVX512VL-NEXT: setnp %al ## encoding: [0x0f,0x9b,0xc0]
1128 ; AVX512VL-NEXT: sete %cl ## encoding: [0x0f,0x94,0xc1]
1129 ; AVX512VL-NEXT: andb %al, %cl ## encoding: [0x20,0xc1]
1130 ; AVX512VL-NEXT: movzbl %cl, %eax ## encoding: [0x0f,0xb6,0xc1]
1131 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
12571132 %res = call i32 @llvm.x86.sse2.ucomieq.sd(<2 x double> %a0, <2 x double> %a1) ; [#uses=1]
12581133 ret i32 %res
12591134 }
12631138 define i32 @test_x86_sse2_ucomige_sd(<2 x double> %a0, <2 x double> %a1) {
12641139 ; AVX-LABEL: test_x86_sse2_ucomige_sd:
12651140 ; AVX: ## BB#0:
1266 ; AVX-NEXT: xorl %eax, %eax
1267 ; AVX-NEXT: vucomisd %xmm1, %xmm0
1268 ; AVX-NEXT: setae %al
1269 ; AVX-NEXT: retl
1141 ; AVX-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
1142 ; AVX-NEXT: vucomisd %xmm1, %xmm0 ## encoding: [0xc5,0xf9,0x2e,0xc1]
1143 ; AVX-NEXT: setae %al ## encoding: [0x0f,0x93,0xc0]
1144 ; AVX-NEXT: retl ## encoding: [0xc3]
12701145 ;
12711146 ; AVX512VL-LABEL: test_x86_sse2_ucomige_sd:
12721147 ; AVX512VL: ## BB#0:
1273 ; AVX512VL-NEXT: xorl %eax, %eax
1274 ; AVX512VL-NEXT: vucomisd %xmm1, %xmm0
1275 ; AVX512VL-NEXT: setae %al
1276 ; AVX512VL-NEXT: retl
1148 ; AVX512VL-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
1149 ; AVX512VL-NEXT: vucomisd %xmm1, %xmm0 ## encoding: [0x62,0xf1,0xfd,0x08,0x2e,0xc1]
1150 ; AVX512VL-NEXT: setae %al ## encoding: [0x0f,0x93,0xc0]
1151 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
12771152 %res = call i32 @llvm.x86.sse2.ucomige.sd(<2 x double> %a0, <2 x double> %a1) ; [#uses=1]
12781153 ret i32 %res
12791154 }
12831158 define i32 @test_x86_sse2_ucomigt_sd(<2 x double> %a0, <2 x double> %a1) {
12841159 ; AVX-LABEL: test_x86_sse2_ucomigt_sd:
12851160 ; AVX: ## BB#0:
1286 ; AVX-NEXT: xorl %eax, %eax
1287 ; AVX-NEXT: vucomisd %xmm1, %xmm0
1288 ; AVX-NEXT: seta %al
1289 ; AVX-NEXT: retl
1161 ; AVX-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
1162 ; AVX-NEXT: vucomisd %xmm1, %xmm0 ## encoding: [0xc5,0xf9,0x2e,0xc1]
1163 ; AVX-NEXT: seta %al ## encoding: [0x0f,0x97,0xc0]
1164 ; AVX-NEXT: retl ## encoding: [0xc3]
12901165 ;
12911166 ; AVX512VL-LABEL: test_x86_sse2_ucomigt_sd:
12921167 ; AVX512VL: ## BB#0:
1293 ; AVX512VL-NEXT: xorl %eax, %eax
1294 ; AVX512VL-NEXT: vucomisd %xmm1, %xmm0
1295 ; AVX512VL-NEXT: seta %al
1296 ; AVX512VL-NEXT: retl
1168 ; AVX512VL-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
1169 ; AVX512VL-NEXT: vucomisd %xmm1, %xmm0 ## encoding: [0x62,0xf1,0xfd,0x08,0x2e,0xc1]
1170 ; AVX512VL-NEXT: seta %al ## encoding: [0x0f,0x97,0xc0]
1171 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
12971172 %res = call i32 @llvm.x86.sse2.ucomigt.sd(<2 x double> %a0, <2 x double> %a1) ; [#uses=1]
12981173 ret i32 %res
12991174 }
13031178 define i32 @test_x86_sse2_ucomile_sd(<2 x double> %a0, <2 x double> %a1) {
13041179 ; AVX-LABEL: test_x86_sse2_ucomile_sd:
13051180 ; AVX: ## BB#0:
1306 ; AVX-NEXT: xorl %eax, %eax
1307 ; AVX-NEXT: vucomisd %xmm0, %xmm1
1308 ; AVX-NEXT: setae %al
1309 ; AVX-NEXT: retl
1181 ; AVX-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
1182 ; AVX-NEXT: vucomisd %xmm0, %xmm1 ## encoding: [0xc5,0xf9,0x2e,0xc8]
1183 ; AVX-NEXT: setae %al ## encoding: [0x0f,0x93,0xc0]
1184 ; AVX-NEXT: retl ## encoding: [0xc3]
13101185 ;
13111186 ; AVX512VL-LABEL: test_x86_sse2_ucomile_sd:
13121187 ; AVX512VL: ## BB#0:
1313 ; AVX512VL-NEXT: xorl %eax, %eax
1314 ; AVX512VL-NEXT: vucomisd %xmm0, %xmm1
1315 ; AVX512VL-NEXT: setae %al
1316 ; AVX512VL-NEXT: retl
1188 ; AVX512VL-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
1189 ; AVX512VL-NEXT: vucomisd %xmm0, %xmm1 ## encoding: [0x62,0xf1,0xfd,0x08,0x2e,0xc8]
1190 ; AVX512VL-NEXT: setae %al ## encoding: [0x0f,0x93,0xc0]
1191 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
13171192 %res = call i32 @llvm.x86.sse2.ucomile.sd(<2 x double> %a0, <2 x double> %a1) ; [#uses=1]
13181193 ret i32 %res
13191194 }
13231198 define i32 @test_x86_sse2_ucomilt_sd(<2 x double> %a0, <2 x double> %a1) {
13241199 ; AVX-LABEL: test_x86_sse2_ucomilt_sd:
13251200 ; AVX: ## BB#0:
1326 ; AVX-NEXT: xorl %eax, %eax
1327 ; AVX-NEXT: vucomisd %xmm0, %xmm1
1328 ; AVX-NEXT: seta %al
1329 ; AVX-NEXT: retl
1201 ; AVX-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
1202 ; AVX-NEXT: vucomisd %xmm0, %xmm1 ## encoding: [0xc5,0xf9,0x2e,0xc8]
1203 ; AVX-NEXT: seta %al ## encoding: [0x0f,0x97,0xc0]
1204 ; AVX-NEXT: retl ## encoding: [0xc3]
13301205 ;
13311206 ; AVX512VL-LABEL: test_x86_sse2_ucomilt_sd:
13321207 ; AVX512VL: ## BB#0:
1333 ; AVX512VL-NEXT: xorl %eax, %eax
1334 ; AVX512VL-NEXT: vucomisd %xmm0, %xmm1
1335 ; AVX512VL-NEXT: seta %al
1336 ; AVX512VL-NEXT: retl
1208 ; AVX512VL-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
1209 ; AVX512VL-NEXT: vucomisd %xmm0, %xmm1 ## encoding: [0x62,0xf1,0xfd,0x08,0x2e,0xc8]
1210 ; AVX512VL-NEXT: seta %al ## encoding: [0x0f,0x97,0xc0]
1211 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
13371212 %res = call i32 @llvm.x86.sse2.ucomilt.sd(<2 x double> %a0, <2 x double> %a1) ; [#uses=1]
13381213 ret i32 %res
13391214 }
13431218 define i32 @test_x86_sse2_ucomineq_sd(<2 x double> %a0, <2 x double> %a1) {
13441219 ; AVX-LABEL: test_x86_sse2_ucomineq_sd:
13451220 ; AVX: ## BB#0:
1346 ; AVX-NEXT: vucomisd %xmm1, %xmm0
1347 ; AVX-NEXT: setp %al
1348 ; AVX-NEXT: setne %cl
1349 ; AVX-NEXT: orb %al, %cl
1350 ; AVX-NEXT: movzbl %cl, %eax
1351 ; AVX-NEXT: retl
1221 ; AVX-NEXT: vucomisd %xmm1, %xmm0 ## encoding: [0xc5,0xf9,0x2e,0xc1]
1222 ; AVX-NEXT: setp %al ## encoding: [0x0f,0x9a,0xc0]
1223 ; AVX-NEXT: setne %cl ## encoding: [0x0f,0x95,0xc1]
1224 ; AVX-NEXT: orb %al, %cl ## encoding: [0x08,0xc1]
1225 ; AVX-NEXT: movzbl %cl, %eax ## encoding: [0x0f,0xb6,0xc1]
1226 ; AVX-NEXT: retl ## encoding: [0xc3]
13521227 ;
13531228 ; AVX512VL-LABEL: test_x86_sse2_ucomineq_sd:
13541229 ; AVX512VL: ## BB#0:
1355 ; AVX512VL-NEXT: vucomisd %xmm1, %xmm0
1356 ; AVX512VL-NEXT: setp %al
1357 ; AVX512VL-NEXT: setne %cl
1358 ; AVX512VL-NEXT: orb %al, %cl
1359 ; AVX512VL-NEXT: movzbl %cl, %eax
1360 ; AVX512VL-NEXT: retl
1230 ; AVX512VL-NEXT: vucomisd %xmm1, %xmm0 ## encoding: [0x62,0xf1,0xfd,0x08,0x2e,0xc1]
1231 ; AVX512VL-NEXT: setp %al ## encoding: [0x0f,0x9a,0xc0]
1232 ; AVX512VL-NEXT: setne %cl ## encoding: [0x0f,0x95,0xc1]
1233 ; AVX512VL-NEXT: orb %al, %cl ## encoding: [0x08,0xc1]
1234 ; AVX512VL-NEXT: movzbl %cl, %eax ## encoding: [0x0f,0xb6,0xc1]
1235 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
13611236 %res = call i32 @llvm.x86.sse2.ucomineq.sd(<2 x double> %a0, <2 x double> %a1) ; [#uses=1]
13621237 ret i32 %res
13631238 }
13651240
13661241
13671242 define <2 x double> @test_x86_sse3_addsub_pd(<2 x double> %a0, <2 x double> %a1) {
1368 ; AVX-LABEL: test_x86_sse3_addsub_pd:
1369 ; AVX: ## BB#0:
1370 ; AVX-NEXT: vaddsubpd %xmm1, %xmm0, %xmm0
1371 ; AVX-NEXT: retl
1372 ;
1373 ; AVX512VL-LABEL: test_x86_sse3_addsub_pd:
1374 ; AVX512VL: ## BB#0:
1375 ; AVX512VL-NEXT: vaddsubpd %xmm1, %xmm0, %xmm0
1376 ; AVX512VL-NEXT: retl
1243 ; CHECK-LABEL: test_x86_sse3_addsub_pd:
1244 ; CHECK: ## BB#0:
1245 ; CHECK-NEXT: vaddsubpd %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xf9,0xd0,0xc1]
1246 ; CHECK-NEXT: retl ## encoding: [0xc3]
13771247 %res = call <2 x double> @llvm.x86.sse3.addsub.pd(<2 x double> %a0, <2 x double> %a1) ; <<2 x double>> [#uses=1]
13781248 ret <2 x double> %res
13791249 }
13811251
13821252
13831253 define <4 x float> @test_x86_sse3_addsub_ps(<4 x float> %a0, <4 x float> %a1) {
1384 ; AVX-LABEL: test_x86_sse3_addsub_ps:
1385 ; AVX: ## BB#0:
1386 ; AVX-NEXT: vaddsubps %xmm1, %xmm0, %xmm0
1387 ; AVX-NEXT: retl
1388 ;
1389 ; AVX512VL-LABEL: test_x86_sse3_addsub_ps:
1390 ; AVX512VL: ## BB#0:
1391 ; AVX512VL-NEXT: vaddsubps %xmm1, %xmm0, %xmm0
1392 ; AVX512VL-NEXT: retl
1254 ; CHECK-LABEL: test_x86_sse3_addsub_ps:
1255 ; CHECK: ## BB#0:
1256 ; CHECK-NEXT: vaddsubps %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xfb,0xd0,0xc1]
1257 ; CHECK-NEXT: retl ## encoding: [0xc3]
13931258 %res = call <4 x float> @llvm.x86.sse3.addsub.ps(<4 x float> %a0, <4 x float> %a1) ; <<4 x float>> [#uses=1]
13941259 ret <4 x float> %res
13951260 }
13971262
13981263
13991264 define <2 x double> @test_x86_sse3_hadd_pd(<2 x double> %a0, <2 x double> %a1) {
1400 ; AVX-LABEL: test_x86_sse3_hadd_pd:
1401 ; AVX: ## BB#0:
1402 ; AVX-NEXT: vhaddpd %xmm1, %xmm0, %xmm0
1403 ; AVX-NEXT: retl
1404 ;
1405 ; AVX512VL-LABEL: test_x86_sse3_hadd_pd:
1406 ; AVX512VL: ## BB#0:
1407 ; AVX512VL-NEXT: vhaddpd %xmm1, %xmm0, %xmm0
1408 ; AVX512VL-NEXT: retl
1265 ; CHECK-LABEL: test_x86_sse3_hadd_pd:
1266 ; CHECK: ## BB#0:
1267 ; CHECK-NEXT: vhaddpd %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xf9,0x7c,0xc1]
1268 ; CHECK-NEXT: retl ## encoding: [0xc3]
14091269 %res = call <2 x double> @llvm.x86.sse3.hadd.pd(<2 x double> %a0, <2 x double> %a1) ; <<2 x double>> [#uses=1]
14101270 ret <2 x double> %res
14111271 }
14131273
14141274
14151275 define <4 x float> @test_x86_sse3_hadd_ps(<4 x float> %a0, <4 x float> %a1) {
1416 ; AVX-LABEL: test_x86_sse3_hadd_ps:
1417 ; AVX: ## BB#0:
1418 ; AVX-NEXT: vhaddps %xmm1, %xmm0, %xmm0
1419 ; AVX-NEXT: retl
1420 ;
1421 ; AVX512VL-LABEL: test_x86_sse3_hadd_ps:
1422 ; AVX512VL: ## BB#0:
1423 ; AVX512VL-NEXT: vhaddps %xmm1, %xmm0, %xmm0
1424 ; AVX512VL-NEXT: retl
1276 ; CHECK-LABEL: test_x86_sse3_hadd_ps:
1277 ; CHECK: ## BB#0:
1278 ; CHECK-NEXT: vhaddps %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xfb,0x7c,0xc1]
1279 ; CHECK-NEXT: retl ## encoding: [0xc3]
14251280 %res = call <4 x float> @llvm.x86.sse3.hadd.ps(<4 x float> %a0, <4 x float> %a1) ; <<4 x float>> [#uses=1]
14261281 ret <4 x float> %res
14271282 }
14291284
14301285
14311286 define <2 x double> @test_x86_sse3_hsub_pd(<2 x double> %a0, <2 x double> %a1) {
1432 ; AVX-LABEL: test_x86_sse3_hsub_pd:
1433 ; AVX: ## BB#0:
1434 ; AVX-NEXT: vhsubpd %xmm1, %xmm0, %xmm0
1435 ; AVX-NEXT: retl
1436 ;
1437 ; AVX512VL-LABEL: test_x86_sse3_hsub_pd:
1438 ; AVX512VL: ## BB#0:
1439 ; AVX512VL-NEXT: vhsubpd %xmm1, %xmm0, %xmm0
1440 ; AVX512VL-NEXT: retl
1287 ; CHECK-LABEL: test_x86_sse3_hsub_pd:
1288 ; CHECK: ## BB#0:
1289 ; CHECK-NEXT: vhsubpd %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xf9,0x7d,0xc1]
1290 ; CHECK-NEXT: retl ## encoding: [0xc3]
14411291 %res = call <2 x double> @llvm.x86.sse3.hsub.pd(<2 x double> %a0, <2 x double> %a1) ; <<2 x double>> [#uses=1]
14421292 ret <2 x double> %res
14431293 }
14451295
14461296
14471297 define <4 x float> @test_x86_sse3_hsub_ps(<4 x float> %a0, <4 x float> %a1) {
1448 ; AVX-LABEL: test_x86_sse3_hsub_ps:
1449 ; AVX: ## BB#0:
1450 ; AVX-NEXT: vhsubps %xmm1, %xmm0, %xmm0
1451 ; AVX-NEXT: retl
1452 ;
1453 ; AVX512VL-LABEL: test_x86_sse3_hsub_ps:
1454 ; AVX512VL: ## BB#0:
1455 ; AVX512VL-NEXT: vhsubps %xmm1, %xmm0, %xmm0
1456 ; AVX512VL-NEXT: retl
1298 ; CHECK-LABEL: test_x86_sse3_hsub_ps:
1299 ; CHECK: ## BB#0:
1300 ; CHECK-NEXT: vhsubps %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xfb,0x7d,0xc1]
1301 ; CHECK-NEXT: retl ## encoding: [0xc3]
14571302 %res = call <4 x float> @llvm.x86.sse3.hsub.ps(<4 x float> %a0, <4 x float> %a1) ; <<4 x float>> [#uses=1]
14581303 ret <4 x float> %res
14591304 }
14611306
14621307
14631308 define <16 x i8> @test_x86_sse3_ldu_dq(i8* %a0) {
1464 ; AVX-LABEL: test_x86_sse3_ldu_dq:
1465 ; AVX: ## BB#0:
1466 ; AVX-NEXT: movl {{[0-9]+}}(%esp), %eax
1467 ; AVX-NEXT: vlddqu (%eax), %xmm0
1468 ; AVX-NEXT: retl
1469 ;
1470 ; AVX512VL-LABEL: test_x86_sse3_ldu_dq:
1471 ; AVX512VL: ## BB#0:
1472 ; AVX512VL-NEXT: movl {{[0-9]+}}(%esp), %eax
1473 ; AVX512VL-NEXT: vlddqu (%eax), %xmm0
1474 ; AVX512VL-NEXT: retl
1309 ; CHECK-LABEL: test_x86_sse3_ldu_dq:
1310 ; CHECK: ## BB#0:
1311 ; CHECK-NEXT: movl {{[0-9]+}}(%esp), %eax ## encoding: [0x8b,0x44,0x24,0x04]
1312 ; CHECK-NEXT: vlddqu (%eax), %xmm0 ## encoding: [0xc5,0xfb,0xf0,0x00]
1313 ; CHECK-NEXT: retl ## encoding: [0xc3]
14751314 %res = call <16 x i8> @llvm.x86.sse3.ldu.dq(i8* %a0) ; <<16 x i8>> [#uses=1]
14761315 ret <16 x i8> %res
14771316 }
14791318
14801319
14811320 define <2 x double> @test_x86_sse41_blendvpd(<2 x double> %a0, <2 x double> %a1, <2 x double> %a2) {
1482 ; AVX-LABEL: test_x86_sse41_blendvpd:
1483 ; AVX: ## BB#0:
1484 ; AVX-NEXT: vblendvpd %xmm2, %xmm1, %xmm0, %xmm0
1485 ; AVX-NEXT: retl
1486 ;
1487 ; AVX512VL-LABEL: test_x86_sse41_blendvpd:
1488 ; AVX512VL: ## BB#0:
1489 ; AVX512VL-NEXT: vblendvpd %xmm2, %xmm1, %xmm0, %xmm0
1490 ; AVX512VL-NEXT: retl
1321 ; CHECK-LABEL: test_x86_sse41_blendvpd:
1322 ; CHECK: ## BB#0:
1323 ; CHECK-NEXT: vblendvpd %xmm2, %xmm1, %xmm0, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x4b,0xc1,0x20]
1324 ; CHECK-NEXT: retl ## encoding: [0xc3]
14911325 %res = call <2 x double> @llvm.x86.sse41.blendvpd(<2 x double> %a0, <2 x double> %a1, <2 x double> %a2) ; <<2 x double>> [#uses=1]
14921326 ret <2 x double> %res
14931327 }
14951329
14961330
14971331 define <4 x float> @test_x86_sse41_blendvps(<4 x float> %a0, <4 x float> %a1, <4 x float> %a2) {
1498 ; AVX-LABEL: test_x86_sse41_blendvps:
1499 ; AVX: ## BB#0:
1500 ; AVX-NEXT: vblendvps %xmm2, %xmm1, %xmm0, %xmm0
1501 ; AVX-NEXT: retl
1502 ;
1503 ; AVX512VL-LABEL: test_x86_sse41_blendvps:
1504 ; AVX512VL: ## BB#0:
1505 ; AVX512VL-NEXT: vblendvps %xmm2, %xmm1, %xmm0, %xmm0
1506 ; AVX512VL-NEXT: retl
1332 ; CHECK-LABEL: test_x86_sse41_blendvps:
1333 ; CHECK: ## BB#0:
1334 ; CHECK-NEXT: vblendvps %xmm2, %xmm1, %xmm0, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x4a,0xc1,0x20]
1335 ; CHECK-NEXT: retl ## encoding: [0xc3]
15071336 %res = call <4 x float> @llvm.x86.sse41.blendvps(<4 x float> %a0, <4 x float> %a1, <4 x float> %a2) ; <<4 x float>> [#uses=1]
15081337 ret <4 x float> %res
15091338 }
15111340
15121341
15131342 define <2 x double> @test_x86_sse41_dppd(<2 x double> %a0, <2 x double> %a1) {
1514 ; AVX-LABEL: test_x86_sse41_dppd:
1515 ; AVX: ## BB#0:
1516 ; AVX-NEXT: vdppd $7, %xmm1, %xmm0, %xmm0
1517 ; AVX-NEXT: retl
1518 ;
1519 ; AVX512VL-LABEL: test_x86_sse41_dppd:
1520 ; AVX512VL: ## BB#0:
1521 ; AVX512VL-NEXT: vdppd $7, %xmm1, %xmm0, %xmm0
1522 ; AVX512VL-NEXT: retl
1343 ; CHECK-LABEL: test_x86_sse41_dppd:
1344 ; CHECK: ## BB#0:
1345 ; CHECK-NEXT: vdppd $7, %xmm1, %xmm0, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x41,0xc1,0x07]
1346 ; CHECK-NEXT: retl ## encoding: [0xc3]
15231347 %res = call <2 x double> @llvm.x86.sse41.dppd(<2 x double> %a0, <2 x double> %a1, i8 7) ; <<2 x double>> [#uses=1]
15241348 ret <2 x double> %res
15251349 }
15271351
15281352
15291353 define <4 x float> @test_x86_sse41_dpps(<4 x float> %a0, <4 x float> %a1) {
1530 ; AVX-LABEL: test_x86_sse41_dpps:
1531 ; AVX: ## BB#0:
1532 ; AVX-NEXT: vdpps $7, %xmm1, %xmm0, %xmm0
1533 ; AVX-NEXT: retl
1534 ;
1535 ; AVX512VL-LABEL: test_x86_sse41_dpps:
1536 ; AVX512VL: ## BB#0:
1537 ; AVX512VL-NEXT: vdpps $7, %xmm1, %xmm0, %xmm0
1538 ; AVX512VL-NEXT: retl
1354 ; CHECK-LABEL: test_x86_sse41_dpps:
1355 ; CHECK: ## BB#0:
1356 ; CHECK-NEXT: vdpps $7, %xmm1, %xmm0, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x40,0xc1,0x07]
1357 ; CHECK-NEXT: retl ## encoding: [0xc3]
15391358 %res = call <4 x float> @llvm.x86.sse41.dpps(<4 x float> %a0, <4 x float> %a1, i8 7) ; <<4 x float>> [#uses=1]
15401359 ret <4 x float> %res
15411360 }
15451364 define <4 x float> @test_x86_sse41_insertps(<4 x float> %a0, <4 x float> %a1) {
15461365 ; AVX-LABEL: test_x86_sse41_insertps:
15471366 ; AVX: ## BB#0:
1548 ; AVX-NEXT: vinsertps {{.*#+}} xmm0 = zero,xmm1[0],zero,xmm0[3]
1549 ; AVX-NEXT: retl
1367 ; AVX-NEXT: vinsertps $21, %xmm1, %xmm0, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x21,0xc1,0x15]
1368 ; AVX-NEXT: ## xmm0 = zero,xmm1[0],zero,xmm0[3]
1369 ; AVX-NEXT: retl ## encoding: [0xc3]
15501370 ;
15511371 ; AVX512VL-LABEL: test_x86_sse41_insertps:
15521372 ; AVX512VL: ## BB#0:
1553 ; AVX512VL-NEXT: vinsertps {{.*#+}} xmm0 = zero,xmm1[0],zero,xmm0[3]
1554 ; AVX512VL-NEXT: retl
1373 ; AVX512VL-NEXT: vinsertps $21, %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf3,0x7d,0x08,0x21,0xc1,0x15]
1374 ; AVX512VL-NEXT: ## xmm0 = zero,xmm1[0],zero,xmm0[3]
1375 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
15551376 %res = call <4 x float> @llvm.x86.sse41.insertps(<4 x float> %a0, <4 x float> %a1, i8 21) ; <<4 x float>> [#uses=1]
15561377 ret <4 x float> %res
15571378 }
15601381
15611382
15621383 define <8 x i16> @test_x86_sse41_mpsadbw(<16 x i8> %a0, <16 x i8> %a1) {
1563 ; AVX-LABEL: test_x86_sse41_mpsadbw:
1564 ; AVX: ## BB#0:
1565 ; AVX-NEXT: vmpsadbw $7, %xmm1, %xmm0, %xmm0
1566 ; AVX-NEXT: retl
1567 ;
1568 ; AVX512VL-LABEL: test_x86_sse41_mpsadbw:
1569 ; AVX512VL: ## BB#0:
1570 ; AVX512VL-NEXT: vmpsadbw $7, %xmm1, %xmm0, %xmm0
1571 ; AVX512VL-NEXT: retl
1384 ; CHECK-LABEL: test_x86_sse41_mpsadbw:
1385 ; CHECK: ## BB#0:
1386 ; CHECK-NEXT: vmpsadbw $7, %xmm1, %xmm0, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x42,0xc1,0x07]
1387 ; CHECK-NEXT: retl ## encoding: [0xc3]
15721388 %res = call <8 x i16> @llvm.x86.sse41.mpsadbw(<16 x i8> %a0, <16 x i8> %a1, i8 7) ; <<8 x i16>> [#uses=1]
15731389 ret <8 x i16> %res
15741390 }
15781394 define <8 x i16> @test_x86_sse41_packusdw(<4 x i32> %a0, <4 x i32> %a1) {
15791395 ; AVX-LABEL: test_x86_sse41_packusdw:
15801396 ; AVX: ## BB#0:
1581 ; AVX-NEXT: vpackusdw %xmm1, %xmm0, %xmm0
1582 ; AVX-NEXT: retl
1397 ; AVX-NEXT: vpackusdw %xmm1, %xmm0, %xmm0 ## encoding: [0xc4,0xe2,0x79,0x2b,0xc1]
1398 ; AVX-NEXT: retl ## encoding: [0xc3]
15831399 ;
15841400 ; AVX512VL-LABEL: test_x86_sse41_packusdw:
15851401 ; AVX512VL: ## BB#0:
1586 ; AVX512VL-NEXT: vpackusdw %xmm1, %xmm0, %xmm0
1587 ; AVX512VL-NEXT: retl
1402 ; AVX512VL-NEXT: vpackusdw %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf2,0x7d,0x08,0x2b,0xc1]
1403 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
15881404 %res = call <8 x i16> @llvm.x86.sse41.packusdw(<4 x i32> %a0, <4 x i32> %a1) ; <<8 x i16>> [#uses=1]
15891405 ret <8 x i16> %res
15901406 }
15921408
15931409
15941410 define <16 x i8> @test_x86_sse41_pblendvb(<16 x i8> %a0, <16 x i8> %a1, <16 x i8> %a2) {
1595 ; AVX-LABEL: test_x86_sse41_pblendvb:
1596 ; AVX: ## BB#0:
1597 ; AVX-NEXT: vpblendvb %xmm2, %xmm1, %xmm0, %xmm0
1598 ; AVX-NEXT: retl
1599 ;
1600 ; AVX512VL-LABEL: test_x86_sse41_pblendvb:
1601 ; AVX512VL: ## BB#0:
1602 ; AVX512VL-NEXT: vpblendvb %xmm2, %xmm1, %xmm0, %xmm0
1603 ; AVX512VL-NEXT: retl
1411 ; CHECK-LABEL: test_x86_sse41_pblendvb:
1412 ; CHECK: ## BB#0:
1413 ; CHECK-NEXT: vpblendvb %xmm2, %xmm1, %xmm0, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x4c,0xc1,0x20]
1414 ; CHECK-NEXT: retl ## encoding: [0xc3]
16041415 %res = call <16 x i8> @llvm.x86.sse41.pblendvb(<16 x i8> %a0, <16 x i8> %a1, <16 x i8> %a2) ; <<16 x i8>> [#uses=1]
16051416 ret <16 x i8> %res
16061417 }
16081419
16091420
16101421 define <8 x i16> @test_x86_sse41_phminposuw(<8 x i16> %a0) {
1611 ; AVX-LABEL: test_x86_sse41_phminposuw:
1612 ; AVX: ## BB#0:
1613 ; AVX-NEXT: vphminposuw %xmm0, %xmm0
1614 ; AVX-NEXT: retl
1615 ;
1616 ; AVX512VL-LABEL: test_x86_sse41_phminposuw:
1617 ; AVX512VL: ## BB#0:
1618 ; AVX512VL-NEXT: vphminposuw %xmm0, %xmm0
1619 ; AVX512VL-NEXT: retl
1422 ; CHECK-LABEL: test_x86_sse41_phminposuw:
1423 ; CHECK: ## BB#0:
1424 ; CHECK-NEXT: vphminposuw %xmm0, %xmm0 ## encoding: [0xc4,0xe2,0x79,0x41,0xc0]
1425 ; CHECK-NEXT: retl ## encoding: [0xc3]
16201426 %res = call <8 x i16> @llvm.x86.sse41.phminposuw(<8 x i16> %a0) ; <<8 x i16>> [#uses=1]
16211427 ret <8 x i16> %res
16221428 }
16261432 define <16 x i8> @test_x86_sse41_pmaxsb(<16 x i8> %a0, <16 x i8> %a1) {
16271433 ; AVX-LABEL: test_x86_sse41_pmaxsb:
16281434 ; AVX: ## BB#0:
1629 ; AVX-NEXT: vpmaxsb %xmm1, %xmm0, %xmm0
1630 ; AVX-NEXT: retl
1435 ; AVX-NEXT: vpmaxsb %xmm1, %xmm0, %xmm0 ## encoding: [0xc4,0xe2,0x79,0x3c,0xc1]
1436 ; AVX-NEXT: retl ## encoding: [0xc3]
16311437 ;
16321438 ; AVX512VL-LABEL: test_x86_sse41_pmaxsb:
16331439 ; AVX512VL: ## BB#0:
1634 ; AVX512VL-NEXT: vpmaxsb %xmm1, %xmm0, %xmm0
1635 ; AVX512VL-NEXT: retl
1440 ; AVX512VL-NEXT: vpmaxsb %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf2,0x7d,0x08,0x3c,0xc1]
1441 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
16361442 %res = call <16 x i8> @llvm.x86.sse41.pmaxsb(<16 x i8> %a0, <16 x i8> %a1) ; <<16 x i8>> [#uses=1]
16371443 ret <16 x i8> %res
16381444 }
16421448 define <4 x i32> @test_x86_sse41_pmaxsd(<4 x i32> %a0, <4 x i32> %a1) {
16431449 ; AVX-LABEL: test_x86_sse41_pmaxsd:
16441450 ; AVX: ## BB#0:
1645 ; AVX-NEXT: vpmaxsd %xmm1, %xmm0, %xmm0
1646 ; AVX-NEXT: retl
1451 ; AVX-NEXT: vpmaxsd %xmm1, %xmm0, %xmm0 ## encoding: [0xc4,0xe2,0x79,0x3d,0xc1]
1452 ; AVX-NEXT: retl ## encoding: [0xc3]
16471453 ;
16481454 ; AVX512VL-LABEL: test_x86_sse41_pmaxsd:
16491455 ; AVX512VL: ## BB#0:
1650 ; AVX512VL-NEXT: vpmaxsd %xmm1, %xmm0, %xmm0
1651 ; AVX512VL-NEXT: retl
1456 ; AVX512VL-NEXT: vpmaxsd %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf2,0x7d,0x08,0x3d,0xc1]
1457 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
16521458 %res = call <4 x i32> @llvm.x86.sse41.pmaxsd(<4 x i32> %a0, <4 x i32> %a1) ; <<4 x i32>> [#uses=1]
16531459 ret <4 x i32> %res
16541460 }
16581464 define <4 x i32> @test_x86_sse41_pmaxud(<4 x i32> %a0, <4 x i32> %a1) {
16591465 ; AVX-LABEL: test_x86_sse41_pmaxud:
16601466 ; AVX: ## BB#0:
1661 ; AVX-NEXT: vpmaxud %xmm1, %xmm0, %xmm0
1662 ; AVX-NEXT: retl
1467 ; AVX-NEXT: vpmaxud %xmm1, %xmm0, %xmm0 ## encoding: [0xc4,0xe2,0x79,0x3f,0xc1]
1468 ; AVX-NEXT: retl ## encoding: [0xc3]
16631469 ;
16641470 ; AVX512VL-LABEL: test_x86_sse41_pmaxud:
16651471 ; AVX512VL: ## BB#0:
1666 ; AVX512VL-NEXT: vpmaxud %xmm1, %xmm0, %xmm0
1667 ; AVX512VL-NEXT: retl
1472 ; AVX512VL-NEXT: vpmaxud %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf2,0x7d,0x08,0x3f,0xc1]
1473 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
16681474 %res = call <4 x i32> @llvm.x86.sse41.pmaxud(<4 x i32> %a0, <4 x i32> %a1) ; <<4 x i32>> [#uses=1]
16691475 ret <4 x i32> %res
16701476 }
16741480 define <8 x i16> @test_x86_sse41_pmaxuw(<8 x i16> %a0, <8 x i16> %a1) {
16751481 ; AVX-LABEL: test_x86_sse41_pmaxuw:
16761482 ; AVX: ## BB#0:
1677 ; AVX-NEXT: vpmaxuw %xmm1, %xmm0, %xmm0
1678 ; AVX-NEXT: retl
1483 ; AVX-NEXT: vpmaxuw %xmm1, %xmm0, %xmm0 ## encoding: [0xc4,0xe2,0x79,0x3e,0xc1]
1484 ; AVX-NEXT: retl ## encoding: [0xc3]
16791485 ;
16801486 ; AVX512VL-LABEL: test_x86_sse41_pmaxuw:
16811487 ; AVX512VL: ## BB#0:
1682 ; AVX512VL-NEXT: vpmaxuw %xmm1, %xmm0, %xmm0
1683 ; AVX512VL-NEXT: retl
1488 ; AVX512VL-NEXT: vpmaxuw %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf2,0x7d,0x08,0x3e,0xc1]
1489 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
16841490 %res = call <8 x i16> @llvm.x86.sse41.pmaxuw(<8 x i16> %a0, <8 x i16> %a1) ; <<8 x i16>> [#uses=1]
16851491 ret <8 x i16> %res
16861492 }
16901496 define <16 x i8> @test_x86_sse41_pminsb(<16 x i8> %a0, <16 x i8> %a1) {
16911497 ; AVX-LABEL: test_x86_sse41_pminsb:
16921498 ; AVX: ## BB#0:
1693 ; AVX-NEXT: vpminsb %xmm1, %xmm0, %xmm0
1694 ; AVX-NEXT: retl
1499 ; AVX-NEXT: vpminsb %xmm1, %xmm0, %xmm0 ## encoding: [0xc4,0xe2,0x79,0x38,0xc1]
1500 ; AVX-NEXT: retl ## encoding: [0xc3]
16951501 ;
16961502 ; AVX512VL-LABEL: test_x86_sse41_pminsb:
16971503 ; AVX512VL: ## BB#0:
1698 ; AVX512VL-NEXT: vpminsb %xmm1, %xmm0, %xmm0
1699 ; AVX512VL-NEXT: retl
1504 ; AVX512VL-NEXT: vpminsb %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf2,0x7d,0x08,0x38,0xc1]
1505 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
17001506 %res = call <16 x i8> @llvm.x86.sse41.pminsb(<16 x i8> %a0, <16 x i8> %a1) ; <<16 x i8>> [#uses=1]
17011507 ret <16 x i8> %res
17021508 }
17061512 define <4 x i32> @test_x86_sse41_pminsd(<4 x i32> %a0, <4 x i32> %a1) {
17071513 ; AVX-LABEL: test_x86_sse41_pminsd:
17081514 ; AVX: ## BB#0:
1709 ; AVX-NEXT: vpminsd %xmm1, %xmm0, %xmm0
1710 ; AVX-NEXT: retl
1515 ; AVX-NEXT: vpminsd %xmm1, %xmm0, %xmm0 ## encoding: [0xc4,0xe2,0x79,0x39,0xc1]
1516 ; AVX-NEXT: retl ## encoding: [0xc3]
17111517 ;
17121518 ; AVX512VL-LABEL: test_x86_sse41_pminsd:
17131519 ; AVX512VL: ## BB#0:
1714 ; AVX512VL-NEXT: vpminsd %xmm1, %xmm0, %xmm0
1715 ; AVX512VL-NEXT: retl
1520 ; AVX512VL-NEXT: vpminsd %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf2,0x7d,0x08,0x39,0xc1]
1521 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
17161522 %res = call <4 x i32> @llvm.x86.sse41.pminsd(<4 x i32> %a0, <4 x i32> %a1) ; <<4 x i32>> [#uses=1]
17171523 ret <4 x i32> %res
17181524 }
17221528 define <4 x i32> @test_x86_sse41_pminud(<4 x i32> %a0, <4 x i32> %a1) {
17231529 ; AVX-LABEL: test_x86_sse41_pminud:
17241530 ; AVX: ## BB#0:
1725 ; AVX-NEXT: vpminud %xmm1, %xmm0, %xmm0
1726 ; AVX-NEXT: retl
1531 ; AVX-NEXT: vpminud %xmm1, %xmm0, %xmm0 ## encoding: [0xc4,0xe2,0x79,0x3b,0xc1]
1532 ; AVX-NEXT: retl ## encoding: [0xc3]
17271533 ;
17281534 ; AVX512VL-LABEL: test_x86_sse41_pminud:
17291535 ; AVX512VL: ## BB#0:
1730 ; AVX512VL-NEXT: vpminud %xmm1, %xmm0, %xmm0
1731 ; AVX512VL-NEXT: retl
1536 ; AVX512VL-NEXT: vpminud %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf2,0x7d,0x08,0x3b,0xc1]
1537 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
17321538 %res = call <4 x i32> @llvm.x86.sse41.pminud(<4 x i32> %a0, <4 x i32> %a1) ; <<4 x i32>> [#uses=1]
17331539 ret <4 x i32> %res
17341540 }
17381544 define <8 x i16> @test_x86_sse41_pminuw(<8 x i16> %a0, <8 x i16> %a1) {
17391545 ; AVX-LABEL: test_x86_sse41_pminuw:
17401546 ; AVX: ## BB#0:
1741 ; AVX-NEXT: vpminuw %xmm1, %xmm0, %xmm0
1742 ; AVX-NEXT: retl
1547 ; AVX-NEXT: vpminuw %xmm1, %xmm0, %xmm0 ## encoding: [0xc4,0xe2,0x79,0x3a,0xc1]
1548 ; AVX-NEXT: retl ## encoding: [0xc3]
17431549 ;
17441550 ; AVX512VL-LABEL: test_x86_sse41_pminuw:
17451551 ; AVX512VL: ## BB#0:
1746 ; AVX512VL-NEXT: vpminuw %xmm1, %xmm0, %xmm0
1747 ; AVX512VL-NEXT: retl
1552 ; AVX512VL-NEXT: vpminuw %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf2,0x7d,0x08,0x3a,0xc1]
1553 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
17481554 %res = call <8 x i16> @llvm.x86.sse41.pminuw(<8 x i16> %a0, <8 x i16> %a1) ; <<8 x i16>> [#uses=1]
17491555 ret <8 x i16> %res
17501556 }
17541560 define <2 x i64> @test_x86_sse41_pmuldq(<4 x i32> %a0, <4 x i32> %a1) {
17551561 ; AVX-LABEL: test_x86_sse41_pmuldq:
17561562 ; AVX: ## BB#0:
1757 ; AVX-NEXT: vpmuldq %xmm1, %xmm0, %xmm0
1758 ; AVX-NEXT: retl
1563 ; AVX-NEXT: vpmuldq %xmm1, %xmm0, %xmm0 ## encoding: [0xc4,0xe2,0x79,0x28,0xc1]
1564 ; AVX-NEXT: retl ## encoding: [0xc3]
17591565 ;
17601566 ; AVX512VL-LABEL: test_x86_sse41_pmuldq:
17611567 ; AVX512VL: ## BB#0:
1762 ; AVX512VL-NEXT: vpmuldq %xmm1, %xmm0, %xmm0
1763 ; AVX512VL-NEXT: retl
1568 ; AVX512VL-NEXT: vpmuldq %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf2,0xfd,0x08,0x28,0xc1]
1569 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
17641570 %res = call <2 x i64> @llvm.x86.sse41.pmuldq(<4 x i32> %a0, <4 x i32> %a1) ; <<2 x i64>> [#uses=1]
17651571 ret <2 x i64> %res
17661572 }
17681574
17691575
17701576 define i32 @test_x86_sse41_ptestc(<2 x i64> %a0, <2 x i64> %a1) {
1771 ; AVX-LABEL: test_x86_sse41_ptestc:
1772 ; AVX: ## BB#0:
1773 ; AVX-NEXT: vptest %xmm1, %xmm0
1774 ; AVX-NEXT: sbbl %eax, %eax
1775 ; AVX-NEXT: andl $1, %eax
1776 ; AVX-NEXT: retl
1777 ;
1778 ; AVX512VL-LABEL: test_x86_sse41_ptestc:
1779 ; AVX512VL: ## BB#0:
1780 ; AVX512VL-NEXT: vptest %xmm1, %xmm0
1781 ; AVX512VL-NEXT: sbbl %eax, %eax
1782 ; AVX512VL-NEXT: andl $1, %eax
1783 ; AVX512VL-NEXT: retl
1577 ; CHECK-LABEL: test_x86_sse41_ptestc:
1578 ; CHECK: ## BB#0:
1579 ; CHECK-NEXT: vptest %xmm1, %xmm0 ## encoding: [0xc4,0xe2,0x79,0x17,0xc1]
1580 ; CHECK-NEXT: sbbl %eax, %eax ## encoding: [0x19,0xc0]
1581 ; CHECK-NEXT: andl $1, %eax ## encoding: [0x83,0xe0,0x01]
1582 ; CHECK-NEXT: retl ## encoding: [0xc3]
17841583 %res = call i32 @llvm.x86.sse41.ptestc(<2 x i64> %a0, <2 x i64> %a1) ; [#uses=1]
17851584 ret i32 %res
17861585 }
17881587
17891588
17901589 define i32 @test_x86_sse41_ptestnzc(<2 x i64> %a0, <2 x i64> %a1) {
1791 ; AVX-LABEL: test_x86_sse41_ptestnzc:
1792 ; AVX: ## BB#0:
1793 ; AVX-NEXT: xorl %eax, %eax
1794 ; AVX-NEXT: vptest %xmm1, %xmm0
1795 ; AVX-NEXT: seta %al
1796 ; AVX-NEXT: retl
1797 ;
1798 ; AVX512VL-LABEL: test_x86_sse41_ptestnzc:
1799 ; AVX512VL: ## BB#0:
1800 ; AVX512VL-NEXT: xorl %eax, %eax
1801 ; AVX512VL-NEXT: vptest %xmm1, %xmm0
1802 ; AVX512VL-NEXT: seta %al
1803 ; AVX512VL-NEXT: retl
1590 ; CHECK-LABEL: test_x86_sse41_ptestnzc:
1591 ; CHECK: ## BB#0:
1592 ; CHECK-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
1593 ; CHECK-NEXT: vptest %xmm1, %xmm0 ## encoding: [0xc4,0xe2,0x79,0x17,0xc1]
1594 ; CHECK-NEXT: seta %al ## encoding: [0x0f,0x97,0xc0]
1595 ; CHECK-NEXT: retl ## encoding: [0xc3]
18041596 %res = call i32 @llvm.x86.sse41.ptestnzc(<2 x i64> %a0, <2 x i64> %a1) ; [#uses=1]
18051597 ret i32 %res
18061598 }
18081600
18091601
18101602 define i32 @test_x86_sse41_ptestz(<2 x i64> %a0, <2 x i64> %a1) {
1811 ; AVX-LABEL: test_x86_sse41_ptestz:
1812 ; AVX: ## BB#0:
1813 ; AVX-NEXT: xorl %eax, %eax
1814 ; AVX-NEXT: vptest %xmm1, %xmm0
1815 ; AVX-NEXT: sete %al
1816 ; AVX-NEXT: retl
1817 ;
1818 ; AVX512VL-LABEL: test_x86_sse41_ptestz:
1819 ; AVX512VL: ## BB#0:
1820 ; AVX512VL-NEXT: xorl %eax, %eax
1821 ; AVX512VL-NEXT: vptest %xmm1, %xmm0
1822 ; AVX512VL-NEXT: sete %al
1823 ; AVX512VL-NEXT: retl
1603 ; CHECK-LABEL: test_x86_sse41_ptestz:
1604 ; CHECK: ## BB#0:
1605 ; CHECK-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
1606 ; CHECK-NEXT: vptest %xmm1, %xmm0 ## encoding: [0xc4,0xe2,0x79,0x17,0xc1]
1607 ; CHECK-NEXT: sete %al ## encoding: [0x0f,0x94,0xc0]
1608 ; CHECK-NEXT: retl ## encoding: [0xc3]
18241609 %res = call i32 @llvm.x86.sse41.ptestz(<2 x i64> %a0, <2 x i64> %a1) ; [#uses=1]
18251610 ret i32 %res
18261611 }
18281613
18291614
18301615 define <2 x double> @test_x86_sse41_round_pd(<2 x double> %a0) {
1831 ; AVX-LABEL: test_x86_sse41_round_pd:
1832 ; AVX: ## BB#0:
1833 ; AVX-NEXT: vroundpd $7, %xmm0, %xmm0
1834 ; AVX-NEXT: retl
1835 ;
1836 ; AVX512VL-LABEL: test_x86_sse41_round_pd:
1837 ; AVX512VL: ## BB#0:
1838 ; AVX512VL-NEXT: vroundpd $7, %xmm0, %xmm0
1839 ; AVX512VL-NEXT: retl
1616 ; CHECK-LABEL: test_x86_sse41_round_pd:
1617 ; CHECK: ## BB#0:
1618 ; CHECK-NEXT: vroundpd $7, %xmm0, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x09,0xc0,0x07]
1619 ; CHECK-NEXT: retl ## encoding: [0xc3]
18401620 %res = call <2 x double> @llvm.x86.sse41.round.pd(<2 x double> %a0, i32 7) ; <<2 x double>> [#uses=1]
18411621 ret <2 x double> %res
18421622 }
18441624
18451625
18461626 define <4 x float> @test_x86_sse41_round_ps(<4 x float> %a0) {
1847 ; AVX-LABEL: test_x86_sse41_round_ps:
1848 ; AVX: ## BB#0:
1849 ; AVX-NEXT: vroundps $7, %xmm0, %xmm0
1850 ; AVX-NEXT: retl
1851 ;
1852 ; AVX512VL-LABEL: test_x86_sse41_round_ps:
1853 ; AVX512VL: ## BB#0:
1854 ; AVX512VL-NEXT: vroundps $7, %xmm0, %xmm0
1855 ; AVX512VL-NEXT: retl
1627 ; CHECK-LABEL: test_x86_sse41_round_ps:
1628 ; CHECK: ## BB#0:
1629 ; CHECK-NEXT: vroundps $7, %xmm0, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x08,0xc0,0x07]
1630 ; CHECK-NEXT: retl ## encoding: [0xc3]
18561631 %res = call <4 x float> @llvm.x86.sse41.round.ps(<4 x float> %a0, i32 7) ; <<4 x float>> [#uses=1]
18571632 ret <4 x float> %res
18581633 }
18601635
18611636
18621637 define <2 x double> @test_x86_sse41_round_sd(<2 x double> %a0, <2 x double> %a1) {
1863 ; AVX-LABEL: test_x86_sse41_round_sd:
1864 ; AVX: ## BB#0:
1865 ; AVX-NEXT: vroundsd $7, %xmm1, %xmm0, %xmm0
1866 ; AVX-NEXT: retl
1867 ;
1868 ; AVX512VL-LABEL: test_x86_sse41_round_sd:
1869 ; AVX512VL: ## BB#0:
1870 ; AVX512VL-NEXT: vroundsd $7, %xmm1, %xmm0, %xmm0
1871 ; AVX512VL-NEXT: retl
1638 ; CHECK-LABEL: test_x86_sse41_round_sd:
1639 ; CHECK: ## BB#0:
1640 ; CHECK-NEXT: vroundsd $7, %xmm1, %xmm0, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x0b,0xc1,0x07]
1641 ; CHECK-NEXT: retl ## encoding: [0xc3]
18721642 %res = call <2 x double> @llvm.x86.sse41.round.sd(<2 x double> %a0, <2 x double> %a1, i32 7) ; <<2 x double>> [#uses=1]
18731643 ret <2 x double> %res
18741644 }
18761646
18771647
18781648 define <4 x float> @test_x86_sse41_round_ss(<4 x float> %a0, <4 x float> %a1) {
1879 ; AVX-LABEL: test_x86_sse41_round_ss:
1880 ; AVX: ## BB#0:
1881 ; AVX-NEXT: vroundss $7, %xmm1, %xmm0, %xmm0
1882 ; AVX-NEXT: retl
1883 ;
1884 ; AVX512VL-LABEL: test_x86_sse41_round_ss:
1885 ; AVX512VL: ## BB#0:
1886 ; AVX512VL-NEXT: vroundss $7, %xmm1, %xmm0, %xmm0
1887 ; AVX512VL-NEXT: retl
1649 ; CHECK-LABEL: test_x86_sse41_round_ss:
1650 ; CHECK: ## BB#0:
1651 ; CHECK-NEXT: vroundss $7, %xmm1, %xmm0, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x0a,0xc1,0x07]
1652 ; CHECK-NEXT: retl ## encoding: [0xc3]
18881653 %res = call <4 x float> @llvm.x86.sse41.round.ss(<4 x float> %a0, <4 x float> %a1, i32 7) ; <<4 x float>> [#uses=1]
18891654 ret <4 x float> %res
18901655 }
18921657
18931658
18941659 define i32 @test_x86_sse42_pcmpestri128(<16 x i8> %a0, <16 x i8> %a2) {
1895 ; AVX-LABEL: test_x86_sse42_pcmpestri128:
1896 ; AVX: ## BB#0:
1897 ; AVX-NEXT: movl $7, %eax
1898 ; AVX-NEXT: movl $7, %edx
1899 ; AVX-NEXT: vpcmpestri $7, %xmm1, %xmm0
1900 ; AVX-NEXT: movl %ecx, %eax
1901 ; AVX-NEXT: retl
1902 ;
1903 ; AVX512VL-LABEL: test_x86_sse42_pcmpestri128:
1904 ; AVX512VL: ## BB#0:
1905 ; AVX512VL-NEXT: movl $7, %eax
1906 ; AVX512VL-NEXT: movl $7, %edx
1907 ; AVX512VL-NEXT: vpcmpestri $7, %xmm1, %xmm0
1908 ; AVX512VL-NEXT: movl %ecx, %eax
1909 ; AVX512VL-NEXT: retl
1660 ; CHECK-LABEL: test_x86_sse42_pcmpestri128:
1661 ; CHECK: ## BB#0:
1662 ; CHECK-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
1663 ; CHECK-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
1664 ; CHECK-NEXT: vpcmpestri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x61,0xc1,0x07]
1665 ; CHECK-NEXT: movl %ecx, %eax ## encoding: [0x89,0xc8]
1666 ; CHECK-NEXT: retl ## encoding: [0xc3]
19101667 %res = call i32 @llvm.x86.sse42.pcmpestri128(<16 x i8> %a0, i32 7, <16 x i8> %a2, i32 7, i8 7) ; [#uses=1]
19111668 ret i32 %res
19121669 }
19161673 define i32 @test_x86_sse42_pcmpestri128_load(<16 x i8>* %a0, <16 x i8>* %a2) {
19171674 ; AVX-LABEL: test_x86_sse42_pcmpestri128_load:
19181675 ; AVX: ## BB#0:
1919 ; AVX-NEXT: movl {{[0-9]+}}(%esp), %ecx
1920 ; AVX-NEXT: movl {{[0-9]+}}(%esp), %eax
1921 ; AVX-NEXT: vmovdqa (%eax), %xmm0
1922 ; AVX-NEXT: movl $7, %eax
1923 ; AVX-NEXT: movl $7, %edx
1924 ; AVX-NEXT: vpcmpestri $7, (%ecx), %xmm0
1925 ; AVX-NEXT: movl %ecx, %eax
1926 ; AVX-NEXT: retl
1676 ; AVX-NEXT: movl {{[0-9]+}}(%esp), %ecx ## encoding: [0x8b,0x4c,0x24,0x08]
1677 ; AVX-NEXT: movl {{[0-9]+}}(%esp), %eax ## encoding: [0x8b,0x44,0x24,0x04]
1678 ; AVX-NEXT: vmovdqa (%eax), %xmm0 ## encoding: [0xc5,0xf9,0x6f,0x00]
1679 ; AVX-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
1680 ; AVX-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
1681 ; AVX-NEXT: vpcmpestri $7, (%ecx), %xmm0 ## encoding: [0xc4,0xe3,0x79,0x61,0x01,0x07]
1682 ; AVX-NEXT: movl %ecx, %eax ## encoding: [0x89,0xc8]
1683 ; AVX-NEXT: retl ## encoding: [0xc3]
19271684 ;
19281685 ; AVX512VL-LABEL: test_x86_sse42_pcmpestri128_load:
19291686 ; AVX512VL: ## BB#0:
1930 ; AVX512VL-NEXT: movl {{[0-9]+}}(%esp), %ecx
1931 ; AVX512VL-NEXT: movl {{[0-9]+}}(%esp), %eax
1932 ; AVX512VL-NEXT: vmovdqa64 (%eax), %xmm0
1933 ; AVX512VL-NEXT: movl $7, %eax
1934 ; AVX512VL-NEXT: movl $7, %edx
1935 ; AVX512VL-NEXT: vpcmpestri $7, (%ecx), %xmm0
1936 ; AVX512VL-NEXT: movl %ecx, %eax
1937 ; AVX512VL-NEXT: retl
1687 ; AVX512VL-NEXT: movl {{[0-9]+}}(%esp), %ecx ## encoding: [0x8b,0x4c,0x24,0x08]
1688 ; AVX512VL-NEXT: movl {{[0-9]+}}(%esp), %eax ## encoding: [0x8b,0x44,0x24,0x04]
1689 ; AVX512VL-NEXT: vmovdqu8 (%eax), %xmm0 ## encoding: [0x62,0xf1,0x7f,0x08,0x6f,0x00]
1690 ; AVX512VL-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
1691 ; AVX512VL-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
1692 ; AVX512VL-NEXT: vpcmpestri $7, (%ecx), %xmm0 ## encoding: [0xc4,0xe3,0x79,0x61,0x01,0x07]
1693 ; AVX512VL-NEXT: movl %ecx, %eax ## encoding: [0x89,0xc8]
1694 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
19381695 %1 = load <16 x i8>, <16 x i8>* %a0
19391696 %2 = load <16 x i8>, <16 x i8>* %a2
19401697 %res = call i32 @llvm.x86.sse42.pcmpestri128(<16 x i8> %1, i32 7, <16 x i8> %2, i32 7, i8 7) ; [#uses=1]
19431700
19441701
19451702 define i32 @test_x86_sse42_pcmpestria128(<16 x i8> %a0, <16 x i8> %a2) nounwind {
1946 ; AVX-LABEL: test_x86_sse42_pcmpestria128:
1947 ; AVX: ## BB#0:
1948 ; AVX-NEXT: pushl %ebx
1949 ; AVX-NEXT: movl $7, %eax
1950 ; AVX-NEXT: movl $7, %edx
1951 ; AVX-NEXT: xorl %ebx, %ebx
1952 ; AVX-NEXT: vpcmpestri $7, %xmm1, %xmm0
1953 ; AVX-NEXT: seta %bl
1954 ; AVX-NEXT: movl %ebx, %eax
1955 ; AVX-NEXT: popl %ebx
1956 ; AVX-NEXT: retl
1957 ;
1958 ; AVX512VL-LABEL: test_x86_sse42_pcmpestria128:
1959 ; AVX512VL: ## BB#0:
1960 ; AVX512VL-NEXT: pushl %ebx
1961 ; AVX512VL-NEXT: movl $7, %eax
1962 ; AVX512VL-NEXT: movl $7, %edx
1963 ; AVX512VL-NEXT: xorl %ebx, %ebx
1964 ; AVX512VL-NEXT: vpcmpestri $7, %xmm1, %xmm0
1965 ; AVX512VL-NEXT: seta %bl
1966 ; AVX512VL-NEXT: movl %ebx, %eax
1967 ; AVX512VL-NEXT: popl %ebx
1968 ; AVX512VL-NEXT: retl
1703 ; CHECK-LABEL: test_x86_sse42_pcmpestria128:
1704 ; CHECK: ## BB#0:
1705 ; CHECK-NEXT: pushl %ebx ## encoding: [0x53]
1706 ; CHECK-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
1707 ; CHECK-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
1708 ; CHECK-NEXT: xorl %ebx, %ebx ## encoding: [0x31,0xdb]
1709 ; CHECK-NEXT: vpcmpestri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x61,0xc1,0x07]
1710 ; CHECK-NEXT: seta %bl ## encoding: [0x0f,0x97,0xc3]
1711 ; CHECK-NEXT: movl %ebx, %eax ## encoding: [0x89,0xd8]
1712 ; CHECK-NEXT: popl %ebx ## encoding: [0x5b]
1713 ; CHECK-NEXT: retl ## encoding: [0xc3]
19691714 %res = call i32 @llvm.x86.sse42.pcmpestria128(<16 x i8> %a0, i32 7, <16 x i8> %a2, i32 7, i8 7) ; [#uses=1]
19701715 ret i32 %res
19711716 }
19731718
19741719
19751720 define i32 @test_x86_sse42_pcmpestric128(<16 x i8> %a0, <16 x i8> %a2) {
1976 ; AVX-LABEL: test_x86_sse42_pcmpestric128:
1977 ; AVX: ## BB#0:
1978 ; AVX-NEXT: movl $7, %eax
1979 ; AVX-NEXT: movl $7, %edx
1980 ; AVX-NEXT: vpcmpestri $7, %xmm1, %xmm0
1981 ; AVX-NEXT: sbbl %eax, %eax
1982 ; AVX-NEXT: andl $1, %eax
1983 ; AVX-NEXT: retl
1984 ;
1985 ; AVX512VL-LABEL: test_x86_sse42_pcmpestric128:
1986 ; AVX512VL: ## BB#0:
1987 ; AVX512VL-NEXT: movl $7, %eax
1988 ; AVX512VL-NEXT: movl $7, %edx
1989 ; AVX512VL-NEXT: vpcmpestri $7, %xmm1, %xmm0
1990 ; AVX512VL-NEXT: sbbl %eax, %eax
1991 ; AVX512VL-NEXT: andl $1, %eax
1992 ; AVX512VL-NEXT: retl
1721 ; CHECK-LABEL: test_x86_sse42_pcmpestric128:
1722 ; CHECK: ## BB#0:
1723 ; CHECK-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
1724 ; CHECK-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
1725 ; CHECK-NEXT: vpcmpestri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x61,0xc1,0x07]
1726 ; CHECK-NEXT: sbbl %eax, %eax ## encoding: [0x19,0xc0]
1727 ; CHECK-NEXT: andl $1, %eax ## encoding: [0x83,0xe0,0x01]
1728 ; CHECK-NEXT: retl ## encoding: [0xc3]
19931729 %res = call i32 @llvm.x86.sse42.pcmpestric128(<16 x i8> %a0, i32 7, <16 x i8> %a2, i32 7, i8 7) ; [#uses=1]
19941730 ret i32 %res
19951731 }
19971733
19981734
19991735 define i32 @test_x86_sse42_pcmpestrio128(<16 x i8> %a0, <16 x i8> %a2) nounwind {
2000 ; AVX-LABEL: test_x86_sse42_pcmpestrio128:
2001 ; AVX: ## BB#0:
2002 ; AVX-NEXT: pushl %ebx
2003 ; AVX-NEXT: movl $7, %eax
2004 ; AVX-NEXT: movl $7, %edx
2005 ; AVX-NEXT: xorl %ebx, %ebx
2006 ; AVX-NEXT: vpcmpestri $7, %xmm1, %xmm0
2007 ; AVX-NEXT: seto %bl
2008 ; AVX-NEXT: movl %ebx, %eax
2009 ; AVX-NEXT: popl %ebx
2010 ; AVX-NEXT: retl
2011 ;
2012 ; AVX512VL-LABEL: test_x86_sse42_pcmpestrio128:
2013 ; AVX512VL: ## BB#0:
2014 ; AVX512VL-NEXT: pushl %ebx
2015 ; AVX512VL-NEXT: movl $7, %eax
2016 ; AVX512VL-NEXT: movl $7, %edx
2017 ; AVX512VL-NEXT: xorl %ebx, %ebx
2018 ; AVX512VL-NEXT: vpcmpestri $7, %xmm1, %xmm0
2019 ; AVX512VL-NEXT: seto %bl
2020 ; AVX512VL-NEXT: movl %ebx, %eax
2021 ; AVX512VL-NEXT: popl %ebx
2022 ; AVX512VL-NEXT: retl
1736 ; CHECK-LABEL: test_x86_sse42_pcmpestrio128:
1737 ; CHECK: ## BB#0:
1738 ; CHECK-NEXT: pushl %ebx ## encoding: [0x53]
1739 ; CHECK-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
1740 ; CHECK-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
1741 ; CHECK-NEXT: xorl %ebx, %ebx ## encoding: [0x31,0xdb]
1742 ; CHECK-NEXT: vpcmpestri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x61,0xc1,0x07]
1743 ; CHECK-NEXT: seto %bl ## encoding: [0x0f,0x90,0xc3]
1744 ; CHECK-NEXT: movl %ebx, %eax ## encoding: [0x89,0xd8]
1745 ; CHECK-NEXT: popl %ebx ## encoding: [0x5b]
1746 ; CHECK-NEXT: retl ## encoding: [0xc3]
20231747 %res = call i32 @llvm.x86.sse42.pcmpestrio128(<16 x i8> %a0, i32 7, <16 x i8> %a2, i32 7, i8 7) ; [#uses=1]
20241748 ret i32 %res
20251749 }
20271751
20281752
20291753 define i32 @test_x86_sse42_pcmpestris128(<16 x i8> %a0, <16 x i8> %a2) nounwind {
2030 ; AVX-LABEL: test_x86_sse42_pcmpestris128:
2031 ; AVX: ## BB#0:
2032 ; AVX-NEXT: pushl %ebx
2033 ; AVX-NEXT: movl $7, %eax
2034 ; AVX-NEXT: movl $7, %edx
2035 ; AVX-NEXT: xorl %ebx, %ebx
2036 ; AVX-NEXT: vpcmpestri $7, %xmm1, %xmm0
2037 ; AVX-NEXT: sets %bl
2038 ; AVX-NEXT: movl %ebx, %eax
2039 ; AVX-NEXT: popl %ebx
2040 ; AVX-NEXT: retl
2041 ;
2042 ; AVX512VL-LABEL: test_x86_sse42_pcmpestris128:
2043 ; AVX512VL: ## BB#0:
2044 ; AVX512VL-NEXT: pushl %ebx
2045 ; AVX512VL-NEXT: movl $7, %eax
2046 ; AVX512VL-NEXT: movl $7, %edx
2047 ; AVX512VL-NEXT: xorl %ebx, %ebx
2048 ; AVX512VL-NEXT: vpcmpestri $7, %xmm1, %xmm0
2049 ; AVX512VL-NEXT: sets %bl
2050 ; AVX512VL-NEXT: movl %ebx, %eax
2051 ; AVX512VL-NEXT: popl %ebx
2052 ; AVX512VL-NEXT: retl
1754 ; CHECK-LABEL: test_x86_sse42_pcmpestris128:
1755 ; CHECK: ## BB#0:
1756 ; CHECK-NEXT: pushl %ebx ## encoding: [0x53]
1757 ; CHECK-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
1758 ; CHECK-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
1759 ; CHECK-NEXT: xorl %ebx, %ebx ## encoding: [0x31,0xdb]
1760 ; CHECK-NEXT: vpcmpestri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x61,0xc1,0x07]
1761 ; CHECK-NEXT: sets %bl ## encoding: [0x0f,0x98,0xc3]
1762 ; CHECK-NEXT: movl %ebx, %eax ## encoding: [0x89,0xd8]
1763 ; CHECK-NEXT: popl %ebx ## encoding: [0x5b]
1764 ; CHECK-NEXT: retl ## encoding: [0xc3]
20531765 %res = call i32 @llvm.x86.sse42.pcmpestris128(<16 x i8> %a0, i32 7, <16 x i8> %a2, i32 7, i8 7) ; [#uses=1]
20541766 ret i32 %res
20551767 }
20571769
20581770
20591771 define i32 @test_x86_sse42_pcmpestriz128(<16 x i8> %a0, <16 x i8> %a2) nounwind {
2060 ; AVX-LABEL: test_x86_sse42_pcmpestriz128:
2061 ; AVX: ## BB#0:
2062 ; AVX-NEXT: pushl %ebx
2063 ; AVX-NEXT: movl $7, %eax
2064 ; AVX-NEXT: movl $7, %edx
2065 ; AVX-NEXT: xorl %ebx, %ebx
2066 ; AVX-NEXT: vpcmpestri $7, %xmm1, %xmm0
2067 ; AVX-NEXT: sete %bl
2068 ; AVX-NEXT: movl %ebx, %eax
2069 ; AVX-NEXT: popl %ebx
2070 ; AVX-NEXT: retl
2071 ;
2072 ; AVX512VL-LABEL: test_x86_sse42_pcmpestriz128:
2073 ; AVX512VL: ## BB#0:
2074 ; AVX512VL-NEXT: pushl %ebx
2075 ; AVX512VL-NEXT: movl $7, %eax
2076 ; AVX512VL-NEXT: movl $7, %edx
2077 ; AVX512VL-NEXT: xorl %ebx, %ebx
2078 ; AVX512VL-NEXT: vpcmpestri $7, %xmm1, %xmm0
2079 ; AVX512VL-NEXT: sete %bl
2080 ; AVX512VL-NEXT: movl %ebx, %eax
2081 ; AVX512VL-NEXT: popl %ebx
2082 ; AVX512VL-NEXT: retl
1772 ; CHECK-LABEL: test_x86_sse42_pcmpestriz128:
1773 ; CHECK: ## BB#0:
1774 ; CHECK-NEXT: pushl %ebx ## encoding: [0x53]
1775 ; CHECK-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
1776 ; CHECK-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
1777 ; CHECK-NEXT: xorl %ebx, %ebx ## encoding: [0x31,0xdb]
1778 ; CHECK-NEXT: vpcmpestri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x61,0xc1,0x07]
1779 ; CHECK-NEXT: sete %bl ## encoding: [0x0f,0x94,0xc3]
1780 ; CHECK-NEXT: movl %ebx, %eax ## encoding: [0x89,0xd8]
1781 ; CHECK-NEXT: popl %ebx ## encoding: [0x5b]
1782 ; CHECK-NEXT: retl ## encoding: [0xc3]
20831783 %res = call i32 @llvm.x86.sse42.pcmpestriz128(<16 x i8> %a0, i32 7, <16 x i8> %a2, i32 7, i8 7) ; [#uses=1]
20841784 ret i32 %res
20851785 }
20871787
20881788
20891789 define <16 x i8> @test_x86_sse42_pcmpestrm128(<16 x i8> %a0, <16 x i8> %a2) {
2090 ; AVX-LABEL: test_x86_sse42_pcmpestrm128:
2091 ; AVX: ## BB#0:
2092 ; AVX-NEXT: movl $7, %eax
2093 ; AVX-NEXT: movl $7, %edx
2094 ; AVX-NEXT: vpcmpestrm $7, %xmm1, %xmm0
2095 ; AVX-NEXT: retl
2096 ;
2097 ; AVX512VL-LABEL: test_x86_sse42_pcmpestrm128:
2098 ; AVX512VL: ## BB#0:
2099 ; AVX512VL-NEXT: movl $7, %eax
2100 ; AVX512VL-NEXT: movl $7, %edx
2101 ; AVX512VL-NEXT: vpcmpestrm $7, %xmm1, %xmm0
2102 ; AVX512VL-NEXT: retl
1790 ; CHECK-LABEL: test_x86_sse42_pcmpestrm128:
1791 ; CHECK: ## BB#0:
1792 ; CHECK-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
1793 ; CHECK-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
1794 ; CHECK-NEXT: vpcmpestrm $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x60,0xc1,0x07]
1795 ; CHECK-NEXT: retl ## encoding: [0xc3]
21031796 %res = call <16 x i8> @llvm.x86.sse42.pcmpestrm128(<16 x i8> %a0, i32 7, <16 x i8> %a2, i32 7, i8 7) ; <<16 x i8>> [#uses=1]
21041797 ret <16 x i8> %res
21051798 }
21071800
21081801
21091802 define <16 x i8> @test_x86_sse42_pcmpestrm128_load(<16 x i8> %a0, <16 x i8>* %a2) {
2110 ; AVX-LABEL: test_x86_sse42_pcmpestrm128_load:
2111 ; AVX: ## BB#0:
2112 ; AVX-NEXT: movl {{[0-9]+}}(%esp), %ecx
2113 ; AVX-NEXT: movl $7, %eax
2114 ; AVX-NEXT: movl $7, %edx
2115 ; AVX-NEXT: vpcmpestrm $7, (%ecx), %xmm0
2116 ; AVX-NEXT: retl
2117 ;
2118 ; AVX512VL-LABEL: test_x86_sse42_pcmpestrm128_load:
2119 ; AVX512VL: ## BB#0:
2120 ; AVX512VL-NEXT: movl {{[0-9]+}}(%esp), %ecx
2121 ; AVX512VL-NEXT: movl $7, %eax
2122 ; AVX512VL-NEXT: movl $7, %edx
2123 ; AVX512VL-NEXT: vpcmpestrm $7, (%ecx), %xmm0
2124 ; AVX512VL-NEXT: retl
1803 ; CHECK-LABEL: test_x86_sse42_pcmpestrm128_load:
1804 ; CHECK: ## BB#0:
1805 ; CHECK-NEXT: movl {{[0-9]+}}(%esp), %ecx ## encoding: [0x8b,0x4c,0x24,0x04]
1806 ; CHECK-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
1807 ; CHECK-NEXT: movl $7, %edx ## encoding: [0xba,0x07,0x00,0x00,0x00]
1808 ; CHECK-NEXT: vpcmpestrm $7, (%ecx), %xmm0 ## encoding: [0xc4,0xe3,0x79,0x60,0x01,0x07]
1809 ; CHECK-NEXT: retl ## encoding: [0xc3]
21251810 %1 = load <16 x i8>, <16 x i8>* %a2
21261811 %res = call <16 x i8> @llvm.x86.sse42.pcmpestrm128(<16 x i8> %a0, i32 7, <16 x i8> %1, i32 7, i8 7) ; <<16 x i8>> [#uses=1]
21271812 ret <16 x i8> %res
21291814
21301815
21311816 define i32 @test_x86_sse42_pcmpistri128(<16 x i8> %a0, <16 x i8> %a1) {
2132 ; AVX-LABEL: test_x86_sse42_pcmpistri128:
2133 ; AVX: ## BB#0:
2134 ; AVX-NEXT: vpcmpistri $7, %xmm1, %xmm0
2135 ; AVX-NEXT: movl %ecx, %eax
2136 ; AVX-NEXT: retl
2137 ;
2138 ; AVX512VL-LABEL: test_x86_sse42_pcmpistri128:
2139 ; AVX512VL: ## BB#0:
2140 ; AVX512VL-NEXT: vpcmpistri $7, %xmm1, %xmm0
2141 ; AVX512VL-NEXT: movl %ecx, %eax
2142 ; AVX512VL-NEXT: retl
1817 ; CHECK-LABEL: test_x86_sse42_pcmpistri128:
1818 ; CHECK: ## BB#0:
1819 ; CHECK-NEXT: vpcmpistri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x63,0xc1,0x07]
1820 ; CHECK-NEXT: movl %ecx, %eax ## encoding: [0x89,0xc8]
1821 ; CHECK-NEXT: retl ## encoding: [0xc3]
21431822 %res = call i32 @llvm.x86.sse42.pcmpistri128(<16 x i8> %a0, <16 x i8> %a1, i8 7) ; [#uses=1]
21441823 ret i32 %res
21451824 }
21491828 define i32 @test_x86_sse42_pcmpistri128_load(<16 x i8>* %a0, <16 x i8>* %a1) {
21501829 ; AVX-LABEL: test_x86_sse42_pcmpistri128_load:
21511830 ; AVX: ## BB#0:
2152 ; AVX-NEXT: movl {{[0-9]+}}(%esp), %eax
2153 ; AVX-NEXT: movl {{[0-9]+}}(%esp), %ecx
2154 ; AVX-NEXT: vmovdqa (%ecx), %xmm0
2155 ; AVX-NEXT: vpcmpistri $7, (%eax), %xmm0
2156 ; AVX-NEXT: movl %ecx, %eax
2157 ; AVX-NEXT: retl
1831 ; AVX-NEXT: movl {{[0-9]+}}(%esp), %eax ## encoding: [0x8b,0x44,0x24,0x08]
1832 ; AVX-NEXT: movl {{[0-9]+}}(%esp), %ecx ## encoding: [0x8b,0x4c,0x24,0x04]
1833 ; AVX-NEXT: vmovdqa (%ecx), %xmm0 ## encoding: [0xc5,0xf9,0x6f,0x01]
1834 ; AVX-NEXT: vpcmpistri $7, (%eax), %xmm0 ## encoding: [0xc4,0xe3,0x79,0x63,0x00,0x07]
1835 ; AVX-NEXT: movl %ecx, %eax ## encoding: [0x89,0xc8]
1836 ; AVX-NEXT: retl ## encoding: [0xc3]
21581837 ;
21591838 ; AVX512VL-LABEL: test_x86_sse42_pcmpistri128_load:
21601839 ; AVX512VL: ## BB#0:
2161 ; AVX512VL-NEXT: movl {{[0-9]+}}(%esp), %eax
2162 ; AVX512VL-NEXT: movl {{[0-9]+}}(%esp), %ecx
2163 ; AVX512VL-NEXT: vmovdqa64 (%ecx), %xmm0
2164 ; AVX512VL-NEXT: vpcmpistri $7, (%eax), %xmm0
2165 ; AVX512VL-NEXT: movl %ecx, %eax
2166 ; AVX512VL-NEXT: retl
1840 ; AVX512VL-NEXT: movl {{[0-9]+}}(%esp), %eax ## encoding: [0x8b,0x44,0x24,0x08]
1841 ; AVX512VL-NEXT: movl {{[0-9]+}}(%esp), %ecx ## encoding: [0x8b,0x4c,0x24,0x04]
1842 ; AVX512VL-NEXT: vmovdqu8 (%ecx), %xmm0 ## encoding: [0x62,0xf1,0x7f,0x08,0x6f,0x01]
1843 ; AVX512VL-NEXT: vpcmpistri $7, (%eax), %xmm0 ## encoding: [0xc4,0xe3,0x79,0x63,0x00,0x07]
1844 ; AVX512VL-NEXT: movl %ecx, %eax ## encoding: [0x89,0xc8]
1845 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
21671846 %1 = load <16 x i8>, <16 x i8>* %a0
21681847 %2 = load <16 x i8>, <16 x i8>* %a1
21691848 %res = call i32 @llvm.x86.sse42.pcmpistri128(<16 x i8> %1, <16 x i8> %2, i8 7) ; [#uses=1]
21721851
21731852
21741853 define i32 @test_x86_sse42_pcmpistria128(<16 x i8> %a0, <16 x i8> %a1) {
2175 ; AVX-LABEL: test_x86_sse42_pcmpistria128:
2176 ; AVX: ## BB#0:
2177 ; AVX-NEXT: xorl %eax, %eax
2178 ; AVX-NEXT: vpcmpistri $7, %xmm1, %xmm0
2179 ; AVX-NEXT: seta %al
2180 ; AVX-NEXT: retl
2181 ;
2182 ; AVX512VL-LABEL: test_x86_sse42_pcmpistria128:
2183 ; AVX512VL: ## BB#0:
2184 ; AVX512VL-NEXT: xorl %eax, %eax
2185 ; AVX512VL-NEXT: vpcmpistri $7, %xmm1, %xmm0
2186 ; AVX512VL-NEXT: seta %al
2187 ; AVX512VL-NEXT: retl
1854 ; CHECK-LABEL: test_x86_sse42_pcmpistria128:
1855 ; CHECK: ## BB#0:
1856 ; CHECK-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
1857 ; CHECK-NEXT: vpcmpistri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x63,0xc1,0x07]
1858 ; CHECK-NEXT: seta %al ## encoding: [0x0f,0x97,0xc0]
1859 ; CHECK-NEXT: retl ## encoding: [0xc3]
21881860 %res = call i32 @llvm.x86.sse42.pcmpistria128(<16 x i8> %a0, <16 x i8> %a1, i8 7) ; [#uses=1]
21891861 ret i32 %res
21901862 }
21921864
21931865
21941866 define i32 @test_x86_sse42_pcmpistric128(<16 x i8> %a0, <16 x i8> %a1) {
2195 ; AVX-LABEL: test_x86_sse42_pcmpistric128:
2196 ; AVX: ## BB#0:
2197 ; AVX-NEXT: vpcmpistri $7, %xmm1, %xmm0
2198 ; AVX-NEXT: sbbl %eax, %eax
2199 ; AVX-NEXT: andl $1, %eax
2200 ; AVX-NEXT: retl
2201 ;
2202 ; AVX512VL-LABEL: test_x86_sse42_pcmpistric128:
2203 ; AVX512VL: ## BB#0:
2204 ; AVX512VL-NEXT: vpcmpistri $7, %xmm1, %xmm0
2205 ; AVX512VL-NEXT: sbbl %eax, %eax
2206 ; AVX512VL-NEXT: andl $1, %eax
2207 ; AVX512VL-NEXT: retl
1867 ; CHECK-LABEL: test_x86_sse42_pcmpistric128:
1868 ; CHECK: ## BB#0:
1869 ; CHECK-NEXT: vpcmpistri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x63,0xc1,0x07]
1870 ; CHECK-NEXT: sbbl %eax, %eax ## encoding: [0x19,0xc0]
1871 ; CHECK-NEXT: andl $1, %eax ## encoding: [0x83,0xe0,0x01]
1872 ; CHECK-NEXT: retl ## encoding: [0xc3]
22081873 %res = call i32 @llvm.x86.sse42.pcmpistric128(<16 x i8> %a0, <16 x i8> %a1, i8 7) ; [#uses=1]
22091874 ret i32 %res
22101875 }
22121877
22131878
22141879 define i32 @test_x86_sse42_pcmpistrio128(<16 x i8> %a0, <16 x i8> %a1) {
2215 ; AVX-LABEL: test_x86_sse42_pcmpistrio128:
2216 ; AVX: ## BB#0:
2217 ; AVX-NEXT: xorl %eax, %eax
2218 ; AVX-NEXT: vpcmpistri $7, %xmm1, %xmm0
2219 ; AVX-NEXT: seto %al
2220 ; AVX-NEXT: retl
2221 ;
2222 ; AVX512VL-LABEL: test_x86_sse42_pcmpistrio128:
2223 ; AVX512VL: ## BB#0:
2224 ; AVX512VL-NEXT: xorl %eax, %eax
2225 ; AVX512VL-NEXT: vpcmpistri $7, %xmm1, %xmm0
2226 ; AVX512VL-NEXT: seto %al
2227 ; AVX512VL-NEXT: retl
1880 ; CHECK-LABEL: test_x86_sse42_pcmpistrio128:
1881 ; CHECK: ## BB#0:
1882 ; CHECK-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
1883 ; CHECK-NEXT: vpcmpistri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x63,0xc1,0x07]
1884 ; CHECK-NEXT: seto %al ## encoding: [0x0f,0x90,0xc0]
1885 ; CHECK-NEXT: retl ## encoding: [0xc3]
22281886 %res = call i32 @llvm.x86.sse42.pcmpistrio128(<16 x i8> %a0, <16 x i8> %a1, i8 7) ; [#uses=1]
22291887 ret i32 %res
22301888 }
22321890
22331891
22341892 define i32 @test_x86_sse42_pcmpistris128(<16 x i8> %a0, <16 x i8> %a1) {
2235 ; AVX-LABEL: test_x86_sse42_pcmpistris128:
2236 ; AVX: ## BB#0:
2237 ; AVX-NEXT: xorl %eax, %eax
2238 ; AVX-NEXT: vpcmpistri $7, %xmm1, %xmm0
2239 ; AVX-NEXT: sets %al
2240 ; AVX-NEXT: retl
2241 ;
2242 ; AVX512VL-LABEL: test_x86_sse42_pcmpistris128:
2243 ; AVX512VL: ## BB#0:
2244 ; AVX512VL-NEXT: xorl %eax, %eax
2245 ; AVX512VL-NEXT: vpcmpistri $7, %xmm1, %xmm0
2246 ; AVX512VL-NEXT: sets %al
2247 ; AVX512VL-NEXT: retl
1893 ; CHECK-LABEL: test_x86_sse42_pcmpistris128:
1894 ; CHECK: ## BB#0:
1895 ; CHECK-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
1896 ; CHECK-NEXT: vpcmpistri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x63,0xc1,0x07]
1897 ; CHECK-NEXT: sets %al ## encoding: [0x0f,0x98,0xc0]
1898 ; CHECK-NEXT: retl ## encoding: [0xc3]
22481899 %res = call i32 @llvm.x86.sse42.pcmpistris128(<16 x i8> %a0, <16 x i8> %a1, i8 7) ; [#uses=1]
22491900 ret i32 %res
22501901 }
22521903
22531904
22541905 define i32 @test_x86_sse42_pcmpistriz128(<16 x i8> %a0, <16 x i8> %a1) {
2255 ; AVX-LABEL: test_x86_sse42_pcmpistriz128:
2256 ; AVX: ## BB#0:
2257 ; AVX-NEXT: xorl %eax, %eax
2258 ; AVX-NEXT: vpcmpistri $7, %xmm1, %xmm0
2259 ; AVX-NEXT: sete %al
2260 ; AVX-NEXT: retl
2261 ;
2262 ; AVX512VL-LABEL: test_x86_sse42_pcmpistriz128:
2263 ; AVX512VL: ## BB#0:
2264 ; AVX512VL-NEXT: xorl %eax, %eax
2265 ; AVX512VL-NEXT: vpcmpistri $7, %xmm1, %xmm0
2266 ; AVX512VL-NEXT: sete %al
2267 ; AVX512VL-NEXT: retl
1906 ; CHECK-LABEL: test_x86_sse42_pcmpistriz128:
1907 ; CHECK: ## BB#0:
1908 ; CHECK-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
1909 ; CHECK-NEXT: vpcmpistri $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x63,0xc1,0x07]
1910 ; CHECK-NEXT: sete %al ## encoding: [0x0f,0x94,0xc0]
1911 ; CHECK-NEXT: retl ## encoding: [0xc3]
22681912 %res = call i32 @llvm.x86.sse42.pcmpistriz128(<16 x i8> %a0, <16 x i8> %a1, i8 7) ; [#uses=1]
22691913 ret i32 %res
22701914 }
22721916
22731917
22741918 define <16 x i8> @test_x86_sse42_pcmpistrm128(<16 x i8> %a0, <16 x i8> %a1) {
2275 ; AVX-LABEL: test_x86_sse42_pcmpistrm128:
2276 ; AVX: ## BB#0:
2277 ; AVX-NEXT: vpcmpistrm $7, %xmm1, %xmm0
2278 ; AVX-NEXT: retl
2279 ;
2280 ; AVX512VL-LABEL: test_x86_sse42_pcmpistrm128:
2281 ; AVX512VL: ## BB#0:
2282 ; AVX512VL-NEXT: vpcmpistrm $7, %xmm1, %xmm0
2283 ; AVX512VL-NEXT: retl
1919 ; CHECK-LABEL: test_x86_sse42_pcmpistrm128:
1920 ; CHECK: ## BB#0:
1921 ; CHECK-NEXT: vpcmpistrm $7, %xmm1, %xmm0 ## encoding: [0xc4,0xe3,0x79,0x62,0xc1,0x07]
1922 ; CHECK-NEXT: retl ## encoding: [0xc3]
22841923 %res = call <16 x i8> @llvm.x86.sse42.pcmpistrm128(<16 x i8> %a0, <16 x i8> %a1, i8 7) ; <<16 x i8>> [#uses=1]
22851924 ret <16 x i8> %res
22861925 }
22881927
22891928
22901929 define <16 x i8> @test_x86_sse42_pcmpistrm128_load(<16 x i8> %a0, <16 x i8>* %a1) {
2291 ; AVX-LABEL: test_x86_sse42_pcmpistrm128_load:
2292 ; AVX: ## BB#0:
2293 ; AVX-NEXT: movl {{[0-9]+}}(%esp), %eax
2294 ; AVX-NEXT: vpcmpistrm $7, (%eax), %xmm0
2295 ; AVX-NEXT: retl
2296 ;
2297 ; AVX512VL-LABEL: test_x86_sse42_pcmpistrm128_load:
2298 ; AVX512VL: ## BB#0:
2299 ; AVX512VL-NEXT: movl {{[0-9]+}}(%esp), %eax
2300 ; AVX512VL-NEXT: vpcmpistrm $7, (%eax), %xmm0
2301 ; AVX512VL-NEXT: retl
1930 ; CHECK-LABEL: test_x86_sse42_pcmpistrm128_load:
1931 ; CHECK: ## BB#0:
1932 ; CHECK-NEXT: movl {{[0-9]+}}(%esp), %eax ## encoding: [0x8b,0x44,0x24,0x04]
1933 ; CHECK-NEXT: vpcmpistrm $7, (%eax), %xmm0 ## encoding: [0xc4,0xe3,0x79,0x62,0x00,0x07]
1934 ; CHECK-NEXT: retl ## encoding: [0xc3]
23021935 %1 = load <16 x i8>, <16 x i8>* %a1
23031936 %res = call <16 x i8> @llvm.x86.sse42.pcmpistrm128(<16 x i8> %a0, <16 x i8> %1, i8 7) ; <<16 x i8>> [#uses=1]
23041937 ret <16 x i8> %res
23061939
23071940
23081941 define <4 x float> @test_x86_sse_add_ss(<4 x float> %a0, <4 x float> %a1) {
2309 ; AVX-LABEL: test_x86_sse_add_ss:
2310 ; AVX: ## BB#0:
2311 ; AVX-NEXT: vaddss %xmm1, %xmm0, %xmm0
2312 ; AVX-NEXT: retl
2313 ;
2314 ; AVX512VL-LABEL: test_x86_sse_add_ss:
2315 ; AVX512VL: ## BB#0:
2316 ; AVX512VL-NEXT: vaddss %xmm1, %xmm0, %xmm0
2317 ; AVX512VL-NEXT: retl
1942 ; CHECK-LABEL: test_x86_sse_add_ss:
1943 ; CHECK: ## BB#0:
1944 ; CHECK-NEXT: vaddss %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xfa,0x58,0xc1]
1945 ; CHECK-NEXT: retl ## encoding: [0xc3]
23181946 %res = call <4 x float> @llvm.x86.sse.add.ss(<4 x float> %a0, <4 x float> %a1) ; <<4 x float>> [#uses=1]
23191947 ret <4 x float> %res
23201948 }
23221950
23231951
23241952 define <4 x float> @test_x86_sse_cmp_ps(<4 x float> %a0, <4 x float> %a1) {
2325 ; AVX-LABEL: test_x86_sse_cmp_ps:
2326 ; AVX: ## BB#0:
2327 ; AVX-NEXT: vcmpordps %xmm1, %xmm0, %xmm0
2328 ; AVX-NEXT: retl
2329 ;
2330 ; AVX512VL-LABEL: test_x86_sse_cmp_ps:
2331 ; AVX512VL: ## BB#0:
2332 ; AVX512VL-NEXT: vcmpordps %xmm1, %xmm0, %xmm0
2333 ; AVX512VL-NEXT: retl
1953 ; CHECK-LABEL: test_x86_sse_cmp_ps:
1954 ; CHECK: ## BB#0:
1955 ; CHECK-NEXT: vcmpordps %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xf8,0xc2,0xc1,0x07]
1956 ; CHECK-NEXT: retl ## encoding: [0xc3]
23341957 %res = call <4 x float> @llvm.x86.sse.cmp.ps(<4 x float> %a0, <4 x float> %a1, i8 7) ; <<4 x float>> [#uses=1]
23351958 ret <4 x float> %res
23361959 }
23381961
23391962
23401963 define <4 x float> @test_x86_sse_cmp_ss(<4 x float> %a0, <4 x float> %a1) {
2341 ; AVX-LABEL: test_x86_sse_cmp_ss:
2342 ; AVX: ## BB#0:
2343 ; AVX-NEXT: vcmpordss %xmm1, %xmm0, %xmm0
2344 ; AVX-NEXT: retl
2345 ;
2346 ; AVX512VL-LABEL: test_x86_sse_cmp_ss:
2347 ; AVX512VL: ## BB#0:
2348 ; AVX512VL-NEXT: vcmpordss %xmm1, %xmm0, %xmm0
2349 ; AVX512VL-NEXT: retl
1964 ; CHECK-LABEL: test_x86_sse_cmp_ss:
1965 ; CHECK: ## BB#0:
1966 ; CHECK-NEXT: vcmpordss %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xfa,0xc2,0xc1,0x07]
1967 ; CHECK-NEXT: retl ## encoding: [0xc3]
23501968 %res = call <4 x float> @llvm.x86.sse.cmp.ss(<4 x float> %a0, <4 x float> %a1, i8 7) ; <<4 x float>> [#uses=1]
23511969 ret <4 x float> %res
23521970 }
23561974 define i32 @test_x86_sse_comieq_ss(<4 x float> %a0, <4 x float> %a1) {
23571975 ; AVX-LABEL: test_x86_sse_comieq_ss:
23581976 ; AVX: ## BB#0:
2359 ; AVX-NEXT: vcomiss %xmm1, %xmm0
2360 ; AVX-NEXT: setnp %al
2361 ; AVX-NEXT: sete %cl
2362 ; AVX-NEXT: andb %al, %cl
2363 ; AVX-NEXT: movzbl %cl, %eax
2364 ; AVX-NEXT: retl
1977 ; AVX-NEXT: vcomiss %xmm1, %xmm0 ## encoding: [0xc5,0xf8,0x2f,0xc1]
1978 ; AVX-NEXT: setnp %al ## encoding: [0x0f,0x9b,0xc0]
1979 ; AVX-NEXT: sete %cl ## encoding: [0x0f,0x94,0xc1]
1980 ; AVX-NEXT: andb %al, %cl ## encoding: [0x20,0xc1]
1981 ; AVX-NEXT: movzbl %cl, %eax ## encoding: [0x0f,0xb6,0xc1]
1982 ; AVX-NEXT: retl ## encoding: [0xc3]
23651983 ;
23661984 ; AVX512VL-LABEL: test_x86_sse_comieq_ss:
23671985 ; AVX512VL: ## BB#0:
2368 ; AVX512VL-NEXT: vcomiss %xmm1, %xmm0
2369 ; AVX512VL-NEXT: setnp %al
2370 ; AVX512VL-NEXT: sete %cl
2371 ; AVX512VL-NEXT: andb %al, %cl
2372 ; AVX512VL-NEXT: movzbl %cl, %eax
2373 ; AVX512VL-NEXT: retl
1986 ; AVX512VL-NEXT: vcomiss %xmm1, %xmm0 ## encoding: [0x62,0xf1,0x7c,0x08,0x2f,0xc1]
1987 ; AVX512VL-NEXT: setnp %al ## encoding: [0x0f,0x9b,0xc0]
1988 ; AVX512VL-NEXT: sete %cl ## encoding: [0x0f,0x94,0xc1]
1989 ; AVX512VL-NEXT: andb %al, %cl ## encoding: [0x20,0xc1]
1990 ; AVX512VL-NEXT: movzbl %cl, %eax ## encoding: [0x0f,0xb6,0xc1]
1991 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
23741992 %res = call i32 @llvm.x86.sse.comieq.ss(<4 x float> %a0, <4 x float> %a1) ; [#uses=1]
23751993 ret i32 %res
23761994 }
23801998 define i32 @test_x86_sse_comige_ss(<4 x float> %a0, <4 x float> %a1) {
23811999 ; AVX-LABEL: test_x86_sse_comige_ss:
23822000 ; AVX: ## BB#0:
2383 ; AVX-NEXT: xorl %eax, %eax
2384 ; AVX-NEXT: vcomiss %xmm1, %xmm0
2385 ; AVX-NEXT: setae %al
2386 ; AVX-NEXT: retl
2001 ; AVX-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
2002 ; AVX-NEXT: vcomiss %xmm1, %xmm0 ## encoding: [0xc5,0xf8,0x2f,0xc1]
2003 ; AVX-NEXT: setae %al ## encoding: [0x0f,0x93,0xc0]
2004 ; AVX-NEXT: retl ## encoding: [0xc3]
23872005 ;
23882006 ; AVX512VL-LABEL: test_x86_sse_comige_ss:
23892007 ; AVX512VL: ## BB#0:
2390 ; AVX512VL-NEXT: xorl %eax, %eax
2391 ; AVX512VL-NEXT: vcomiss %xmm1, %xmm0
2392 ; AVX512VL-NEXT: setae %al
2393 ; AVX512VL-NEXT: retl
2008 ; AVX512VL-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
2009 ; AVX512VL-NEXT: vcomiss %xmm1, %xmm0 ## encoding: [0x62,0xf1,0x7c,0x08,0x2f,0xc1]
2010 ; AVX512VL-NEXT: setae %al ## encoding: [0x0f,0x93,0xc0]
2011 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
23942012 %res = call i32 @llvm.x86.sse.comige.ss(<4 x float> %a0, <4 x float> %a1) ; [#uses=1]
23952013 ret i32 %res
23962014 }
24002018 define i32 @test_x86_sse_comigt_ss(<4 x float> %a0, <4 x float> %a1) {
24012019 ; AVX-LABEL: test_x86_sse_comigt_ss:
24022020 ; AVX: ## BB#0:
2403 ; AVX-NEXT: xorl %eax, %eax
2404 ; AVX-NEXT: vcomiss %xmm1, %xmm0
2405 ; AVX-NEXT: seta %al
2406 ; AVX-NEXT: retl
2021 ; AVX-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
2022 ; AVX-NEXT: vcomiss %xmm1, %xmm0 ## encoding: [0xc5,0xf8,0x2f,0xc1]
2023 ; AVX-NEXT: seta %al ## encoding: [0x0f,0x97,0xc0]
2024 ; AVX-NEXT: retl ## encoding: [0xc3]
24072025 ;
24082026 ; AVX512VL-LABEL: test_x86_sse_comigt_ss:
24092027 ; AVX512VL: ## BB#0:
2410 ; AVX512VL-NEXT: xorl %eax, %eax
2411 ; AVX512VL-NEXT: vcomiss %xmm1, %xmm0
2412 ; AVX512VL-NEXT: seta %al
2413 ; AVX512VL-NEXT: retl
2028 ; AVX512VL-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
2029 ; AVX512VL-NEXT: vcomiss %xmm1, %xmm0 ## encoding: [0x62,0xf1,0x7c,0x08,0x2f,0xc1]
2030 ; AVX512VL-NEXT: seta %al ## encoding: [0x0f,0x97,0xc0]
2031 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
24142032 %res = call i32 @llvm.x86.sse.comigt.ss(<4 x float> %a0, <4 x float> %a1) ; [#uses=1]
24152033 ret i32 %res
24162034 }
24202038 define i32 @test_x86_sse_comile_ss(<4 x float> %a0, <4 x float> %a1) {
24212039 ; AVX-LABEL: test_x86_sse_comile_ss:
24222040 ; AVX: ## BB#0:
2423 ; AVX-NEXT: xorl %eax, %eax
2424 ; AVX-NEXT: vcomiss %xmm0, %xmm1
2425 ; AVX-NEXT: setae %al
2426 ; AVX-NEXT: retl
2041 ; AVX-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
2042 ; AVX-NEXT: vcomiss %xmm0, %xmm1 ## encoding: [0xc5,0xf8,0x2f,0xc8]
2043 ; AVX-NEXT: setae %al ## encoding: [0x0f,0x93,0xc0]
2044 ; AVX-NEXT: retl ## encoding: [0xc3]
24272045 ;
24282046 ; AVX512VL-LABEL: test_x86_sse_comile_ss:
24292047 ; AVX512VL: ## BB#0:
2430 ; AVX512VL-NEXT: xorl %eax, %eax
2431 ; AVX512VL-NEXT: vcomiss %xmm0, %xmm1
2432 ; AVX512VL-NEXT: setae %al
2433 ; AVX512VL-NEXT: retl
2048 ; AVX512VL-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
2049 ; AVX512VL-NEXT: vcomiss %xmm0, %xmm1 ## encoding: [0x62,0xf1,0x7c,0x08,0x2f,0xc8]
2050 ; AVX512VL-NEXT: setae %al ## encoding: [0x0f,0x93,0xc0]
2051 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
24342052 %res = call i32 @llvm.x86.sse.comile.ss(<4 x float> %a0, <4 x float> %a1) ; [#uses=1]
24352053 ret i32 %res
24362054 }
24402058 define i32 @test_x86_sse_comilt_ss(<4 x float> %a0, <4 x float> %a1) {
24412059 ; AVX-LABEL: test_x86_sse_comilt_ss:
24422060 ; AVX: ## BB#0:
2443 ; AVX-NEXT: xorl %eax, %eax
2444 ; AVX-NEXT: vcomiss %xmm0, %xmm1
2445 ; AVX-NEXT: seta %al
2446 ; AVX-NEXT: retl
2061 ; AVX-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
2062 ; AVX-NEXT: vcomiss %xmm0, %xmm1 ## encoding: [0xc5,0xf8,0x2f,0xc8]
2063 ; AVX-NEXT: seta %al ## encoding: [0x0f,0x97,0xc0]
2064 ; AVX-NEXT: retl ## encoding: [0xc3]
24472065 ;
24482066 ; AVX512VL-LABEL: test_x86_sse_comilt_ss:
24492067 ; AVX512VL: ## BB#0:
2450 ; AVX512VL-NEXT: xorl %eax, %eax
2451 ; AVX512VL-NEXT: vcomiss %xmm0, %xmm1
2452 ; AVX512VL-NEXT: seta %al
2453 ; AVX512VL-NEXT: retl
2068 ; AVX512VL-NEXT: xorl %eax, %eax ## encoding: [0x31,0xc0]
2069 ; AVX512VL-NEXT: vcomiss %xmm0, %xmm1 ## encoding: [0x62,0xf1,0x7c,0x08,0x2f,0xc8]
2070 ; AVX512VL-NEXT: seta %al ## encoding: [0x0f,0x97,0xc0]
2071 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
24542072 %res = call i32 @llvm.x86.sse.comilt.ss(<4 x float> %a0, <4 x float> %a1) ; [#uses=1]
24552073 ret i32 %res
24562074 }
24602078 define i32 @test_x86_sse_comineq_ss(<4 x float> %a0, <4 x float> %a1) {
24612079 ; AVX-LABEL: test_x86_sse_comineq_ss:
24622080 ; AVX: ## BB#0:
2463 ; AVX-NEXT: vcomiss %xmm1, %xmm0
2464 ; AVX-NEXT: setp %al
2465 ; AVX-NEXT: setne %cl
2466 ; AVX-NEXT: orb %al, %cl
2467 ; AVX-NEXT: movzbl %cl, %eax
2468 ; AVX-NEXT: retl
2081 ; AVX-NEXT: vcomiss %xmm1, %xmm0 ## encoding: [0xc5,0xf8,0x2f,0xc1]
2082 ; AVX-NEXT: setp %al ## encoding: [0x0f,0x9a,0xc0]
2083 ; AVX-NEXT: setne %cl ## encoding: [0x0f,0x95,0xc1]
2084 ; AVX-NEXT: orb %al, %cl ## encoding: [0x08,0xc1]
2085 ; AVX-NEXT: movzbl %cl, %eax ## encoding: [0x0f,0xb6,0xc1]
2086 ; AVX-NEXT: retl ## encoding: [0xc3]
24692087 ;
24702088 ; AVX512VL-LABEL: test_x86_sse_comineq_ss:
24712089 ; AVX512VL: ## BB#0:
2472 ; AVX512VL-NEXT: vcomiss %xmm1, %xmm0
2473 ; AVX512VL-NEXT: setp %al
2474 ; AVX512VL-NEXT: setne %cl
2475 ; AVX512VL-NEXT: orb %al, %cl
2476 ; AVX512VL-NEXT: movzbl %cl, %eax
2477 ; AVX512VL-NEXT: retl
2090 ; AVX512VL-NEXT: vcomiss %xmm1, %xmm0 ## encoding: [0x62,0xf1,0x7c,0x08,0x2f,0xc1]
2091 ; AVX512VL-NEXT: setp %al ## encoding: [0x0f,0x9a,0xc0]
2092 ; AVX512VL-NEXT: setne %cl ## encoding: [0x0f,0x95,0xc1]
2093 ; AVX512VL-NEXT: orb %al, %cl ## encoding: [0x08,0xc1]
2094 ; AVX512VL-NEXT: movzbl %cl, %eax ## encoding: [0x0f,0xb6,0xc1]
2095 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
24782096 %res = call i32 @llvm.x86.sse.comineq.ss(<4 x float> %a0, <4 x float> %a1) ; [#uses=1]
24792097 ret i32 %res
24802098 }
24842102 define <4 x float> @test_x86_sse_cvtsi2ss(<4 x float> %a0) {
24852103 ; AVX-LABEL: test_x86_sse_cvtsi2ss:
24862104 ; AVX: ## BB#0:
2487 ; AVX-NEXT: movl $7, %eax
2488 ; AVX-NEXT: vcvtsi2ssl %eax, %xmm0, %xmm0
2489 ; AVX-NEXT: retl
2105 ; AVX-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
2106 ; AVX-NEXT: vcvtsi2ssl %eax, %xmm0, %xmm0 ## encoding: [0xc5,0xfa,0x2a,0xc0]
2107 ; AVX-NEXT: retl ## encoding: [0xc3]
24902108 ;
24912109 ; AVX512VL-LABEL: test_x86_sse_cvtsi2ss:
24922110 ; AVX512VL: ## BB#0:
2493 ; AVX512VL-NEXT: movl $7, %eax
2494 ; AVX512VL-NEXT: vcvtsi2ssl %eax, %xmm0, %xmm0
2495 ; AVX512VL-NEXT: retl
2111 ; AVX512VL-NEXT: movl $7, %eax ## encoding: [0xb8,0x07,0x00,0x00,0x00]
2112 ; AVX512VL-NEXT: vcvtsi2ssl %eax, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7e,0x08,0x2a,0xc0]
2113 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
24962114 %res = call <4 x float> @llvm.x86.sse.cvtsi2ss(<4 x float> %a0, i32 7) ; <<4 x float>> [#uses=1]
24972115 ret <4 x float> %res
24982116 }
25022120 define i32 @test_x86_sse_cvtss2si(<4 x float> %a0) {
25032121 ; AVX-LABEL: test_x86_sse_cvtss2si:
25042122 ; AVX: ## BB#0:
2505 ; AVX-NEXT: vcvtss2si %xmm0, %eax
2506 ; AVX-NEXT: retl
2123 ; AVX-NEXT: vcvtss2si %xmm0, %eax ## encoding: [0xc5,0xfa,0x2d,0xc0]
2124 ; AVX-NEXT: retl ## encoding: [0xc3]
25072125 ;
25082126 ; AVX512VL-LABEL: test_x86_sse_cvtss2si:
25092127 ; AVX512VL: ## BB#0:
2510 ; AVX512VL-NEXT: vcvtss2si %xmm0, %eax
2511 ; AVX512VL-NEXT: retl
2128 ; AVX512VL-NEXT: vcvtss2si %xmm0, %eax ## encoding: [0x62,0xf1,0x7e,0x08,0x2d,0xc0]
2129 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
25122130 %res = call i32 @llvm.x86.sse.cvtss2si(<4 x float> %a0) ; [#uses=1]
25132131 ret i32 %res
25142132 }
25182136 define i32 @test_x86_sse_cvttss2si(<4 x float> %a0) {
25192137 ; AVX-LABEL: test_x86_sse_cvttss2si:
25202138 ; AVX: ## BB#0:
2521 ; AVX-NEXT: vcvttss2si %xmm0, %eax
2522 ; AVX-NEXT: retl
2139 ; AVX-NEXT: vcvttss2si %xmm0, %eax ## encoding: [0xc5,0xfa,0x2c,0xc0]
2140 ; AVX-NEXT: retl ## encoding: [0xc3]
25232141 ;
25242142 ; AVX512VL-LABEL: test_x86_sse_cvttss2si:
25252143 ; AVX512VL: ## BB#0:
2526 ; AVX512VL-NEXT: vcvttss2si %xmm0, %eax
2527 ; AVX512VL-NEXT: retl
2144 ; AVX512VL-NEXT: vcvttss2si %xmm0, %eax ## encoding: [0x62,0xf1,0x7e,0x08,0x2c,0xc0]
2145 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
25282146 %res = call i32 @llvm.x86.sse.cvttss2si(<4 x float> %a0) ; [#uses=1]
25292147 ret i32 %res
25302148 }
25322150
25332151
25342152 define <4 x float> @test_x86_sse_div_ss(<4 x float> %a0, <4 x float> %a1) {
2535 ; AVX-LABEL: test_x86_sse_div_ss:
2536 ; AVX: ## BB#0:
2537 ; AVX-NEXT: vdivss %xmm1, %xmm0, %xmm0
2538 ; AVX-NEXT: retl
2539 ;
2540 ; AVX512VL-LABEL: test_x86_sse_div_ss:
2541 ; AVX512VL: ## BB#0:
2542 ; AVX512VL-NEXT: vdivss %xmm1, %xmm0, %xmm0
2543 ; AVX512VL-NEXT: retl
2153 ; CHECK-LABEL: test_x86_sse_div_ss:
2154 ; CHECK: ## BB#0:
2155 ; CHECK-NEXT: vdivss %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xfa,0x5e,0xc1]
2156 ; CHECK-NEXT: retl ## encoding: [0xc3]
25442157 %res = call <4 x float> @llvm.x86.sse.div.ss(<4 x float> %a0, <4 x float> %a1) ; <<4 x float>> [#uses=1]
25452158 ret <4 x float> %res
25462159 }
25482161
25492162
25502163 define void @test_x86_sse_ldmxcsr(i8* %a0) {
2551 ; AVX-LABEL: test_x86_sse_ldmxcsr:
2552 ; AVX: ## BB#0:
2553 ; AVX-NEXT: movl {{[0-9]+}}(%esp), %eax
2554 ; AVX-NEXT: vldmxcsr (%eax)
2555 ; AVX-NEXT: retl
2556 ;
2557 ; AVX512VL-LABEL: test_x86_sse_ldmxcsr:
2558 ; AVX512VL: ## BB#0:
2559 ; AVX512VL-NEXT: movl {{[0-9]+}}(%esp), %eax
2560 ; AVX512VL-NEXT: vldmxcsr (%eax)
2561 ; AVX512VL-NEXT: retl
2164 ; CHECK-LABEL: test_x86_sse_ldmxcsr:
2165 ; CHECK: ## BB#0:
2166 ; CHECK-NEXT: movl {{[0-9]+}}(%esp), %eax ## encoding: [0x8b,0x44,0x24,0x04]
2167 ; CHECK-NEXT: vldmxcsr (%eax) ## encoding: [0xc5,0xf8,0xae,0x10]
2168 ; CHECK-NEXT: retl ## encoding: [0xc3]
25622169 call void @llvm.x86.sse.ldmxcsr(i8* %a0)
25632170 ret void
25642171 }
25692176 define <4 x float> @test_x86_sse_max_ps(<4 x float> %a0, <4 x float> %a1) {
25702177 ; AVX-LABEL: test_x86_sse_max_ps:
25712178 ; AVX: ## BB#0:
2572 ; AVX-NEXT: vmaxps %xmm1, %xmm0, %xmm0
2573 ; AVX-NEXT: retl
2179 ; AVX-NEXT: vmaxps %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xf8,0x5f,0xc1]
2180 ; AVX-NEXT: retl ## encoding: [0xc3]
25742181 ;
25752182 ; AVX512VL-LABEL: test_x86_sse_max_ps:
25762183 ; AVX512VL: ## BB#0:
2577 ; AVX512VL-NEXT: vmaxps %xmm1, %xmm0, %xmm0
2578 ; AVX512VL-NEXT: retl
2184 ; AVX512VL-NEXT: vmaxps %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7c,0x08,0x5f,0xc1]
2185 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
25792186 %res = call <4 x float> @llvm.x86.sse.max.ps(<4 x float> %a0, <4 x float> %a1) ; <<4 x float>> [#uses=1]
25802187 ret <4 x float> %res
25812188 }
25832190
25842191
25852192 define <4 x float> @test_x86_sse_max_ss(<4 x float> %a0, <4 x float> %a1) {
2586 ; AVX-LABEL: test_x86_sse_max_ss:
2587 ; AVX: ## BB#0:
2588 ; AVX-NEXT: vmaxss %xmm1, %xmm0, %xmm0
2589 ; AVX-NEXT: retl
2590 ;
2591 ; AVX512VL-LABEL: test_x86_sse_max_ss:
2592 ; AVX512VL: ## BB#0:
2593 ; AVX512VL-NEXT: vmaxss %xmm1, %xmm0, %xmm0
2594 ; AVX512VL-NEXT: retl
2193 ; CHECK-LABEL: test_x86_sse_max_ss:
2194 ; CHECK: ## BB#0:
2195 ; CHECK-NEXT: vmaxss %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xfa,0x5f,0xc1]
2196 ; CHECK-NEXT: retl ## encoding: [0xc3]
25952197 %res = call <4 x float> @llvm.x86.sse.max.ss(<4 x float> %a0, <4 x float> %a1) ; <<4 x float>> [#uses=1]
25962198 ret <4 x float> %res
25972199 }
26012203 define <4 x float> @test_x86_sse_min_ps(<4 x float> %a0, <4 x float> %a1) {
26022204 ; AVX-LABEL: test_x86_sse_min_ps:
26032205 ; AVX: ## BB#0:
2604 ; AVX-NEXT: vminps %xmm1, %xmm0, %xmm0
2605 ; AVX-NEXT: retl
2206 ; AVX-NEXT: vminps %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xf8,0x5d,0xc1]
2207 ; AVX-NEXT: retl ## encoding: [0xc3]
26062208 ;
26072209 ; AVX512VL-LABEL: test_x86_sse_min_ps:
26082210 ; AVX512VL: ## BB#0:
2609 ; AVX512VL-NEXT: vminps %xmm1, %xmm0, %xmm0
2610 ; AVX512VL-NEXT: retl
2211 ; AVX512VL-NEXT: vminps %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf1,0x7c,0x08,0x5d,0xc1]
2212 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
26112213 %res = call <4 x float> @llvm.x86.sse.min.ps(<4 x float> %a0, <4 x float> %a1) ; <<4 x float>> [#uses=1]
26122214 ret <4 x float> %res
26132215 }
26152217
26162218
26172219 define <4 x float> @test_x86_sse_min_ss(<4 x float> %a0, <4 x float> %a1) {
2618 ; AVX-LABEL: test_x86_sse_min_ss:
2619 ; AVX: ## BB#0:
2620 ; AVX-NEXT: vminss %xmm1, %xmm0, %xmm0
2621 ; AVX-NEXT: retl
2622 ;
2623 ; AVX512VL-LABEL: test_x86_sse_min_ss:
2624 ; AVX512VL: ## BB#0:
2625 ; AVX512VL-NEXT: vminss %xmm1, %xmm0, %xmm0
2626 ; AVX512VL-NEXT: retl
2220 ; CHECK-LABEL: test_x86_sse_min_ss:
2221 ; CHECK: ## BB#0:
2222 ; CHECK-NEXT: vminss %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xfa,0x5d,0xc1]
2223 ; CHECK-NEXT: retl ## encoding: [0xc3]
26272224 %res = call <4 x float> @llvm.x86.sse.min.ss(<4 x float> %a0, <4 x float> %a1) ; <<4 x float>> [#uses=1]
26282225 ret <4 x float> %res
26292226 }
26312228
26322229
26332230 define i32 @test_x86_sse_movmsk_ps(<4 x float> %a0) {
2634 ; AVX-LABEL: test_x86_sse_movmsk_ps:
2635 ; AVX: ## BB#0:
2636 ; AVX-NEXT: vmovmskps %xmm0, %eax
2637 ; AVX-NEXT: retl
2638 ;
2639 ; AVX512VL-LABEL: test_x86_sse_movmsk_ps:
2640 ; AVX512VL: ## BB#0:
2641 ; AVX512VL-NEXT: vmovmskps %xmm0, %eax
2642 ; AVX512VL-NEXT: retl
2231 ; CHECK-LABEL: test_x86_sse_movmsk_ps:
2232 ; CHECK: ## BB#0:
2233 ; CHECK-NEXT: vmovmskps %xmm0, %eax ## encoding: [0xc5,0xf8,0x50,0xc0]
2234 ; CHECK-NEXT: retl ## encoding: [0xc3]
26432235 %res = call i32 @llvm.x86.sse.movmsk.ps(<4 x float> %a0) ; [#uses=1]
26442236 ret i32 %res
26452237 }
26482240
26492241
26502242 define <4 x float> @test_x86_sse_mul_ss(<4 x float> %a0, <4 x float> %a1) {
2651 ; AVX-LABEL: test_x86_sse_mul_ss:
2652 ; AVX: ## BB#0:
2653 ; AVX-NEXT: vmulss %xmm1, %xmm0, %xmm0
2654 ; AVX-NEXT: retl
2655 ;
2656 ; AVX512VL-LABEL: test_x86_sse_mul_ss:
2657 ; AVX512VL: ## BB#0:
2658 ; AVX512VL-NEXT: vmulss %xmm1, %xmm0, %xmm0
2659 ; AVX512VL-NEXT: retl
2243 ; CHECK-LABEL: test_x86_sse_mul_ss:
2244 ; CHECK: ## BB#0:
2245 ; CHECK-NEXT: vmulss %xmm1, %xmm0, %xmm0 ## encoding: [0xc5,0xfa,0x59,0xc1]
2246 ; CHECK-NEXT: retl ## encoding: [0xc3]
26602247 %res = call <4 x float> @llvm.x86.sse.mul.ss(<4 x float> %a0, <4 x float> %a1) ; <<4 x float>> [#uses=1]
26612248 ret <4 x float> %res
26622249 }
26662253 define <4 x float> @test_x86_sse_rcp_ps(<4 x float> %a0) {
26672254 ; AVX-LABEL: test_x86_sse_rcp_ps:
26682255 ; AVX: ## BB#0:
2669 ; AVX-NEXT: vrcpps %xmm0, %xmm0
2670 ; AVX-NEXT: retl
2256 ; AVX-NEXT: vrcpps %xmm0, %xmm0 ## encoding: [0xc5,0xf8,0x53,0xc0]
2257 ; AVX-NEXT: retl ## encoding: [0xc3]
26712258 ;
26722259 ; AVX512VL-LABEL: test_x86_sse_rcp_ps:
26732260 ; AVX512VL: ## BB#0:
2674 ; AVX512VL-NEXT: vrcp14ps %xmm0, %xmm0
2675 ; AVX512VL-NEXT: retl
2261 ; AVX512VL-NEXT: vrcp14ps %xmm0, %xmm0 ## encoding: [0x62,0xf2,0x7d,0x08,0x4c,0xc0]
2262 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
26762263 %res = call <4 x float> @llvm.x86.sse.rcp.ps(<4 x float> %a0) ; <<4 x float>> [#uses=1]
26772264 ret <4 x float> %res
26782265 }
26802267
26812268
26822269 define <4 x float> @test_x86_sse_rcp_ss(<4 x float> %a0) {
2683 ; AVX-LABEL: test_x86_sse_rcp_ss:
2684 ; AVX: ## BB#0:
2685 ; AVX-NEXT: vrcpss %xmm0, %xmm0, %xmm0
2686 ; AVX-NEXT: retl
2687 ;
2688 ; AVX512VL-LABEL: test_x86_sse_rcp_ss:
2689 ; AVX512VL: ## BB#0:
2690 ; AVX512VL-NEXT: vrcpss %xmm0, %xmm0, %xmm0
2691 ; AVX512VL-NEXT: retl
2270 ; CHECK-LABEL: test_x86_sse_rcp_ss:
2271 ; CHECK: ## BB#0:
2272 ; CHECK-NEXT: vrcpss %xmm0, %xmm0, %xmm0 ## encoding: [0xc5,0xfa,0x53,0xc0]
2273 ; CHECK-NEXT: retl ## encoding: [0xc3]
26922274 %res = call <4 x float> @llvm.x86.sse.rcp.ss(<4 x float> %a0) ; <<4 x float>> [#uses=1]
26932275 ret <4 x float> %res
26942276 }
26982280 define <4 x float> @test_x86_sse_rsqrt_ps(<4 x float> %a0) {
26992281 ; AVX-LABEL: test_x86_sse_rsqrt_ps:
27002282 ; AVX: ## BB#0:
2701 ; AVX-NEXT: vrsqrtps %xmm0, %xmm0
2702 ; AVX-NEXT: retl
2283 ; AVX-NEXT: vrsqrtps %xmm0, %xmm0 ## encoding: [0xc5,0xf8,0x52,0xc0]
2284 ; AVX-NEXT: retl ## encoding: [0xc3]
27032285 ;
27042286 ; AVX512VL-LABEL: test_x86_sse_rsqrt_ps:
27052287 ; AVX512VL: ## BB#0:
2706 ; AVX512VL-NEXT: vrsqrt14ps %xmm0, %xmm0
2707 ; AVX512VL-NEXT: retl
2288 ; AVX512VL-NEXT: vrsqrt14ps %xmm0, %xmm0 ## encoding: [0x62,0xf2,0x7d,0x08,0x4e,0xc0]
2289 ; AVX512VL-NEXT: retl ## encoding: [0xc3]
27082290 %res = call <4 x float> @llvm.x86.sse.rsqrt.ps(<4 x float> %a0) ; <<4 x float>> [#uses=1]
27092291 ret <4 x float> %res
27102292 }
27122294
27132295
27142296 define <4 x float> @test_x86_sse_rsqrt_ss(<4 x float> %a0) {
2715 ; AVX-LABEL: test_x86_sse_rsqrt_ss:
2716 ; AVX: ## BB#0:
2717 ; AVX-NEXT: vrsqrtss %xmm0, %xmm0, %xmm0
2718 ; AVX-NEXT: retl
2719 ;
2720 ; AVX512VL-LABEL: test_x86_sse_rsqrt_ss:
2721 ; AVX512VL: ## BB#0:
2722 ; AVX512VL-NEXT: vrsqrtss %xmm0, %xmm0, %xmm0
2723 ; AVX512VL-NEXT: retl
2297 ; CHECK-LABEL: test_x86_sse_rsqrt_ss:
2298 ; CHECK: ## BB#0:
2299 ; CHECK-NEXT: vrsqrtss %xmm0, %xmm0, %xmm0 ## encoding: [0xc5,0xfa,0x52,0xc0]
2300 ; CHECK-NEXT: retl ## encoding: [0xc3]
27242301 %res = call <4 x float> @llvm.x86.sse.rsqrt.ss(<4 x float> %a0) ; <<4 x float>> [#uses=1]
27252302 ret <4 x float> %res
27262303 }
27282305
27292306
27302307 define <4 x float> @test_x86_sse_sqrt_ps(<4 x float> %a0) {
2731 ; AVX-LABEL: test_x86_sse_sqrt_ps:
2732 ; AVX: ## BB#0:
2733 ; AVX-NEXT: vsqrtps %xmm0, %xmm0
2734 ; AVX-NEXT: retl
2735 ;
2736 ; AVX512VL-LABEL: test_x86_sse_sqrt_ps:
2737 ; AVX512VL: ## BB#0:
2738 ; AVX512VL-NEXT: vsqrtps %xmm0, %xmm0
2739 ; AVX512VL-NEXT: retl
2308 ; CHECK-LABEL: test_x86_sse_sqrt_ps:
2309 ; CHECK: ## BB#0:
2310 ; CHECK-NEXT: vsqrtps %xmm0, %xmm0 ## encoding: [0xc5,0xf8,0x51,0xc0]
2311 ; CHECK-NEXT: retl ## encoding: [0xc3]
27402312 %res = call <4 x float> @llvm.x86.sse.sqrt.ps(<4 x float> %a0) ; <<4 x float>> [#uses=1]
27412313 ret <4 x float> %res
27422314 }
27442316
27452317
27462318 define <4 x float> @test_x86_sse_sqrt_ss(<4 x float> %a0) {
2747 ; AVX-LABEL: test_x86_sse_sqrt_ss:
2748 ; AVX: ## BB#0:
2749 ; AVX-NEXT: vsqrtss %xmm0, %xmm0, %xmm0
2750 ; AVX-NEXT: retl
2751 ;
2752 ; AVX512VL-LABEL: test_x86_sse_sqrt_ss:
2753 ; AVX512VL: ## BB#0:
2754 ; AVX512VL-NEXT: vsqrtss %xmm0, %xmm0, %xmm0
2755 ; AVX512VL-NEXT: retl
2319 ; CHECK-LABEL: test_x86_sse_sqrt_ss:
2320 ; CHECK: ## BB#0:
2321 ; CHECK-NEXT: vsqrtss %xmm0, %xmm0, %xmm0 ## encoding: [0xc5,0xfa,0x51,0xc0]
2322 ; CHECK-NEXT: retl ## encoding: [0xc3]
27562323 %res = call <4 x float> @llvm.x86.sse.sqrt.ss(<4 x float> %a0) ; <<4 x float>> [#uses=1]
27572324 ret <4 x float> %res
27582325 }
27602327
27612328
27622329 define void @test_x86_sse_stmxcsr(i8* %a0) {
2763 ; AVX-LABEL: test_x86_sse_stmxcsr:
2764 ; AVX: ## BB#0:
2765 ; AVX-NEXT: movl {{[0-9]+}}(%esp), %eax
2766 ; AVX-NEXT: vstmxcsr (%eax)
2767 ; AVX-NEXT: retl
2768 ;
2769 ; AVX512VL-LABEL: test_x86_sse_stmxcsr:
2770 ; AVX512VL: ## BB#0: