1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mcpu=icelake-server | FileCheck %s --check-prefixes=CHECK,CHECK-ICX,CHECK-ICX-NO-BYPASS-DELAY
3 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mcpu=icelake-server -mattr=-no-bypass-delay-shuffle | FileCheck %s --check-prefixes=CHECK,CHECK-ICX,CHECK-ICX-BYPASS-DELAY
4 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mcpu=x86-64-v4 | FileCheck %s --check-prefixes=CHECK,CHECK-V4
5 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512f,+avx512vl,+avx512bw,+avx512dq | FileCheck %s --check-prefixes=CHECK,CHECK-AVX512
6 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mcpu=znver4 | FileCheck %s --check-prefixes=CHECK,CHECK-ZNVER4
8 define <16 x float> @transform_VPERMILPSZrr(<16 x float> %a) nounwind {
9 ; CHECK-LABEL: transform_VPERMILPSZrr:
11 ; CHECK-NEXT: vshufps {{.*#+}} zmm0 = zmm0[3,2,1,0,7,6,5,4,11,10,9,8,15,14,13,12]
13 %shufp = shufflevector <16 x float> %a, <16 x float> poison, <16 x i32> <i32 3, i32 2, i32 1, i32 0, i32 7, i32 6, i32 5, i32 4, i32 11, i32 10, i32 9, i32 8, i32 15, i32 14, i32 13, i32 12>
14 ret <16 x float> %shufp
17 define <8 x float> @transform_VPERMILPSYrr(<8 x float> %a) nounwind {
18 ; CHECK-LABEL: transform_VPERMILPSYrr:
20 ; CHECK-NEXT: vshufps {{.*#+}} ymm0 = ymm0[3,2,1,0,7,6,5,4]
22 %shufp = shufflevector <8 x float> %a, <8 x float> poison, <8 x i32> <i32 3, i32 2, i32 1, i32 0, i32 7, i32 6, i32 5, i32 4>
23 ret <8 x float> %shufp
26 define <4 x float> @transform_VPERMILPSrr(<4 x float> %a) nounwind {
27 ; CHECK-LABEL: transform_VPERMILPSrr:
29 ; CHECK-NEXT: vshufps {{.*#+}} xmm0 = xmm0[3,2,1,0]
31 %shufp = shufflevector <4 x float> %a, <4 x float> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
32 ret <4 x float> %shufp
35 define <16 x float> @transform_VPERMILPSZrrkz(<16 x float> %a, i16 %mask_int) nounwind {
36 ; CHECK-LABEL: transform_VPERMILPSZrrkz:
38 ; CHECK-NEXT: kmovd %edi, %k1
39 ; CHECK-NEXT: vshufps {{.*#+}} zmm0 {%k1} {z} = zmm0[3,2,1,0,7,6,5,4,11,10,9,8,15,14,13,12]
41 %mask = bitcast i16 %mask_int to <16 x i1>
42 %shufp = shufflevector <16 x float> %a, <16 x float> poison, <16 x i32> <i32 3, i32 2, i32 1, i32 0, i32 7, i32 6, i32 5, i32 4, i32 11, i32 10, i32 9, i32 8, i32 15, i32 14, i32 13, i32 12>
43 %res = select <16 x i1> %mask, <16 x float> %shufp, <16 x float> zeroinitializer
47 define <8 x float> @transform_VPERMILPSYrrkz(<8 x float> %a, i8 %mask_int) nounwind {
48 ; CHECK-LABEL: transform_VPERMILPSYrrkz:
50 ; CHECK-NEXT: kmovd %edi, %k1
51 ; CHECK-NEXT: vshufps {{.*#+}} ymm0 {%k1} {z} = ymm0[3,2,1,0,7,6,5,4]
53 %mask = bitcast i8 %mask_int to <8 x i1>
54 %shufp = shufflevector <8 x float> %a, <8 x float> poison, <8 x i32> <i32 3, i32 2, i32 1, i32 0, i32 7, i32 6, i32 5, i32 4>
55 %res = select <8 x i1> %mask, <8 x float> %shufp, <8 x float> zeroinitializer
59 define <4 x float> @transform_VPERMILPSrrkz(<4 x float> %a, i4 %mask_int) nounwind {
60 ; CHECK-LABEL: transform_VPERMILPSrrkz:
62 ; CHECK-NEXT: kmovd %edi, %k1
63 ; CHECK-NEXT: vshufps {{.*#+}} xmm0 {%k1} {z} = xmm0[3,2,1,0]
65 %mask = bitcast i4 %mask_int to <4 x i1>
66 %shufp = shufflevector <4 x float> %a, <4 x float> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
67 %res = select <4 x i1> %mask, <4 x float> %shufp, <4 x float> zeroinitializer
71 define <16 x float> @transform_VPERMILPSZrrk(<16 x float> %a, <16 x float> %b, i16 %mask_int) nounwind {
72 ; CHECK-LABEL: transform_VPERMILPSZrrk:
74 ; CHECK-NEXT: kmovd %edi, %k1
75 ; CHECK-NEXT: vshufps {{.*#+}} zmm1 {%k1} = zmm0[3,2,1,0,7,6,5,4,11,10,9,8,15,14,13,12]
76 ; CHECK-NEXT: vmovaps %zmm1, %zmm0
78 %mask = bitcast i16 %mask_int to <16 x i1>
79 %shufp = shufflevector <16 x float> %a, <16 x float> poison, <16 x i32> <i32 3, i32 2, i32 1, i32 0, i32 7, i32 6, i32 5, i32 4, i32 11, i32 10, i32 9, i32 8, i32 15, i32 14, i32 13, i32 12>
80 %res = select <16 x i1> %mask, <16 x float> %shufp, <16 x float> %b
84 define <8 x float> @transform_VPERMILPSYrrk(<8 x float> %a, <8 x float> %b, i8 %mask_int) nounwind {
85 ; CHECK-LABEL: transform_VPERMILPSYrrk:
87 ; CHECK-NEXT: kmovd %edi, %k1
88 ; CHECK-NEXT: vshufps {{.*#+}} ymm1 {%k1} = ymm0[3,2,1,0,7,6,5,4]
89 ; CHECK-NEXT: vmovaps %ymm1, %ymm0
91 %mask = bitcast i8 %mask_int to <8 x i1>
92 %shufp = shufflevector <8 x float> %a, <8 x float> poison, <8 x i32> <i32 3, i32 2, i32 1, i32 0, i32 7, i32 6, i32 5, i32 4>
93 %res = select <8 x i1> %mask, <8 x float> %shufp, <8 x float> %b
97 define <4 x float> @transform_VPERMILPSrrk(<4 x float> %a, <4 x float> %b, i4 %mask_int) nounwind {
98 ; CHECK-LABEL: transform_VPERMILPSrrk:
100 ; CHECK-NEXT: kmovd %edi, %k1
101 ; CHECK-NEXT: vshufps {{.*#+}} xmm1 {%k1} = xmm0[3,2,1,0]
102 ; CHECK-NEXT: vmovaps %xmm1, %xmm0
104 %mask = bitcast i4 %mask_int to <4 x i1>
105 %shufp = shufflevector <4 x float> %a, <4 x float> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
106 %res = select <4 x i1> %mask, <4 x float> %shufp, <4 x float> %b
110 define <16 x float> @transform_VPERMILPSZrm(ptr %ap) nounwind {
111 ; CHECK-LABEL: transform_VPERMILPSZrm:
113 ; CHECK-NEXT: vpermilps {{.*#+}} zmm0 = mem[3,2,1,0,7,6,5,4,11,10,9,8,15,14,13,12]
115 %a = load <16 x float>, ptr %ap
116 %shufp = shufflevector <16 x float> %a, <16 x float> poison, <16 x i32> <i32 3, i32 2, i32 1, i32 0, i32 7, i32 6, i32 5, i32 4, i32 11, i32 10, i32 9, i32 8, i32 15, i32 14, i32 13, i32 12>
117 ret <16 x float> %shufp
120 define <8 x float> @transform_VPERMILPSYrm(ptr %ap) nounwind {
121 ; CHECK-ICX-NO-BYPASS-DELAY-LABEL: transform_VPERMILPSYrm:
122 ; CHECK-ICX-NO-BYPASS-DELAY: # %bb.0:
123 ; CHECK-ICX-NO-BYPASS-DELAY-NEXT: vpshufd {{.*#+}} ymm0 = mem[3,2,1,0,7,6,5,4]
124 ; CHECK-ICX-NO-BYPASS-DELAY-NEXT: retq
126 ; CHECK-ICX-BYPASS-DELAY-LABEL: transform_VPERMILPSYrm:
127 ; CHECK-ICX-BYPASS-DELAY: # %bb.0:
128 ; CHECK-ICX-BYPASS-DELAY-NEXT: vpermilps {{.*#+}} ymm0 = mem[3,2,1,0,7,6,5,4]
129 ; CHECK-ICX-BYPASS-DELAY-NEXT: retq
131 ; CHECK-V4-LABEL: transform_VPERMILPSYrm:
133 ; CHECK-V4-NEXT: vpermilps {{.*#+}} ymm0 = mem[3,2,1,0,7,6,5,4]
134 ; CHECK-V4-NEXT: retq
136 ; CHECK-AVX512-LABEL: transform_VPERMILPSYrm:
137 ; CHECK-AVX512: # %bb.0:
138 ; CHECK-AVX512-NEXT: vpermilps {{.*#+}} ymm0 = mem[3,2,1,0,7,6,5,4]
139 ; CHECK-AVX512-NEXT: retq
141 ; CHECK-ZNVER4-LABEL: transform_VPERMILPSYrm:
142 ; CHECK-ZNVER4: # %bb.0:
143 ; CHECK-ZNVER4-NEXT: vpermilps {{.*#+}} ymm0 = mem[3,2,1,0,7,6,5,4]
144 ; CHECK-ZNVER4-NEXT: retq
145 %a = load <8 x float>, ptr %ap
146 %shufp = shufflevector <8 x float> %a, <8 x float> poison, <8 x i32> <i32 3, i32 2, i32 1, i32 0, i32 7, i32 6, i32 5, i32 4>
147 ret <8 x float> %shufp
150 define <4 x float> @transform_VPERMILPSrm(ptr %ap) nounwind {
151 ; CHECK-ICX-NO-BYPASS-DELAY-LABEL: transform_VPERMILPSrm:
152 ; CHECK-ICX-NO-BYPASS-DELAY: # %bb.0:
153 ; CHECK-ICX-NO-BYPASS-DELAY-NEXT: vpshufd {{.*#+}} xmm0 = mem[3,2,1,0]
154 ; CHECK-ICX-NO-BYPASS-DELAY-NEXT: retq
156 ; CHECK-ICX-BYPASS-DELAY-LABEL: transform_VPERMILPSrm:
157 ; CHECK-ICX-BYPASS-DELAY: # %bb.0:
158 ; CHECK-ICX-BYPASS-DELAY-NEXT: vpermilps {{.*#+}} xmm0 = mem[3,2,1,0]
159 ; CHECK-ICX-BYPASS-DELAY-NEXT: retq
161 ; CHECK-V4-LABEL: transform_VPERMILPSrm:
163 ; CHECK-V4-NEXT: vpermilps {{.*#+}} xmm0 = mem[3,2,1,0]
164 ; CHECK-V4-NEXT: retq
166 ; CHECK-AVX512-LABEL: transform_VPERMILPSrm:
167 ; CHECK-AVX512: # %bb.0:
168 ; CHECK-AVX512-NEXT: vpermilps {{.*#+}} xmm0 = mem[3,2,1,0]
169 ; CHECK-AVX512-NEXT: retq
171 ; CHECK-ZNVER4-LABEL: transform_VPERMILPSrm:
172 ; CHECK-ZNVER4: # %bb.0:
173 ; CHECK-ZNVER4-NEXT: vpermilps {{.*#+}} xmm0 = mem[3,2,1,0]
174 ; CHECK-ZNVER4-NEXT: retq
175 %a = load <4 x float>, ptr %ap
176 %shufp = shufflevector <4 x float> %a, <4 x float> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
177 ret <4 x float> %shufp
180 define <16 x float> @transform_VPERMILPSZrmkz(ptr %ap, i16 %mask_int) nounwind {
181 ; CHECK-LABEL: transform_VPERMILPSZrmkz:
183 ; CHECK-NEXT: kmovd %esi, %k1
184 ; CHECK-NEXT: vpermilps {{.*#+}} zmm0 {%k1} {z} = mem[3,2,1,0,7,6,5,4,11,10,9,8,15,14,13,12]
186 %mask = bitcast i16 %mask_int to <16 x i1>
187 %a = load <16 x float>, ptr %ap
188 %shufp = shufflevector <16 x float> %a, <16 x float> poison, <16 x i32> <i32 3, i32 2, i32 1, i32 0, i32 7, i32 6, i32 5, i32 4, i32 11, i32 10, i32 9, i32 8, i32 15, i32 14, i32 13, i32 12>
189 %res = select <16 x i1> %mask, <16 x float> %shufp, <16 x float> zeroinitializer
190 ret <16 x float> %res
193 define <8 x float> @transform_VPERMILPSYrmkz(ptr %ap, i8 %mask_int) nounwind {
194 ; CHECK-ICX-NO-BYPASS-DELAY-LABEL: transform_VPERMILPSYrmkz:
195 ; CHECK-ICX-NO-BYPASS-DELAY: # %bb.0:
196 ; CHECK-ICX-NO-BYPASS-DELAY-NEXT: kmovd %esi, %k1
197 ; CHECK-ICX-NO-BYPASS-DELAY-NEXT: vpshufd {{.*#+}} ymm0 {%k1} {z} = mem[3,2,1,0,7,6,5,4]
198 ; CHECK-ICX-NO-BYPASS-DELAY-NEXT: retq
200 ; CHECK-ICX-BYPASS-DELAY-LABEL: transform_VPERMILPSYrmkz:
201 ; CHECK-ICX-BYPASS-DELAY: # %bb.0:
202 ; CHECK-ICX-BYPASS-DELAY-NEXT: kmovd %esi, %k1
203 ; CHECK-ICX-BYPASS-DELAY-NEXT: vpermilps {{.*#+}} ymm0 {%k1} {z} = mem[3,2,1,0,7,6,5,4]
204 ; CHECK-ICX-BYPASS-DELAY-NEXT: retq
206 ; CHECK-V4-LABEL: transform_VPERMILPSYrmkz:
208 ; CHECK-V4-NEXT: kmovd %esi, %k1
209 ; CHECK-V4-NEXT: vpermilps {{.*#+}} ymm0 {%k1} {z} = mem[3,2,1,0,7,6,5,4]
210 ; CHECK-V4-NEXT: retq
212 ; CHECK-AVX512-LABEL: transform_VPERMILPSYrmkz:
213 ; CHECK-AVX512: # %bb.0:
214 ; CHECK-AVX512-NEXT: kmovd %esi, %k1
215 ; CHECK-AVX512-NEXT: vpermilps {{.*#+}} ymm0 {%k1} {z} = mem[3,2,1,0,7,6,5,4]
216 ; CHECK-AVX512-NEXT: retq
218 ; CHECK-ZNVER4-LABEL: transform_VPERMILPSYrmkz:
219 ; CHECK-ZNVER4: # %bb.0:
220 ; CHECK-ZNVER4-NEXT: kmovd %esi, %k1
221 ; CHECK-ZNVER4-NEXT: vpermilps {{.*#+}} ymm0 {%k1} {z} = mem[3,2,1,0,7,6,5,4]
222 ; CHECK-ZNVER4-NEXT: retq
223 %mask = bitcast i8 %mask_int to <8 x i1>
224 %a = load <8 x float>, ptr %ap
225 %shufp = shufflevector <8 x float> %a, <8 x float> poison, <8 x i32> <i32 3, i32 2, i32 1, i32 0, i32 7, i32 6, i32 5, i32 4>
226 %res = select <8 x i1> %mask, <8 x float> %shufp, <8 x float> zeroinitializer
230 define <4 x float> @transform_VPERMILPSrmkz(ptr %ap, i4 %mask_int) nounwind {
231 ; CHECK-ICX-NO-BYPASS-DELAY-LABEL: transform_VPERMILPSrmkz:
232 ; CHECK-ICX-NO-BYPASS-DELAY: # %bb.0:
233 ; CHECK-ICX-NO-BYPASS-DELAY-NEXT: kmovd %esi, %k1
234 ; CHECK-ICX-NO-BYPASS-DELAY-NEXT: vpshufd {{.*#+}} xmm0 {%k1} {z} = mem[3,2,1,0]
235 ; CHECK-ICX-NO-BYPASS-DELAY-NEXT: retq
237 ; CHECK-ICX-BYPASS-DELAY-LABEL: transform_VPERMILPSrmkz:
238 ; CHECK-ICX-BYPASS-DELAY: # %bb.0:
239 ; CHECK-ICX-BYPASS-DELAY-NEXT: kmovd %esi, %k1
240 ; CHECK-ICX-BYPASS-DELAY-NEXT: vpermilps {{.*#+}} xmm0 {%k1} {z} = mem[3,2,1,0]
241 ; CHECK-ICX-BYPASS-DELAY-NEXT: retq
243 ; CHECK-V4-LABEL: transform_VPERMILPSrmkz:
245 ; CHECK-V4-NEXT: kmovd %esi, %k1
246 ; CHECK-V4-NEXT: vpermilps {{.*#+}} xmm0 {%k1} {z} = mem[3,2,1,0]
247 ; CHECK-V4-NEXT: retq
249 ; CHECK-AVX512-LABEL: transform_VPERMILPSrmkz:
250 ; CHECK-AVX512: # %bb.0:
251 ; CHECK-AVX512-NEXT: kmovd %esi, %k1
252 ; CHECK-AVX512-NEXT: vpermilps {{.*#+}} xmm0 {%k1} {z} = mem[3,2,1,0]
253 ; CHECK-AVX512-NEXT: retq
255 ; CHECK-ZNVER4-LABEL: transform_VPERMILPSrmkz:
256 ; CHECK-ZNVER4: # %bb.0:
257 ; CHECK-ZNVER4-NEXT: kmovd %esi, %k1
258 ; CHECK-ZNVER4-NEXT: vpermilps {{.*#+}} xmm0 {%k1} {z} = mem[3,2,1,0]
259 ; CHECK-ZNVER4-NEXT: retq
260 %mask = bitcast i4 %mask_int to <4 x i1>
261 %a = load <4 x float>, ptr %ap
262 %shufp = shufflevector <4 x float> %a, <4 x float> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
263 %res = select <4 x i1> %mask, <4 x float> %shufp, <4 x float> zeroinitializer
267 define <16 x float> @transform_VPERMILPSZrmk(ptr %ap, <16 x float> %b, i16 %mask_int) nounwind {
268 ; CHECK-LABEL: transform_VPERMILPSZrmk:
270 ; CHECK-NEXT: kmovd %esi, %k1
271 ; CHECK-NEXT: vpermilps {{.*#+}} zmm0 {%k1} = mem[3,2,1,0,7,6,5,4,11,10,9,8,15,14,13,12]
273 %mask = bitcast i16 %mask_int to <16 x i1>
274 %a = load <16 x float>, ptr %ap
275 %shufp = shufflevector <16 x float> %a, <16 x float> poison, <16 x i32> <i32 3, i32 2, i32 1, i32 0, i32 7, i32 6, i32 5, i32 4, i32 11, i32 10, i32 9, i32 8, i32 15, i32 14, i32 13, i32 12>
276 %res = select <16 x i1> %mask, <16 x float> %shufp, <16 x float> %b
277 ret <16 x float> %res
280 define <8 x float> @transform_VPERMILPSYrmk(ptr %ap, <8 x float> %b, i8 %mask_int) nounwind {
281 ; CHECK-ICX-NO-BYPASS-DELAY-LABEL: transform_VPERMILPSYrmk:
282 ; CHECK-ICX-NO-BYPASS-DELAY: # %bb.0:
283 ; CHECK-ICX-NO-BYPASS-DELAY-NEXT: kmovd %esi, %k1
284 ; CHECK-ICX-NO-BYPASS-DELAY-NEXT: vpshufd {{.*#+}} ymm0 {%k1} = mem[3,2,1,0,7,6,5,4]
285 ; CHECK-ICX-NO-BYPASS-DELAY-NEXT: retq
287 ; CHECK-ICX-BYPASS-DELAY-LABEL: transform_VPERMILPSYrmk:
288 ; CHECK-ICX-BYPASS-DELAY: # %bb.0:
289 ; CHECK-ICX-BYPASS-DELAY-NEXT: kmovd %esi, %k1
290 ; CHECK-ICX-BYPASS-DELAY-NEXT: vpermilps {{.*#+}} ymm0 {%k1} = mem[3,2,1,0,7,6,5,4]
291 ; CHECK-ICX-BYPASS-DELAY-NEXT: retq
293 ; CHECK-V4-LABEL: transform_VPERMILPSYrmk:
295 ; CHECK-V4-NEXT: kmovd %esi, %k1
296 ; CHECK-V4-NEXT: vpermilps {{.*#+}} ymm0 {%k1} = mem[3,2,1,0,7,6,5,4]
297 ; CHECK-V4-NEXT: retq
299 ; CHECK-AVX512-LABEL: transform_VPERMILPSYrmk:
300 ; CHECK-AVX512: # %bb.0:
301 ; CHECK-AVX512-NEXT: kmovd %esi, %k1
302 ; CHECK-AVX512-NEXT: vpermilps {{.*#+}} ymm0 {%k1} = mem[3,2,1,0,7,6,5,4]
303 ; CHECK-AVX512-NEXT: retq
305 ; CHECK-ZNVER4-LABEL: transform_VPERMILPSYrmk:
306 ; CHECK-ZNVER4: # %bb.0:
307 ; CHECK-ZNVER4-NEXT: kmovd %esi, %k1
308 ; CHECK-ZNVER4-NEXT: vpermilps {{.*#+}} ymm0 {%k1} = mem[3,2,1,0,7,6,5,4]
309 ; CHECK-ZNVER4-NEXT: retq
310 %mask = bitcast i8 %mask_int to <8 x i1>
311 %a = load <8 x float>, ptr %ap
312 %shufp = shufflevector <8 x float> %a, <8 x float> poison, <8 x i32> <i32 3, i32 2, i32 1, i32 0, i32 7, i32 6, i32 5, i32 4>
313 %res = select <8 x i1> %mask, <8 x float> %shufp, <8 x float> %b
317 define <4 x float> @transform_VPERMILPSrmk(ptr %ap, <4 x float> %b, i4 %mask_int) nounwind {
318 ; CHECK-ICX-NO-BYPASS-DELAY-LABEL: transform_VPERMILPSrmk:
319 ; CHECK-ICX-NO-BYPASS-DELAY: # %bb.0:
320 ; CHECK-ICX-NO-BYPASS-DELAY-NEXT: kmovd %esi, %k1
321 ; CHECK-ICX-NO-BYPASS-DELAY-NEXT: vpshufd {{.*#+}} xmm0 {%k1} = mem[3,2,1,0]
322 ; CHECK-ICX-NO-BYPASS-DELAY-NEXT: retq
324 ; CHECK-ICX-BYPASS-DELAY-LABEL: transform_VPERMILPSrmk:
325 ; CHECK-ICX-BYPASS-DELAY: # %bb.0:
326 ; CHECK-ICX-BYPASS-DELAY-NEXT: kmovd %esi, %k1
327 ; CHECK-ICX-BYPASS-DELAY-NEXT: vpermilps {{.*#+}} xmm0 {%k1} = mem[3,2,1,0]
328 ; CHECK-ICX-BYPASS-DELAY-NEXT: retq
330 ; CHECK-V4-LABEL: transform_VPERMILPSrmk:
332 ; CHECK-V4-NEXT: kmovd %esi, %k1
333 ; CHECK-V4-NEXT: vpermilps {{.*#+}} xmm0 {%k1} = mem[3,2,1,0]
334 ; CHECK-V4-NEXT: retq
336 ; CHECK-AVX512-LABEL: transform_VPERMILPSrmk:
337 ; CHECK-AVX512: # %bb.0:
338 ; CHECK-AVX512-NEXT: kmovd %esi, %k1
339 ; CHECK-AVX512-NEXT: vpermilps {{.*#+}} xmm0 {%k1} = mem[3,2,1,0]
340 ; CHECK-AVX512-NEXT: retq
342 ; CHECK-ZNVER4-LABEL: transform_VPERMILPSrmk:
343 ; CHECK-ZNVER4: # %bb.0:
344 ; CHECK-ZNVER4-NEXT: kmovd %esi, %k1
345 ; CHECK-ZNVER4-NEXT: vpermilps {{.*#+}} xmm0 {%k1} = mem[3,2,1,0]
346 ; CHECK-ZNVER4-NEXT: retq
347 %mask = bitcast i4 %mask_int to <4 x i1>
348 %a = load <4 x float>, ptr %ap
349 %shufp = shufflevector <4 x float> %a, <4 x float> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
350 %res = select <4 x i1> %mask, <4 x float> %shufp, <4 x float> %b
353 ;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line: