1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=x86_64-unknown-linux-gnu -mattr=+avx512f,+avx512vl,+avx512dq,+fast-variable-shuffle %s -o - | FileCheck %s
4 ; FIXME: fixing PR34394 should fix the i32x2 memory cases resulting in a simple vbroadcasti32x2 instruction.
6 define <4 x i32> @test_2xi32_to_4xi32(<4 x i32> %vec) {
7 ; CHECK-LABEL: test_2xi32_to_4xi32:
9 ; CHECK-NEXT: vmovddup {{.*#+}} xmm0 = xmm0[0,0]
11 %res = shufflevector <4 x i32> %vec, <4 x i32> undef, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
14 define <4 x i32> @test_masked_2xi32_to_4xi32_mask0(<4 x i32> %vec, <4 x i32> %default, <4 x i32> %mask) {
15 ; CHECK-LABEL: test_masked_2xi32_to_4xi32_mask0:
17 ; CHECK-NEXT: vptestnmd %xmm2, %xmm2, %k1
18 ; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} xmm1 {%k1} = xmm0[0,1,0,1]
19 ; CHECK-NEXT: vmovdqa %xmm1, %xmm0
21 %shuf = shufflevector <4 x i32> %vec, <4 x i32> undef, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
22 %cmp = icmp eq <4 x i32> %mask, zeroinitializer
23 %res = select <4 x i1> %cmp, <4 x i32> %shuf, <4 x i32> %default
27 define <4 x i32> @test_masked_z_2xi32_to_4xi32_mask0(<4 x i32> %vec, <4 x i32> %mask) {
28 ; CHECK-LABEL: test_masked_z_2xi32_to_4xi32_mask0:
30 ; CHECK-NEXT: vptestnmd %xmm1, %xmm1, %k1
31 ; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} xmm0 {%k1} {z} = xmm0[0,1,0,1]
33 %shuf = shufflevector <4 x i32> %vec, <4 x i32> undef, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
34 %cmp = icmp eq <4 x i32> %mask, zeroinitializer
35 %res = select <4 x i1> %cmp, <4 x i32> %shuf, <4 x i32> zeroinitializer
38 define <4 x i32> @test_masked_2xi32_to_4xi32_mask1(<4 x i32> %vec, <4 x i32> %default, <4 x i32> %mask) {
39 ; CHECK-LABEL: test_masked_2xi32_to_4xi32_mask1:
41 ; CHECK-NEXT: vptestnmd %xmm2, %xmm2, %k1
42 ; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} xmm1 {%k1} = xmm0[0,1,0,1]
43 ; CHECK-NEXT: vmovdqa %xmm1, %xmm0
45 %shuf = shufflevector <4 x i32> %vec, <4 x i32> undef, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
46 %cmp = icmp eq <4 x i32> %mask, zeroinitializer
47 %res = select <4 x i1> %cmp, <4 x i32> %shuf, <4 x i32> %default
51 define <4 x i32> @test_masked_z_2xi32_to_4xi32_mask1(<4 x i32> %vec, <4 x i32> %mask) {
52 ; CHECK-LABEL: test_masked_z_2xi32_to_4xi32_mask1:
54 ; CHECK-NEXT: vptestnmd %xmm1, %xmm1, %k1
55 ; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} xmm0 {%k1} {z} = xmm0[0,1,0,1]
57 %shuf = shufflevector <4 x i32> %vec, <4 x i32> undef, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
58 %cmp = icmp eq <4 x i32> %mask, zeroinitializer
59 %res = select <4 x i1> %cmp, <4 x i32> %shuf, <4 x i32> zeroinitializer
62 define <4 x i32> @test_masked_2xi32_to_4xi32_mask2(<4 x i32> %vec, <4 x i32> %default, <4 x i32> %mask) {
63 ; CHECK-LABEL: test_masked_2xi32_to_4xi32_mask2:
65 ; CHECK-NEXT: vptestnmd %xmm2, %xmm2, %k1
66 ; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} xmm1 {%k1} = xmm0[0,1,0,1]
67 ; CHECK-NEXT: vmovdqa %xmm1, %xmm0
69 %shuf = shufflevector <4 x i32> %vec, <4 x i32> undef, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
70 %cmp = icmp eq <4 x i32> %mask, zeroinitializer
71 %res = select <4 x i1> %cmp, <4 x i32> %shuf, <4 x i32> %default
75 define <4 x i32> @test_masked_z_2xi32_to_4xi32_mask2(<4 x i32> %vec, <4 x i32> %mask) {
76 ; CHECK-LABEL: test_masked_z_2xi32_to_4xi32_mask2:
78 ; CHECK-NEXT: vptestnmd %xmm1, %xmm1, %k1
79 ; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} xmm0 {%k1} {z} = xmm0[0,1,0,1]
81 %shuf = shufflevector <4 x i32> %vec, <4 x i32> undef, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
82 %cmp = icmp eq <4 x i32> %mask, zeroinitializer
83 %res = select <4 x i1> %cmp, <4 x i32> %shuf, <4 x i32> zeroinitializer
86 define <4 x i32> @test_masked_2xi32_to_4xi32_mask3(<4 x i32> %vec, <4 x i32> %default, <4 x i32> %mask) {
87 ; CHECK-LABEL: test_masked_2xi32_to_4xi32_mask3:
89 ; CHECK-NEXT: vptestnmd %xmm2, %xmm2, %k1
90 ; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} xmm1 {%k1} = xmm0[0,1,0,1]
91 ; CHECK-NEXT: vmovdqa %xmm1, %xmm0
93 %shuf = shufflevector <4 x i32> %vec, <4 x i32> undef, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
94 %cmp = icmp eq <4 x i32> %mask, zeroinitializer
95 %res = select <4 x i1> %cmp, <4 x i32> %shuf, <4 x i32> %default
99 define <4 x i32> @test_masked_z_2xi32_to_4xi32_mask3(<4 x i32> %vec, <4 x i32> %mask) {
100 ; CHECK-LABEL: test_masked_z_2xi32_to_4xi32_mask3:
102 ; CHECK-NEXT: vptestnmd %xmm1, %xmm1, %k1
103 ; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} xmm0 {%k1} {z} = xmm0[0,1,0,1]
105 %shuf = shufflevector <4 x i32> %vec, <4 x i32> undef, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
106 %cmp = icmp eq <4 x i32> %mask, zeroinitializer
107 %res = select <4 x i1> %cmp, <4 x i32> %shuf, <4 x i32> zeroinitializer
110 define <8 x i32> @test_2xi32_to_8xi32(<8 x i32> %vec) {
111 ; CHECK-LABEL: test_2xi32_to_8xi32:
113 ; CHECK-NEXT: vbroadcastsd %xmm0, %ymm0
115 %res = shufflevector <8 x i32> %vec, <8 x i32> undef, <8 x i32> <i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1>
118 define <8 x i32> @test_masked_2xi32_to_8xi32_mask0(<8 x i32> %vec, <8 x i32> %default, <8 x i32> %mask) {
119 ; CHECK-LABEL: test_masked_2xi32_to_8xi32_mask0:
121 ; CHECK-NEXT: vptestnmd %ymm2, %ymm2, %k1
122 ; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} ymm1 {%k1} = xmm0[0,1,0,1,0,1,0,1]
123 ; CHECK-NEXT: vmovdqa %ymm1, %ymm0
125 %shuf = shufflevector <8 x i32> %vec, <8 x i32> undef, <8 x i32> <i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1>
126 %cmp = icmp eq <8 x i32> %mask, zeroinitializer
127 %res = select <8 x i1> %cmp, <8 x i32> %shuf, <8 x i32> %default
131 define <8 x i32> @test_masked_z_2xi32_to_8xi32_mask0(<8 x i32> %vec, <8 x i32> %mask) {
132 ; CHECK-LABEL: test_masked_z_2xi32_to_8xi32_mask0:
134 ; CHECK-NEXT: vptestnmd %ymm1, %ymm1, %k1
135 ; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} ymm0 {%k1} {z} = xmm0[0,1,0,1,0,1,0,1]
137 %shuf = shufflevector <8 x i32> %vec, <8 x i32> undef, <8 x i32> <i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1>
138 %cmp = icmp eq <8 x i32> %mask, zeroinitializer
139 %res = select <8 x i1> %cmp, <8 x i32> %shuf, <8 x i32> zeroinitializer
142 define <8 x i32> @test_masked_2xi32_to_8xi32_mask1(<8 x i32> %vec, <8 x i32> %default, <8 x i32> %mask) {
143 ; CHECK-LABEL: test_masked_2xi32_to_8xi32_mask1:
145 ; CHECK-NEXT: vptestnmd %ymm2, %ymm2, %k1
146 ; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} ymm1 {%k1} = xmm0[0,1,0,1,0,1,0,1]
147 ; CHECK-NEXT: vmovdqa %ymm1, %ymm0
149 %shuf = shufflevector <8 x i32> %vec, <8 x i32> undef, <8 x i32> <i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1>
150 %cmp = icmp eq <8 x i32> %mask, zeroinitializer
151 %res = select <8 x i1> %cmp, <8 x i32> %shuf, <8 x i32> %default
155 define <8 x i32> @test_masked_z_2xi32_to_8xi32_mask1(<8 x i32> %vec, <8 x i32> %mask) {
156 ; CHECK-LABEL: test_masked_z_2xi32_to_8xi32_mask1:
158 ; CHECK-NEXT: vptestnmd %ymm1, %ymm1, %k1
159 ; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} ymm0 {%k1} {z} = xmm0[0,1,0,1,0,1,0,1]
161 %shuf = shufflevector <8 x i32> %vec, <8 x i32> undef, <8 x i32> <i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1>
162 %cmp = icmp eq <8 x i32> %mask, zeroinitializer
163 %res = select <8 x i1> %cmp, <8 x i32> %shuf, <8 x i32> zeroinitializer
166 define <8 x i32> @test_masked_2xi32_to_8xi32_mask2(<8 x i32> %vec, <8 x i32> %default, <8 x i32> %mask) {
167 ; CHECK-LABEL: test_masked_2xi32_to_8xi32_mask2:
169 ; CHECK-NEXT: vptestnmd %ymm2, %ymm2, %k1
170 ; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} ymm1 {%k1} = xmm0[0,1,0,1,0,1,0,1]
171 ; CHECK-NEXT: vmovdqa %ymm1, %ymm0
173 %shuf = shufflevector <8 x i32> %vec, <8 x i32> undef, <8 x i32> <i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1>
174 %cmp = icmp eq <8 x i32> %mask, zeroinitializer
175 %res = select <8 x i1> %cmp, <8 x i32> %shuf, <8 x i32> %default
179 define <8 x i32> @test_masked_z_2xi32_to_8xi32_mask2(<8 x i32> %vec, <8 x i32> %mask) {
180 ; CHECK-LABEL: test_masked_z_2xi32_to_8xi32_mask2:
182 ; CHECK-NEXT: vptestnmd %ymm1, %ymm1, %k1
183 ; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} ymm0 {%k1} {z} = xmm0[0,1,0,1,0,1,0,1]
185 %shuf = shufflevector <8 x i32> %vec, <8 x i32> undef, <8 x i32> <i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1>
186 %cmp = icmp eq <8 x i32> %mask, zeroinitializer
187 %res = select <8 x i1> %cmp, <8 x i32> %shuf, <8 x i32> zeroinitializer
190 define <8 x i32> @test_masked_2xi32_to_8xi32_mask3(<8 x i32> %vec, <8 x i32> %default, <8 x i32> %mask) {
191 ; CHECK-LABEL: test_masked_2xi32_to_8xi32_mask3:
193 ; CHECK-NEXT: vptestnmd %ymm2, %ymm2, %k1
194 ; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} ymm1 {%k1} = xmm0[0,1,0,1,0,1,0,1]
195 ; CHECK-NEXT: vmovdqa %ymm1, %ymm0
197 %shuf = shufflevector <8 x i32> %vec, <8 x i32> undef, <8 x i32> <i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1>
198 %cmp = icmp eq <8 x i32> %mask, zeroinitializer
199 %res = select <8 x i1> %cmp, <8 x i32> %shuf, <8 x i32> %default
203 define <8 x i32> @test_masked_z_2xi32_to_8xi32_mask3(<8 x i32> %vec, <8 x i32> %mask) {
204 ; CHECK-LABEL: test_masked_z_2xi32_to_8xi32_mask3:
206 ; CHECK-NEXT: vptestnmd %ymm1, %ymm1, %k1
207 ; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} ymm0 {%k1} {z} = xmm0[0,1,0,1,0,1,0,1]
209 %shuf = shufflevector <8 x i32> %vec, <8 x i32> undef, <8 x i32> <i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1>
210 %cmp = icmp eq <8 x i32> %mask, zeroinitializer
211 %res = select <8 x i1> %cmp, <8 x i32> %shuf, <8 x i32> zeroinitializer
214 define <16 x i32> @test_2xi32_to_16xi32(<16 x i32> %vec) {
215 ; CHECK-LABEL: test_2xi32_to_16xi32:
217 ; CHECK-NEXT: vbroadcastsd %xmm0, %zmm0
219 %res = shufflevector <16 x i32> %vec, <16 x i32> undef, <16 x i32> <i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1>
222 define <16 x i32> @test_masked_2xi32_to_16xi32_mask0(<16 x i32> %vec, <16 x i32> %default, <16 x i32> %mask) {
223 ; CHECK-LABEL: test_masked_2xi32_to_16xi32_mask0:
225 ; CHECK-NEXT: vptestnmd %zmm2, %zmm2, %k1
226 ; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} zmm1 {%k1} = xmm0[0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1]
227 ; CHECK-NEXT: vmovdqa64 %zmm1, %zmm0
229 %shuf = shufflevector <16 x i32> %vec, <16 x i32> undef, <16 x i32> <i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1>
230 %cmp = icmp eq <16 x i32> %mask, zeroinitializer
231 %res = select <16 x i1> %cmp, <16 x i32> %shuf, <16 x i32> %default
235 define <16 x i32> @test_masked_z_2xi32_to_16xi32_mask0(<16 x i32> %vec, <16 x i32> %mask) {
236 ; CHECK-LABEL: test_masked_z_2xi32_to_16xi32_mask0:
238 ; CHECK-NEXT: vptestnmd %zmm1, %zmm1, %k1
239 ; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} zmm0 {%k1} {z} = xmm0[0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1]
241 %shuf = shufflevector <16 x i32> %vec, <16 x i32> undef, <16 x i32> <i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1>
242 %cmp = icmp eq <16 x i32> %mask, zeroinitializer
243 %res = select <16 x i1> %cmp, <16 x i32> %shuf, <16 x i32> zeroinitializer
246 define <16 x i32> @test_masked_2xi32_to_16xi32_mask1(<16 x i32> %vec, <16 x i32> %default, <16 x i32> %mask) {
247 ; CHECK-LABEL: test_masked_2xi32_to_16xi32_mask1:
249 ; CHECK-NEXT: vptestnmd %zmm2, %zmm2, %k1
250 ; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} zmm1 {%k1} = xmm0[0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1]
251 ; CHECK-NEXT: vmovdqa64 %zmm1, %zmm0
253 %shuf = shufflevector <16 x i32> %vec, <16 x i32> undef, <16 x i32> <i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1>
254 %cmp = icmp eq <16 x i32> %mask, zeroinitializer
255 %res = select <16 x i1> %cmp, <16 x i32> %shuf, <16 x i32> %default
259 define <16 x i32> @test_masked_z_2xi32_to_16xi32_mask1(<16 x i32> %vec, <16 x i32> %mask) {
260 ; CHECK-LABEL: test_masked_z_2xi32_to_16xi32_mask1:
262 ; CHECK-NEXT: vptestnmd %zmm1, %zmm1, %k1
263 ; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} zmm0 {%k1} {z} = xmm0[0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1]
265 %shuf = shufflevector <16 x i32> %vec, <16 x i32> undef, <16 x i32> <i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1>
266 %cmp = icmp eq <16 x i32> %mask, zeroinitializer
267 %res = select <16 x i1> %cmp, <16 x i32> %shuf, <16 x i32> zeroinitializer
270 define <16 x i32> @test_masked_2xi32_to_16xi32_mask2(<16 x i32> %vec, <16 x i32> %default, <16 x i32> %mask) {
271 ; CHECK-LABEL: test_masked_2xi32_to_16xi32_mask2:
273 ; CHECK-NEXT: vptestnmd %zmm2, %zmm2, %k1
274 ; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} zmm1 {%k1} = xmm0[0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1]
275 ; CHECK-NEXT: vmovdqa64 %zmm1, %zmm0
277 %shuf = shufflevector <16 x i32> %vec, <16 x i32> undef, <16 x i32> <i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1>
278 %cmp = icmp eq <16 x i32> %mask, zeroinitializer
279 %res = select <16 x i1> %cmp, <16 x i32> %shuf, <16 x i32> %default
283 define <16 x i32> @test_masked_z_2xi32_to_16xi32_mask2(<16 x i32> %vec, <16 x i32> %mask) {
284 ; CHECK-LABEL: test_masked_z_2xi32_to_16xi32_mask2:
286 ; CHECK-NEXT: vptestnmd %zmm1, %zmm1, %k1
287 ; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} zmm0 {%k1} {z} = xmm0[0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1]
289 %shuf = shufflevector <16 x i32> %vec, <16 x i32> undef, <16 x i32> <i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1>
290 %cmp = icmp eq <16 x i32> %mask, zeroinitializer
291 %res = select <16 x i1> %cmp, <16 x i32> %shuf, <16 x i32> zeroinitializer
294 define <16 x i32> @test_masked_2xi32_to_16xi32_mask3(<16 x i32> %vec, <16 x i32> %default, <16 x i32> %mask) {
295 ; CHECK-LABEL: test_masked_2xi32_to_16xi32_mask3:
297 ; CHECK-NEXT: vptestnmd %zmm2, %zmm2, %k1
298 ; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} zmm1 {%k1} = xmm0[0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1]
299 ; CHECK-NEXT: vmovdqa64 %zmm1, %zmm0
301 %shuf = shufflevector <16 x i32> %vec, <16 x i32> undef, <16 x i32> <i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1>
302 %cmp = icmp eq <16 x i32> %mask, zeroinitializer
303 %res = select <16 x i1> %cmp, <16 x i32> %shuf, <16 x i32> %default
307 define <16 x i32> @test_masked_z_2xi32_to_16xi32_mask3(<16 x i32> %vec, <16 x i32> %mask) {
308 ; CHECK-LABEL: test_masked_z_2xi32_to_16xi32_mask3:
310 ; CHECK-NEXT: vptestnmd %zmm1, %zmm1, %k1
311 ; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} zmm0 {%k1} {z} = xmm0[0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1]
313 %shuf = shufflevector <16 x i32> %vec, <16 x i32> undef, <16 x i32> <i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1>
314 %cmp = icmp eq <16 x i32> %mask, zeroinitializer
315 %res = select <16 x i1> %cmp, <16 x i32> %shuf, <16 x i32> zeroinitializer
318 define <4 x i32> @test_2xi32_to_4xi32_mem(<2 x i32>* %vp) {
319 ; CHECK-LABEL: test_2xi32_to_4xi32_mem:
321 ; CHECK-NEXT: vmovddup {{.*#+}} xmm0 = mem[0,0]
323 %vec = load <2 x i32>, <2 x i32>* %vp
324 %res = shufflevector <2 x i32> %vec, <2 x i32> undef, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
327 define <4 x i32> @test_masked_2xi32_to_4xi32_mem_mask0(<2 x i32>* %vp, <4 x i32> %default, <4 x i32> %mask) {
328 ; CHECK-LABEL: test_masked_2xi32_to_4xi32_mem_mask0:
330 ; CHECK-NEXT: vptestnmd %xmm1, %xmm1, %k1
331 ; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} xmm0 {%k1} = mem[0,1,0,1]
333 %vec = load <2 x i32>, <2 x i32>* %vp
334 %shuf = shufflevector <2 x i32> %vec, <2 x i32> undef, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
335 %cmp = icmp eq <4 x i32> %mask, zeroinitializer
336 %res = select <4 x i1> %cmp, <4 x i32> %shuf, <4 x i32> %default
340 define <4 x i32> @test_masked_z_2xi32_to_4xi32_mem_mask0(<2 x i32>* %vp, <4 x i32> %mask) {
341 ; CHECK-LABEL: test_masked_z_2xi32_to_4xi32_mem_mask0:
343 ; CHECK-NEXT: vptestnmd %xmm0, %xmm0, %k1
344 ; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} xmm0 {%k1} {z} = mem[0,1,0,1]
346 %vec = load <2 x i32>, <2 x i32>* %vp
347 %shuf = shufflevector <2 x i32> %vec, <2 x i32> undef, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
348 %cmp = icmp eq <4 x i32> %mask, zeroinitializer
349 %res = select <4 x i1> %cmp, <4 x i32> %shuf, <4 x i32> zeroinitializer
352 define <4 x i32> @test_masked_2xi32_to_4xi32_mem_mask1(<2 x i32>* %vp, <4 x i32> %default, <4 x i32> %mask) {
353 ; CHECK-LABEL: test_masked_2xi32_to_4xi32_mem_mask1:
355 ; CHECK-NEXT: vptestnmd %xmm1, %xmm1, %k1
356 ; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} xmm0 {%k1} = mem[0,1,0,1]
358 %vec = load <2 x i32>, <2 x i32>* %vp
359 %shuf = shufflevector <2 x i32> %vec, <2 x i32> undef, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
360 %cmp = icmp eq <4 x i32> %mask, zeroinitializer
361 %res = select <4 x i1> %cmp, <4 x i32> %shuf, <4 x i32> %default
365 define <4 x i32> @test_masked_z_2xi32_to_4xi32_mem_mask1(<2 x i32>* %vp, <4 x i32> %mask) {
366 ; CHECK-LABEL: test_masked_z_2xi32_to_4xi32_mem_mask1:
368 ; CHECK-NEXT: vptestnmd %xmm0, %xmm0, %k1
369 ; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} xmm0 {%k1} {z} = mem[0,1,0,1]
371 %vec = load <2 x i32>, <2 x i32>* %vp
372 %shuf = shufflevector <2 x i32> %vec, <2 x i32> undef, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
373 %cmp = icmp eq <4 x i32> %mask, zeroinitializer
374 %res = select <4 x i1> %cmp, <4 x i32> %shuf, <4 x i32> zeroinitializer
377 define <4 x i32> @test_masked_2xi32_to_4xi32_mem_mask2(<2 x i32>* %vp, <4 x i32> %default, <4 x i32> %mask) {
378 ; CHECK-LABEL: test_masked_2xi32_to_4xi32_mem_mask2:
380 ; CHECK-NEXT: vptestnmd %xmm1, %xmm1, %k1
381 ; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} xmm0 {%k1} = mem[0,1,0,1]
383 %vec = load <2 x i32>, <2 x i32>* %vp
384 %shuf = shufflevector <2 x i32> %vec, <2 x i32> undef, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
385 %cmp = icmp eq <4 x i32> %mask, zeroinitializer
386 %res = select <4 x i1> %cmp, <4 x i32> %shuf, <4 x i32> %default
390 define <4 x i32> @test_masked_z_2xi32_to_4xi32_mem_mask2(<2 x i32>* %vp, <4 x i32> %mask) {
391 ; CHECK-LABEL: test_masked_z_2xi32_to_4xi32_mem_mask2:
393 ; CHECK-NEXT: vptestnmd %xmm0, %xmm0, %k1
394 ; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} xmm0 {%k1} {z} = mem[0,1,0,1]
396 %vec = load <2 x i32>, <2 x i32>* %vp
397 %shuf = shufflevector <2 x i32> %vec, <2 x i32> undef, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
398 %cmp = icmp eq <4 x i32> %mask, zeroinitializer
399 %res = select <4 x i1> %cmp, <4 x i32> %shuf, <4 x i32> zeroinitializer
402 define <4 x i32> @test_masked_2xi32_to_4xi32_mem_mask3(<2 x i32>* %vp, <4 x i32> %default, <4 x i32> %mask) {
403 ; CHECK-LABEL: test_masked_2xi32_to_4xi32_mem_mask3:
405 ; CHECK-NEXT: vptestnmd %xmm1, %xmm1, %k1
406 ; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} xmm0 {%k1} = mem[0,1,0,1]
408 %vec = load <2 x i32>, <2 x i32>* %vp
409 %shuf = shufflevector <2 x i32> %vec, <2 x i32> undef, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
410 %cmp = icmp eq <4 x i32> %mask, zeroinitializer
411 %res = select <4 x i1> %cmp, <4 x i32> %shuf, <4 x i32> %default
415 define <4 x i32> @test_masked_z_2xi32_to_4xi32_mem_mask3(<2 x i32>* %vp, <4 x i32> %mask) {
416 ; CHECK-LABEL: test_masked_z_2xi32_to_4xi32_mem_mask3:
418 ; CHECK-NEXT: vptestnmd %xmm0, %xmm0, %k1
419 ; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} xmm0 {%k1} {z} = mem[0,1,0,1]
421 %vec = load <2 x i32>, <2 x i32>* %vp
422 %shuf = shufflevector <2 x i32> %vec, <2 x i32> undef, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
423 %cmp = icmp eq <4 x i32> %mask, zeroinitializer
424 %res = select <4 x i1> %cmp, <4 x i32> %shuf, <4 x i32> zeroinitializer
427 define <8 x i32> @test_2xi32_to_8xi32_mem(<2 x i32>* %vp) {
428 ; CHECK-LABEL: test_2xi32_to_8xi32_mem:
430 ; CHECK-NEXT: vbroadcastsd (%rdi), %ymm0
432 %vec = load <2 x i32>, <2 x i32>* %vp
433 %res = shufflevector <2 x i32> %vec, <2 x i32> undef, <8 x i32> <i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1>
436 define <8 x i32> @test_masked_2xi32_to_8xi32_mem_mask0(<2 x i32>* %vp, <8 x i32> %default, <8 x i32> %mask) {
437 ; CHECK-LABEL: test_masked_2xi32_to_8xi32_mem_mask0:
439 ; CHECK-NEXT: vptestnmd %ymm1, %ymm1, %k1
440 ; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} ymm0 {%k1} = mem[0,1,0,1,0,1,0,1]
442 %vec = load <2 x i32>, <2 x i32>* %vp
443 %shuf = shufflevector <2 x i32> %vec, <2 x i32> undef, <8 x i32> <i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1>
444 %cmp = icmp eq <8 x i32> %mask, zeroinitializer
445 %res = select <8 x i1> %cmp, <8 x i32> %shuf, <8 x i32> %default
449 define <8 x i32> @test_masked_z_2xi32_to_8xi32_mem_mask0(<2 x i32>* %vp, <8 x i32> %mask) {
450 ; CHECK-LABEL: test_masked_z_2xi32_to_8xi32_mem_mask0:
452 ; CHECK-NEXT: vptestnmd %ymm0, %ymm0, %k1
453 ; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} ymm0 {%k1} {z} = mem[0,1,0,1,0,1,0,1]
455 %vec = load <2 x i32>, <2 x i32>* %vp
456 %shuf = shufflevector <2 x i32> %vec, <2 x i32> undef, <8 x i32> <i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1>
457 %cmp = icmp eq <8 x i32> %mask, zeroinitializer
458 %res = select <8 x i1> %cmp, <8 x i32> %shuf, <8 x i32> zeroinitializer
461 define <8 x i32> @test_masked_2xi32_to_8xi32_mem_mask1(<2 x i32>* %vp, <8 x i32> %default, <8 x i32> %mask) {
462 ; CHECK-LABEL: test_masked_2xi32_to_8xi32_mem_mask1:
464 ; CHECK-NEXT: vptestnmd %ymm1, %ymm1, %k1
465 ; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} ymm0 {%k1} = mem[0,1,0,1,0,1,0,1]
467 %vec = load <2 x i32>, <2 x i32>* %vp
468 %shuf = shufflevector <2 x i32> %vec, <2 x i32> undef, <8 x i32> <i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1>
469 %cmp = icmp eq <8 x i32> %mask, zeroinitializer
470 %res = select <8 x i1> %cmp, <8 x i32> %shuf, <8 x i32> %default
474 define <8 x i32> @test_masked_z_2xi32_to_8xi32_mem_mask1(<2 x i32>* %vp, <8 x i32> %mask) {
475 ; CHECK-LABEL: test_masked_z_2xi32_to_8xi32_mem_mask1:
477 ; CHECK-NEXT: vptestnmd %ymm0, %ymm0, %k1
478 ; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} ymm0 {%k1} {z} = mem[0,1,0,1,0,1,0,1]
480 %vec = load <2 x i32>, <2 x i32>* %vp
481 %shuf = shufflevector <2 x i32> %vec, <2 x i32> undef, <8 x i32> <i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1>
482 %cmp = icmp eq <8 x i32> %mask, zeroinitializer
483 %res = select <8 x i1> %cmp, <8 x i32> %shuf, <8 x i32> zeroinitializer
486 define <8 x i32> @test_masked_2xi32_to_8xi32_mem_mask2(<2 x i32>* %vp, <8 x i32> %default, <8 x i32> %mask) {
487 ; CHECK-LABEL: test_masked_2xi32_to_8xi32_mem_mask2:
489 ; CHECK-NEXT: vptestnmd %ymm1, %ymm1, %k1
490 ; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} ymm0 {%k1} = mem[0,1,0,1,0,1,0,1]
492 %vec = load <2 x i32>, <2 x i32>* %vp
493 %shuf = shufflevector <2 x i32> %vec, <2 x i32> undef, <8 x i32> <i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1>
494 %cmp = icmp eq <8 x i32> %mask, zeroinitializer
495 %res = select <8 x i1> %cmp, <8 x i32> %shuf, <8 x i32> %default
499 define <8 x i32> @test_masked_z_2xi32_to_8xi32_mem_mask2(<2 x i32>* %vp, <8 x i32> %mask) {
500 ; CHECK-LABEL: test_masked_z_2xi32_to_8xi32_mem_mask2:
502 ; CHECK-NEXT: vptestnmd %ymm0, %ymm0, %k1
503 ; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} ymm0 {%k1} {z} = mem[0,1,0,1,0,1,0,1]
505 %vec = load <2 x i32>, <2 x i32>* %vp
506 %shuf = shufflevector <2 x i32> %vec, <2 x i32> undef, <8 x i32> <i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1>
507 %cmp = icmp eq <8 x i32> %mask, zeroinitializer
508 %res = select <8 x i1> %cmp, <8 x i32> %shuf, <8 x i32> zeroinitializer
511 define <8 x i32> @test_masked_2xi32_to_8xi32_mem_mask3(<2 x i32>* %vp, <8 x i32> %default, <8 x i32> %mask) {
512 ; CHECK-LABEL: test_masked_2xi32_to_8xi32_mem_mask3:
514 ; CHECK-NEXT: vptestnmd %ymm1, %ymm1, %k1
515 ; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} ymm0 {%k1} = mem[0,1,0,1,0,1,0,1]
517 %vec = load <2 x i32>, <2 x i32>* %vp
518 %shuf = shufflevector <2 x i32> %vec, <2 x i32> undef, <8 x i32> <i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1>
519 %cmp = icmp eq <8 x i32> %mask, zeroinitializer
520 %res = select <8 x i1> %cmp, <8 x i32> %shuf, <8 x i32> %default
524 define <8 x i32> @test_masked_z_2xi32_to_8xi32_mem_mask3(<2 x i32>* %vp, <8 x i32> %mask) {
525 ; CHECK-LABEL: test_masked_z_2xi32_to_8xi32_mem_mask3:
527 ; CHECK-NEXT: vptestnmd %ymm0, %ymm0, %k1
528 ; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} ymm0 {%k1} {z} = mem[0,1,0,1,0,1,0,1]
530 %vec = load <2 x i32>, <2 x i32>* %vp
531 %shuf = shufflevector <2 x i32> %vec, <2 x i32> undef, <8 x i32> <i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1>
532 %cmp = icmp eq <8 x i32> %mask, zeroinitializer
533 %res = select <8 x i1> %cmp, <8 x i32> %shuf, <8 x i32> zeroinitializer
536 define <16 x i32> @test_2xi32_to_16xi32_mem(<2 x i32>* %vp) {
537 ; CHECK-LABEL: test_2xi32_to_16xi32_mem:
539 ; CHECK-NEXT: vbroadcastsd (%rdi), %zmm0
541 %vec = load <2 x i32>, <2 x i32>* %vp
542 %res = shufflevector <2 x i32> %vec, <2 x i32> undef, <16 x i32> <i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1>
545 define <16 x i32> @test_masked_2xi32_to_16xi32_mem_mask0(<2 x i32>* %vp, <16 x i32> %default, <16 x i32> %mask) {
546 ; CHECK-LABEL: test_masked_2xi32_to_16xi32_mem_mask0:
548 ; CHECK-NEXT: vptestnmd %zmm1, %zmm1, %k1
549 ; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} zmm0 {%k1} = mem[0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1]
551 %vec = load <2 x i32>, <2 x i32>* %vp
552 %shuf = shufflevector <2 x i32> %vec, <2 x i32> undef, <16 x i32> <i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1>
553 %cmp = icmp eq <16 x i32> %mask, zeroinitializer
554 %res = select <16 x i1> %cmp, <16 x i32> %shuf, <16 x i32> %default
558 define <16 x i32> @test_masked_z_2xi32_to_16xi32_mem_mask0(<2 x i32>* %vp, <16 x i32> %mask) {
559 ; CHECK-LABEL: test_masked_z_2xi32_to_16xi32_mem_mask0:
561 ; CHECK-NEXT: vptestnmd %zmm0, %zmm0, %k1
562 ; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} zmm0 {%k1} {z} = mem[0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1]
564 %vec = load <2 x i32>, <2 x i32>* %vp
565 %shuf = shufflevector <2 x i32> %vec, <2 x i32> undef, <16 x i32> <i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1>
566 %cmp = icmp eq <16 x i32> %mask, zeroinitializer
567 %res = select <16 x i1> %cmp, <16 x i32> %shuf, <16 x i32> zeroinitializer
570 define <16 x i32> @test_masked_2xi32_to_16xi32_mem_mask1(<2 x i32>* %vp, <16 x i32> %default, <16 x i32> %mask) {
571 ; CHECK-LABEL: test_masked_2xi32_to_16xi32_mem_mask1:
573 ; CHECK-NEXT: vptestnmd %zmm1, %zmm1, %k1
574 ; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} zmm0 {%k1} = mem[0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1]
576 %vec = load <2 x i32>, <2 x i32>* %vp
577 %shuf = shufflevector <2 x i32> %vec, <2 x i32> undef, <16 x i32> <i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1>
578 %cmp = icmp eq <16 x i32> %mask, zeroinitializer
579 %res = select <16 x i1> %cmp, <16 x i32> %shuf, <16 x i32> %default
583 define <16 x i32> @test_masked_z_2xi32_to_16xi32_mem_mask1(<2 x i32>* %vp, <16 x i32> %mask) {
584 ; CHECK-LABEL: test_masked_z_2xi32_to_16xi32_mem_mask1:
586 ; CHECK-NEXT: vptestnmd %zmm0, %zmm0, %k1
587 ; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} zmm0 {%k1} {z} = mem[0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1]
589 %vec = load <2 x i32>, <2 x i32>* %vp
590 %shuf = shufflevector <2 x i32> %vec, <2 x i32> undef, <16 x i32> <i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1>
591 %cmp = icmp eq <16 x i32> %mask, zeroinitializer
592 %res = select <16 x i1> %cmp, <16 x i32> %shuf, <16 x i32> zeroinitializer
595 define <16 x i32> @test_masked_2xi32_to_16xi32_mem_mask2(<2 x i32>* %vp, <16 x i32> %default, <16 x i32> %mask) {
596 ; CHECK-LABEL: test_masked_2xi32_to_16xi32_mem_mask2:
598 ; CHECK-NEXT: vptestnmd %zmm1, %zmm1, %k1
599 ; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} zmm0 {%k1} = mem[0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1]
601 %vec = load <2 x i32>, <2 x i32>* %vp
602 %shuf = shufflevector <2 x i32> %vec, <2 x i32> undef, <16 x i32> <i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1>
603 %cmp = icmp eq <16 x i32> %mask, zeroinitializer
604 %res = select <16 x i1> %cmp, <16 x i32> %shuf, <16 x i32> %default
608 define <16 x i32> @test_masked_z_2xi32_to_16xi32_mem_mask2(<2 x i32>* %vp, <16 x i32> %mask) {
609 ; CHECK-LABEL: test_masked_z_2xi32_to_16xi32_mem_mask2:
611 ; CHECK-NEXT: vptestnmd %zmm0, %zmm0, %k1
612 ; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} zmm0 {%k1} {z} = mem[0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1]
614 %vec = load <2 x i32>, <2 x i32>* %vp
615 %shuf = shufflevector <2 x i32> %vec, <2 x i32> undef, <16 x i32> <i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1>
616 %cmp = icmp eq <16 x i32> %mask, zeroinitializer
617 %res = select <16 x i1> %cmp, <16 x i32> %shuf, <16 x i32> zeroinitializer
620 define <16 x i32> @test_masked_2xi32_to_16xi32_mem_mask3(<2 x i32>* %vp, <16 x i32> %default, <16 x i32> %mask) {
621 ; CHECK-LABEL: test_masked_2xi32_to_16xi32_mem_mask3:
623 ; CHECK-NEXT: vptestnmd %zmm1, %zmm1, %k1
624 ; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} zmm0 {%k1} = mem[0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1]
626 %vec = load <2 x i32>, <2 x i32>* %vp
627 %shuf = shufflevector <2 x i32> %vec, <2 x i32> undef, <16 x i32> <i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1>
628 %cmp = icmp eq <16 x i32> %mask, zeroinitializer
629 %res = select <16 x i1> %cmp, <16 x i32> %shuf, <16 x i32> %default
633 define <16 x i32> @test_masked_z_2xi32_to_16xi32_mem_mask3(<2 x i32>* %vp, <16 x i32> %mask) {
634 ; CHECK-LABEL: test_masked_z_2xi32_to_16xi32_mem_mask3:
636 ; CHECK-NEXT: vptestnmd %zmm0, %zmm0, %k1
637 ; CHECK-NEXT: vbroadcasti32x2 {{.*#+}} zmm0 {%k1} {z} = mem[0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1]
639 %vec = load <2 x i32>, <2 x i32>* %vp
640 %shuf = shufflevector <2 x i32> %vec, <2 x i32> undef, <16 x i32> <i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1>
641 %cmp = icmp eq <16 x i32> %mask, zeroinitializer
642 %res = select <16 x i1> %cmp, <16 x i32> %shuf, <16 x i32> zeroinitializer
645 define <8 x i32> @test_4xi32_to_8xi32_mem(<4 x i32>* %vp) {
646 ; CHECK-LABEL: test_4xi32_to_8xi32_mem:
648 ; CHECK-NEXT: vbroadcasti128 {{.*#+}} ymm0 = mem[0,1,0,1]
650 %vec = load <4 x i32>, <4 x i32>* %vp
651 %res = shufflevector <4 x i32> %vec, <4 x i32> undef, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
654 define <8 x i32> @test_masked_4xi32_to_8xi32_mem_mask0(<4 x i32>* %vp, <8 x i32> %default, <8 x i32> %mask) {
655 ; CHECK-LABEL: test_masked_4xi32_to_8xi32_mem_mask0:
657 ; CHECK-NEXT: vptestnmd %ymm1, %ymm1, %k1
658 ; CHECK-NEXT: vbroadcasti32x4 {{.*#+}} ymm0 {%k1} = mem[0,1,2,3,0,1,2,3]
660 %vec = load <4 x i32>, <4 x i32>* %vp
661 %shuf = shufflevector <4 x i32> %vec, <4 x i32> undef, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
662 %cmp = icmp eq <8 x i32> %mask, zeroinitializer
663 %res = select <8 x i1> %cmp, <8 x i32> %shuf, <8 x i32> %default
667 define <8 x i32> @test_masked_z_4xi32_to_8xi32_mem_mask0(<4 x i32>* %vp, <8 x i32> %mask) {
668 ; CHECK-LABEL: test_masked_z_4xi32_to_8xi32_mem_mask0:
670 ; CHECK-NEXT: vptestnmd %ymm0, %ymm0, %k1
671 ; CHECK-NEXT: vbroadcasti32x4 {{.*#+}} ymm0 {%k1} {z} = mem[0,1,2,3,0,1,2,3]
673 %vec = load <4 x i32>, <4 x i32>* %vp
674 %shuf = shufflevector <4 x i32> %vec, <4 x i32> undef, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
675 %cmp = icmp eq <8 x i32> %mask, zeroinitializer
676 %res = select <8 x i1> %cmp, <8 x i32> %shuf, <8 x i32> zeroinitializer
679 define <8 x i32> @test_masked_4xi32_to_8xi32_mem_mask1(<4 x i32>* %vp, <8 x i32> %default, <8 x i32> %mask) {
680 ; CHECK-LABEL: test_masked_4xi32_to_8xi32_mem_mask1:
682 ; CHECK-NEXT: vptestnmd %ymm1, %ymm1, %k1
683 ; CHECK-NEXT: vbroadcasti32x4 {{.*#+}} ymm0 {%k1} = mem[0,1,2,3,0,1,2,3]
685 %vec = load <4 x i32>, <4 x i32>* %vp
686 %shuf = shufflevector <4 x i32> %vec, <4 x i32> undef, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
687 %cmp = icmp eq <8 x i32> %mask, zeroinitializer
688 %res = select <8 x i1> %cmp, <8 x i32> %shuf, <8 x i32> %default
692 define <8 x i32> @test_masked_z_4xi32_to_8xi32_mem_mask1(<4 x i32>* %vp, <8 x i32> %mask) {
693 ; CHECK-LABEL: test_masked_z_4xi32_to_8xi32_mem_mask1:
695 ; CHECK-NEXT: vptestnmd %ymm0, %ymm0, %k1
696 ; CHECK-NEXT: vbroadcasti32x4 {{.*#+}} ymm0 {%k1} {z} = mem[0,1,2,3,0,1,2,3]
698 %vec = load <4 x i32>, <4 x i32>* %vp
699 %shuf = shufflevector <4 x i32> %vec, <4 x i32> undef, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
700 %cmp = icmp eq <8 x i32> %mask, zeroinitializer
701 %res = select <8 x i1> %cmp, <8 x i32> %shuf, <8 x i32> zeroinitializer
704 define <8 x i32> @test_masked_4xi32_to_8xi32_mem_mask2(<4 x i32>* %vp, <8 x i32> %default, <8 x i32> %mask) {
705 ; CHECK-LABEL: test_masked_4xi32_to_8xi32_mem_mask2:
707 ; CHECK-NEXT: vptestnmd %ymm1, %ymm1, %k1
708 ; CHECK-NEXT: vbroadcasti32x4 {{.*#+}} ymm0 {%k1} = mem[0,1,2,3,0,1,2,3]
710 %vec = load <4 x i32>, <4 x i32>* %vp
711 %shuf = shufflevector <4 x i32> %vec, <4 x i32> undef, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
712 %cmp = icmp eq <8 x i32> %mask, zeroinitializer
713 %res = select <8 x i1> %cmp, <8 x i32> %shuf, <8 x i32> %default
717 define <8 x i32> @test_masked_z_4xi32_to_8xi32_mem_mask2(<4 x i32>* %vp, <8 x i32> %mask) {
718 ; CHECK-LABEL: test_masked_z_4xi32_to_8xi32_mem_mask2:
720 ; CHECK-NEXT: vptestnmd %ymm0, %ymm0, %k1
721 ; CHECK-NEXT: vbroadcasti32x4 {{.*#+}} ymm0 {%k1} {z} = mem[0,1,2,3,0,1,2,3]
723 %vec = load <4 x i32>, <4 x i32>* %vp
724 %shuf = shufflevector <4 x i32> %vec, <4 x i32> undef, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
725 %cmp = icmp eq <8 x i32> %mask, zeroinitializer
726 %res = select <8 x i1> %cmp, <8 x i32> %shuf, <8 x i32> zeroinitializer
729 define <8 x i32> @test_masked_4xi32_to_8xi32_mem_mask3(<4 x i32>* %vp, <8 x i32> %default, <8 x i32> %mask) {
730 ; CHECK-LABEL: test_masked_4xi32_to_8xi32_mem_mask3:
732 ; CHECK-NEXT: vptestnmd %ymm1, %ymm1, %k1
733 ; CHECK-NEXT: vbroadcasti32x4 {{.*#+}} ymm0 {%k1} = mem[0,1,2,3,0,1,2,3]
735 %vec = load <4 x i32>, <4 x i32>* %vp
736 %shuf = shufflevector <4 x i32> %vec, <4 x i32> undef, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
737 %cmp = icmp eq <8 x i32> %mask, zeroinitializer
738 %res = select <8 x i1> %cmp, <8 x i32> %shuf, <8 x i32> %default
742 define <8 x i32> @test_masked_z_4xi32_to_8xi32_mem_mask3(<4 x i32>* %vp, <8 x i32> %mask) {
743 ; CHECK-LABEL: test_masked_z_4xi32_to_8xi32_mem_mask3:
745 ; CHECK-NEXT: vptestnmd %ymm0, %ymm0, %k1
746 ; CHECK-NEXT: vbroadcasti32x4 {{.*#+}} ymm0 {%k1} {z} = mem[0,1,2,3,0,1,2,3]
748 %vec = load <4 x i32>, <4 x i32>* %vp
749 %shuf = shufflevector <4 x i32> %vec, <4 x i32> undef, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
750 %cmp = icmp eq <8 x i32> %mask, zeroinitializer
751 %res = select <8 x i1> %cmp, <8 x i32> %shuf, <8 x i32> zeroinitializer
754 define <16 x i32> @test_4xi32_to_16xi32_mem(<4 x i32>* %vp) {
755 ; CHECK-LABEL: test_4xi32_to_16xi32_mem:
757 ; CHECK-NEXT: vbroadcasti32x4 {{.*#+}} zmm0 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
759 %vec = load <4 x i32>, <4 x i32>* %vp
760 %res = shufflevector <4 x i32> %vec, <4 x i32> undef, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
763 define <16 x i32> @test_masked_4xi32_to_16xi32_mem_mask0(<4 x i32>* %vp, <16 x i32> %default, <16 x i32> %mask) {
764 ; CHECK-LABEL: test_masked_4xi32_to_16xi32_mem_mask0:
766 ; CHECK-NEXT: vptestnmd %zmm1, %zmm1, %k1
767 ; CHECK-NEXT: vbroadcasti32x4 {{.*#+}} zmm0 {%k1} = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
769 %vec = load <4 x i32>, <4 x i32>* %vp
770 %shuf = shufflevector <4 x i32> %vec, <4 x i32> undef, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
771 %cmp = icmp eq <16 x i32> %mask, zeroinitializer
772 %res = select <16 x i1> %cmp, <16 x i32> %shuf, <16 x i32> %default
776 define <16 x i32> @test_masked_z_4xi32_to_16xi32_mem_mask0(<4 x i32>* %vp, <16 x i32> %mask) {
777 ; CHECK-LABEL: test_masked_z_4xi32_to_16xi32_mem_mask0:
779 ; CHECK-NEXT: vptestnmd %zmm0, %zmm0, %k1
780 ; CHECK-NEXT: vbroadcasti32x4 {{.*#+}} zmm0 {%k1} {z} = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
782 %vec = load <4 x i32>, <4 x i32>* %vp
783 %shuf = shufflevector <4 x i32> %vec, <4 x i32> undef, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
784 %cmp = icmp eq <16 x i32> %mask, zeroinitializer
785 %res = select <16 x i1> %cmp, <16 x i32> %shuf, <16 x i32> zeroinitializer
788 define <16 x i32> @test_masked_4xi32_to_16xi32_mem_mask1(<4 x i32>* %vp, <16 x i32> %default, <16 x i32> %mask) {
789 ; CHECK-LABEL: test_masked_4xi32_to_16xi32_mem_mask1:
791 ; CHECK-NEXT: vptestnmd %zmm1, %zmm1, %k1
792 ; CHECK-NEXT: vbroadcasti32x4 {{.*#+}} zmm0 {%k1} = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
794 %vec = load <4 x i32>, <4 x i32>* %vp
795 %shuf = shufflevector <4 x i32> %vec, <4 x i32> undef, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
796 %cmp = icmp eq <16 x i32> %mask, zeroinitializer
797 %res = select <16 x i1> %cmp, <16 x i32> %shuf, <16 x i32> %default
801 define <16 x i32> @test_masked_z_4xi32_to_16xi32_mem_mask1(<4 x i32>* %vp, <16 x i32> %mask) {
802 ; CHECK-LABEL: test_masked_z_4xi32_to_16xi32_mem_mask1:
804 ; CHECK-NEXT: vptestnmd %zmm0, %zmm0, %k1
805 ; CHECK-NEXT: vbroadcasti32x4 {{.*#+}} zmm0 {%k1} {z} = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
807 %vec = load <4 x i32>, <4 x i32>* %vp
808 %shuf = shufflevector <4 x i32> %vec, <4 x i32> undef, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
809 %cmp = icmp eq <16 x i32> %mask, zeroinitializer
810 %res = select <16 x i1> %cmp, <16 x i32> %shuf, <16 x i32> zeroinitializer
813 define <16 x i32> @test_masked_4xi32_to_16xi32_mem_mask2(<4 x i32>* %vp, <16 x i32> %default, <16 x i32> %mask) {
814 ; CHECK-LABEL: test_masked_4xi32_to_16xi32_mem_mask2:
816 ; CHECK-NEXT: vptestnmd %zmm1, %zmm1, %k1
817 ; CHECK-NEXT: vbroadcasti32x4 {{.*#+}} zmm0 {%k1} = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
819 %vec = load <4 x i32>, <4 x i32>* %vp
820 %shuf = shufflevector <4 x i32> %vec, <4 x i32> undef, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
821 %cmp = icmp eq <16 x i32> %mask, zeroinitializer
822 %res = select <16 x i1> %cmp, <16 x i32> %shuf, <16 x i32> %default
826 define <16 x i32> @test_masked_z_4xi32_to_16xi32_mem_mask2(<4 x i32>* %vp, <16 x i32> %mask) {
827 ; CHECK-LABEL: test_masked_z_4xi32_to_16xi32_mem_mask2:
829 ; CHECK-NEXT: vptestnmd %zmm0, %zmm0, %k1
830 ; CHECK-NEXT: vbroadcasti32x4 {{.*#+}} zmm0 {%k1} {z} = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
832 %vec = load <4 x i32>, <4 x i32>* %vp
833 %shuf = shufflevector <4 x i32> %vec, <4 x i32> undef, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
834 %cmp = icmp eq <16 x i32> %mask, zeroinitializer
835 %res = select <16 x i1> %cmp, <16 x i32> %shuf, <16 x i32> zeroinitializer
838 define <16 x i32> @test_masked_4xi32_to_16xi32_mem_mask3(<4 x i32>* %vp, <16 x i32> %default, <16 x i32> %mask) {
839 ; CHECK-LABEL: test_masked_4xi32_to_16xi32_mem_mask3:
841 ; CHECK-NEXT: vptestnmd %zmm1, %zmm1, %k1
842 ; CHECK-NEXT: vbroadcasti32x4 {{.*#+}} zmm0 {%k1} = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
844 %vec = load <4 x i32>, <4 x i32>* %vp
845 %shuf = shufflevector <4 x i32> %vec, <4 x i32> undef, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
846 %cmp = icmp eq <16 x i32> %mask, zeroinitializer
847 %res = select <16 x i1> %cmp, <16 x i32> %shuf, <16 x i32> %default
851 define <16 x i32> @test_masked_z_4xi32_to_16xi32_mem_mask3(<4 x i32>* %vp, <16 x i32> %mask) {
852 ; CHECK-LABEL: test_masked_z_4xi32_to_16xi32_mem_mask3:
854 ; CHECK-NEXT: vptestnmd %zmm0, %zmm0, %k1
855 ; CHECK-NEXT: vbroadcasti32x4 {{.*#+}} zmm0 {%k1} {z} = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
857 %vec = load <4 x i32>, <4 x i32>* %vp
858 %shuf = shufflevector <4 x i32> %vec, <4 x i32> undef, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
859 %cmp = icmp eq <16 x i32> %mask, zeroinitializer
860 %res = select <16 x i1> %cmp, <16 x i32> %shuf, <16 x i32> zeroinitializer
863 define <4 x i64> @test_2xi64_to_4xi64_mem(<2 x i64>* %vp) {
864 ; CHECK-LABEL: test_2xi64_to_4xi64_mem:
866 ; CHECK-NEXT: vbroadcasti128 {{.*#+}} ymm0 = mem[0,1,0,1]
868 %vec = load <2 x i64>, <2 x i64>* %vp
869 %res = shufflevector <2 x i64> %vec, <2 x i64> undef, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
872 define <4 x i64> @test_masked_2xi64_to_4xi64_mem_mask0(<2 x i64>* %vp, <4 x i64> %default, <4 x i64> %mask) {
873 ; CHECK-LABEL: test_masked_2xi64_to_4xi64_mem_mask0:
875 ; CHECK-NEXT: vptestnmq %ymm1, %ymm1, %k1
876 ; CHECK-NEXT: vbroadcasti64x2 {{.*#+}} ymm0 {%k1} = mem[0,1,0,1]
878 %vec = load <2 x i64>, <2 x i64>* %vp
879 %shuf = shufflevector <2 x i64> %vec, <2 x i64> undef, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
880 %cmp = icmp eq <4 x i64> %mask, zeroinitializer
881 %res = select <4 x i1> %cmp, <4 x i64> %shuf, <4 x i64> %default
885 define <4 x i64> @test_masked_z_2xi64_to_4xi64_mem_mask0(<2 x i64>* %vp, <4 x i64> %mask) {
886 ; CHECK-LABEL: test_masked_z_2xi64_to_4xi64_mem_mask0:
888 ; CHECK-NEXT: vptestnmq %ymm0, %ymm0, %k1
889 ; CHECK-NEXT: vbroadcasti64x2 {{.*#+}} ymm0 {%k1} {z} = mem[0,1,0,1]
891 %vec = load <2 x i64>, <2 x i64>* %vp
892 %shuf = shufflevector <2 x i64> %vec, <2 x i64> undef, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
893 %cmp = icmp eq <4 x i64> %mask, zeroinitializer
894 %res = select <4 x i1> %cmp, <4 x i64> %shuf, <4 x i64> zeroinitializer
897 define <4 x i64> @test_masked_2xi64_to_4xi64_mem_mask1(<2 x i64>* %vp, <4 x i64> %default, <4 x i64> %mask) {
898 ; CHECK-LABEL: test_masked_2xi64_to_4xi64_mem_mask1:
900 ; CHECK-NEXT: vptestnmq %ymm1, %ymm1, %k1
901 ; CHECK-NEXT: vbroadcasti64x2 {{.*#+}} ymm0 {%k1} = mem[0,1,0,1]
903 %vec = load <2 x i64>, <2 x i64>* %vp
904 %shuf = shufflevector <2 x i64> %vec, <2 x i64> undef, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
905 %cmp = icmp eq <4 x i64> %mask, zeroinitializer
906 %res = select <4 x i1> %cmp, <4 x i64> %shuf, <4 x i64> %default
910 define <4 x i64> @test_masked_z_2xi64_to_4xi64_mem_mask1(<2 x i64>* %vp, <4 x i64> %mask) {
911 ; CHECK-LABEL: test_masked_z_2xi64_to_4xi64_mem_mask1:
913 ; CHECK-NEXT: vptestnmq %ymm0, %ymm0, %k1
914 ; CHECK-NEXT: vbroadcasti64x2 {{.*#+}} ymm0 {%k1} {z} = mem[0,1,0,1]
916 %vec = load <2 x i64>, <2 x i64>* %vp
917 %shuf = shufflevector <2 x i64> %vec, <2 x i64> undef, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
918 %cmp = icmp eq <4 x i64> %mask, zeroinitializer
919 %res = select <4 x i1> %cmp, <4 x i64> %shuf, <4 x i64> zeroinitializer
922 define <4 x i64> @test_masked_2xi64_to_4xi64_mem_mask2(<2 x i64>* %vp, <4 x i64> %default, <4 x i64> %mask) {
923 ; CHECK-LABEL: test_masked_2xi64_to_4xi64_mem_mask2:
925 ; CHECK-NEXT: vptestnmq %ymm1, %ymm1, %k1
926 ; CHECK-NEXT: vbroadcasti64x2 {{.*#+}} ymm0 {%k1} = mem[0,1,0,1]
928 %vec = load <2 x i64>, <2 x i64>* %vp
929 %shuf = shufflevector <2 x i64> %vec, <2 x i64> undef, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
930 %cmp = icmp eq <4 x i64> %mask, zeroinitializer
931 %res = select <4 x i1> %cmp, <4 x i64> %shuf, <4 x i64> %default
935 define <4 x i64> @test_masked_z_2xi64_to_4xi64_mem_mask2(<2 x i64>* %vp, <4 x i64> %mask) {
936 ; CHECK-LABEL: test_masked_z_2xi64_to_4xi64_mem_mask2:
938 ; CHECK-NEXT: vptestnmq %ymm0, %ymm0, %k1
939 ; CHECK-NEXT: vbroadcasti64x2 {{.*#+}} ymm0 {%k1} {z} = mem[0,1,0,1]
941 %vec = load <2 x i64>, <2 x i64>* %vp
942 %shuf = shufflevector <2 x i64> %vec, <2 x i64> undef, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
943 %cmp = icmp eq <4 x i64> %mask, zeroinitializer
944 %res = select <4 x i1> %cmp, <4 x i64> %shuf, <4 x i64> zeroinitializer
947 define <4 x i64> @test_masked_2xi64_to_4xi64_mem_mask3(<2 x i64>* %vp, <4 x i64> %default, <4 x i64> %mask) {
948 ; CHECK-LABEL: test_masked_2xi64_to_4xi64_mem_mask3:
950 ; CHECK-NEXT: vptestnmq %ymm1, %ymm1, %k1
951 ; CHECK-NEXT: vbroadcasti64x2 {{.*#+}} ymm0 {%k1} = mem[0,1,0,1]
953 %vec = load <2 x i64>, <2 x i64>* %vp
954 %shuf = shufflevector <2 x i64> %vec, <2 x i64> undef, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
955 %cmp = icmp eq <4 x i64> %mask, zeroinitializer
956 %res = select <4 x i1> %cmp, <4 x i64> %shuf, <4 x i64> %default
960 define <4 x i64> @test_masked_z_2xi64_to_4xi64_mem_mask3(<2 x i64>* %vp, <4 x i64> %mask) {
961 ; CHECK-LABEL: test_masked_z_2xi64_to_4xi64_mem_mask3:
963 ; CHECK-NEXT: vptestnmq %ymm0, %ymm0, %k1
964 ; CHECK-NEXT: vbroadcasti64x2 {{.*#+}} ymm0 {%k1} {z} = mem[0,1,0,1]
966 %vec = load <2 x i64>, <2 x i64>* %vp
967 %shuf = shufflevector <2 x i64> %vec, <2 x i64> undef, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
968 %cmp = icmp eq <4 x i64> %mask, zeroinitializer
969 %res = select <4 x i1> %cmp, <4 x i64> %shuf, <4 x i64> zeroinitializer
972 define <8 x i64> @test_2xi64_to_8xi64_mem(<2 x i64>* %vp) {
973 ; CHECK-LABEL: test_2xi64_to_8xi64_mem:
975 ; CHECK-NEXT: vbroadcasti32x4 {{.*#+}} zmm0 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
977 %vec = load <2 x i64>, <2 x i64>* %vp
978 %res = shufflevector <2 x i64> %vec, <2 x i64> undef, <8 x i32> <i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1>
981 define <8 x i64> @test_masked_2xi64_to_8xi64_mem_mask0(<2 x i64>* %vp, <8 x i64> %default, <8 x i64> %mask) {
982 ; CHECK-LABEL: test_masked_2xi64_to_8xi64_mem_mask0:
984 ; CHECK-NEXT: vptestnmq %zmm1, %zmm1, %k1
985 ; CHECK-NEXT: vbroadcasti64x2 {{.*#+}} zmm0 {%k1} = mem[0,1,0,1,0,1,0,1]
987 %vec = load <2 x i64>, <2 x i64>* %vp
988 %shuf = shufflevector <2 x i64> %vec, <2 x i64> undef, <8 x i32> <i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1>
989 %cmp = icmp eq <8 x i64> %mask, zeroinitializer
990 %res = select <8 x i1> %cmp, <8 x i64> %shuf, <8 x i64> %default
994 define <8 x i64> @test_masked_z_2xi64_to_8xi64_mem_mask0(<2 x i64>* %vp, <8 x i64> %mask) {
995 ; CHECK-LABEL: test_masked_z_2xi64_to_8xi64_mem_mask0:
997 ; CHECK-NEXT: vptestnmq %zmm0, %zmm0, %k1
998 ; CHECK-NEXT: vbroadcasti64x2 {{.*#+}} zmm0 {%k1} {z} = mem[0,1,0,1,0,1,0,1]
1000 %vec = load <2 x i64>, <2 x i64>* %vp
1001 %shuf = shufflevector <2 x i64> %vec, <2 x i64> undef, <8 x i32> <i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1>
1002 %cmp = icmp eq <8 x i64> %mask, zeroinitializer
1003 %res = select <8 x i1> %cmp, <8 x i64> %shuf, <8 x i64> zeroinitializer
1006 define <8 x i64> @test_masked_2xi64_to_8xi64_mem_mask1(<2 x i64>* %vp, <8 x i64> %default, <8 x i64> %mask) {
1007 ; CHECK-LABEL: test_masked_2xi64_to_8xi64_mem_mask1:
1009 ; CHECK-NEXT: vptestnmq %zmm1, %zmm1, %k1
1010 ; CHECK-NEXT: vbroadcasti64x2 {{.*#+}} zmm0 {%k1} = mem[0,1,0,1,0,1,0,1]
1012 %vec = load <2 x i64>, <2 x i64>* %vp
1013 %shuf = shufflevector <2 x i64> %vec, <2 x i64> undef, <8 x i32> <i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1>
1014 %cmp = icmp eq <8 x i64> %mask, zeroinitializer
1015 %res = select <8 x i1> %cmp, <8 x i64> %shuf, <8 x i64> %default
1019 define <8 x i64> @test_masked_z_2xi64_to_8xi64_mem_mask1(<2 x i64>* %vp, <8 x i64> %mask) {
1020 ; CHECK-LABEL: test_masked_z_2xi64_to_8xi64_mem_mask1:
1022 ; CHECK-NEXT: vptestnmq %zmm0, %zmm0, %k1
1023 ; CHECK-NEXT: vbroadcasti64x2 {{.*#+}} zmm0 {%k1} {z} = mem[0,1,0,1,0,1,0,1]
1025 %vec = load <2 x i64>, <2 x i64>* %vp
1026 %shuf = shufflevector <2 x i64> %vec, <2 x i64> undef, <8 x i32> <i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1>
1027 %cmp = icmp eq <8 x i64> %mask, zeroinitializer
1028 %res = select <8 x i1> %cmp, <8 x i64> %shuf, <8 x i64> zeroinitializer
1031 define <8 x i64> @test_masked_2xi64_to_8xi64_mem_mask2(<2 x i64>* %vp, <8 x i64> %default, <8 x i64> %mask) {
1032 ; CHECK-LABEL: test_masked_2xi64_to_8xi64_mem_mask2:
1034 ; CHECK-NEXT: vptestnmq %zmm1, %zmm1, %k1
1035 ; CHECK-NEXT: vbroadcasti64x2 {{.*#+}} zmm0 {%k1} = mem[0,1,0,1,0,1,0,1]
1037 %vec = load <2 x i64>, <2 x i64>* %vp
1038 %shuf = shufflevector <2 x i64> %vec, <2 x i64> undef, <8 x i32> <i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1>
1039 %cmp = icmp eq <8 x i64> %mask, zeroinitializer
1040 %res = select <8 x i1> %cmp, <8 x i64> %shuf, <8 x i64> %default
1044 define <8 x i64> @test_masked_z_2xi64_to_8xi64_mem_mask2(<2 x i64>* %vp, <8 x i64> %mask) {
1045 ; CHECK-LABEL: test_masked_z_2xi64_to_8xi64_mem_mask2:
1047 ; CHECK-NEXT: vptestnmq %zmm0, %zmm0, %k1
1048 ; CHECK-NEXT: vbroadcasti64x2 {{.*#+}} zmm0 {%k1} {z} = mem[0,1,0,1,0,1,0,1]
1050 %vec = load <2 x i64>, <2 x i64>* %vp
1051 %shuf = shufflevector <2 x i64> %vec, <2 x i64> undef, <8 x i32> <i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1>
1052 %cmp = icmp eq <8 x i64> %mask, zeroinitializer
1053 %res = select <8 x i1> %cmp, <8 x i64> %shuf, <8 x i64> zeroinitializer
1056 define <8 x i64> @test_masked_2xi64_to_8xi64_mem_mask3(<2 x i64>* %vp, <8 x i64> %default, <8 x i64> %mask) {
1057 ; CHECK-LABEL: test_masked_2xi64_to_8xi64_mem_mask3:
1059 ; CHECK-NEXT: vptestnmq %zmm1, %zmm1, %k1
1060 ; CHECK-NEXT: vbroadcasti64x2 {{.*#+}} zmm0 {%k1} = mem[0,1,0,1,0,1,0,1]
1062 %vec = load <2 x i64>, <2 x i64>* %vp
1063 %shuf = shufflevector <2 x i64> %vec, <2 x i64> undef, <8 x i32> <i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1>
1064 %cmp = icmp eq <8 x i64> %mask, zeroinitializer
1065 %res = select <8 x i1> %cmp, <8 x i64> %shuf, <8 x i64> %default
1069 define <8 x i64> @test_masked_z_2xi64_to_8xi64_mem_mask3(<2 x i64>* %vp, <8 x i64> %mask) {
1070 ; CHECK-LABEL: test_masked_z_2xi64_to_8xi64_mem_mask3:
1072 ; CHECK-NEXT: vptestnmq %zmm0, %zmm0, %k1
1073 ; CHECK-NEXT: vbroadcasti64x2 {{.*#+}} zmm0 {%k1} {z} = mem[0,1,0,1,0,1,0,1]
1075 %vec = load <2 x i64>, <2 x i64>* %vp
1076 %shuf = shufflevector <2 x i64> %vec, <2 x i64> undef, <8 x i32> <i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1>
1077 %cmp = icmp eq <8 x i64> %mask, zeroinitializer
1078 %res = select <8 x i1> %cmp, <8 x i64> %shuf, <8 x i64> zeroinitializer
1081 define <16 x i32> @test_8xi32_to_16xi32_mem(<8 x i32>* %vp) {
1082 ; CHECK-LABEL: test_8xi32_to_16xi32_mem:
1084 ; CHECK-NEXT: vbroadcasti64x4 {{.*#+}} zmm0 = mem[0,1,2,3,0,1,2,3]
1086 %vec = load <8 x i32>, <8 x i32>* %vp
1087 %res = shufflevector <8 x i32> %vec, <8 x i32> undef, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
1090 define <16 x i32> @test_masked_8xi32_to_16xi32_mem_mask0(<8 x i32>* %vp, <16 x i32> %default, <16 x i32> %mask) {
1091 ; CHECK-LABEL: test_masked_8xi32_to_16xi32_mem_mask0:
1093 ; CHECK-NEXT: vptestnmd %zmm1, %zmm1, %k1
1094 ; CHECK-NEXT: vbroadcasti32x8 {{.*#+}} zmm0 {%k1} = mem[0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7]
1096 %vec = load <8 x i32>, <8 x i32>* %vp
1097 %shuf = shufflevector <8 x i32> %vec, <8 x i32> undef, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
1098 %cmp = icmp eq <16 x i32> %mask, zeroinitializer
1099 %res = select <16 x i1> %cmp, <16 x i32> %shuf, <16 x i32> %default
1103 define <16 x i32> @test_masked_z_8xi32_to_16xi32_mem_mask0(<8 x i32>* %vp, <16 x i32> %mask) {
1104 ; CHECK-LABEL: test_masked_z_8xi32_to_16xi32_mem_mask0:
1106 ; CHECK-NEXT: vptestnmd %zmm0, %zmm0, %k1
1107 ; CHECK-NEXT: vbroadcasti32x8 {{.*#+}} zmm0 {%k1} {z} = mem[0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7]
1109 %vec = load <8 x i32>, <8 x i32>* %vp
1110 %shuf = shufflevector <8 x i32> %vec, <8 x i32> undef, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
1111 %cmp = icmp eq <16 x i32> %mask, zeroinitializer
1112 %res = select <16 x i1> %cmp, <16 x i32> %shuf, <16 x i32> zeroinitializer
1115 define <16 x i32> @test_masked_8xi32_to_16xi32_mem_mask1(<8 x i32>* %vp, <16 x i32> %default, <16 x i32> %mask) {
1116 ; CHECK-LABEL: test_masked_8xi32_to_16xi32_mem_mask1:
1118 ; CHECK-NEXT: vptestnmd %zmm1, %zmm1, %k1
1119 ; CHECK-NEXT: vbroadcasti32x8 {{.*#+}} zmm0 {%k1} = mem[0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7]
1121 %vec = load <8 x i32>, <8 x i32>* %vp
1122 %shuf = shufflevector <8 x i32> %vec, <8 x i32> undef, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
1123 %cmp = icmp eq <16 x i32> %mask, zeroinitializer
1124 %res = select <16 x i1> %cmp, <16 x i32> %shuf, <16 x i32> %default
1128 define <16 x i32> @test_masked_z_8xi32_to_16xi32_mem_mask1(<8 x i32>* %vp, <16 x i32> %mask) {
1129 ; CHECK-LABEL: test_masked_z_8xi32_to_16xi32_mem_mask1:
1131 ; CHECK-NEXT: vptestnmd %zmm0, %zmm0, %k1
1132 ; CHECK-NEXT: vbroadcasti32x8 {{.*#+}} zmm0 {%k1} {z} = mem[0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7]
1134 %vec = load <8 x i32>, <8 x i32>* %vp
1135 %shuf = shufflevector <8 x i32> %vec, <8 x i32> undef, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
1136 %cmp = icmp eq <16 x i32> %mask, zeroinitializer
1137 %res = select <16 x i1> %cmp, <16 x i32> %shuf, <16 x i32> zeroinitializer
1140 define <16 x i32> @test_masked_8xi32_to_16xi32_mem_mask2(<8 x i32>* %vp, <16 x i32> %default, <16 x i32> %mask) {
1141 ; CHECK-LABEL: test_masked_8xi32_to_16xi32_mem_mask2:
1143 ; CHECK-NEXT: vptestnmd %zmm1, %zmm1, %k1
1144 ; CHECK-NEXT: vbroadcasti32x8 {{.*#+}} zmm0 {%k1} = mem[0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7]
1146 %vec = load <8 x i32>, <8 x i32>* %vp
1147 %shuf = shufflevector <8 x i32> %vec, <8 x i32> undef, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
1148 %cmp = icmp eq <16 x i32> %mask, zeroinitializer
1149 %res = select <16 x i1> %cmp, <16 x i32> %shuf, <16 x i32> %default
1153 define <16 x i32> @test_masked_z_8xi32_to_16xi32_mem_mask2(<8 x i32>* %vp, <16 x i32> %mask) {
1154 ; CHECK-LABEL: test_masked_z_8xi32_to_16xi32_mem_mask2:
1156 ; CHECK-NEXT: vptestnmd %zmm0, %zmm0, %k1
1157 ; CHECK-NEXT: vbroadcasti32x8 {{.*#+}} zmm0 {%k1} {z} = mem[0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7]
1159 %vec = load <8 x i32>, <8 x i32>* %vp
1160 %shuf = shufflevector <8 x i32> %vec, <8 x i32> undef, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
1161 %cmp = icmp eq <16 x i32> %mask, zeroinitializer
1162 %res = select <16 x i1> %cmp, <16 x i32> %shuf, <16 x i32> zeroinitializer
1165 define <16 x i32> @test_masked_8xi32_to_16xi32_mem_mask3(<8 x i32>* %vp, <16 x i32> %default, <16 x i32> %mask) {
1166 ; CHECK-LABEL: test_masked_8xi32_to_16xi32_mem_mask3:
1168 ; CHECK-NEXT: vptestnmd %zmm1, %zmm1, %k1
1169 ; CHECK-NEXT: vbroadcasti32x8 {{.*#+}} zmm0 {%k1} = mem[0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7]
1171 %vec = load <8 x i32>, <8 x i32>* %vp
1172 %shuf = shufflevector <8 x i32> %vec, <8 x i32> undef, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
1173 %cmp = icmp eq <16 x i32> %mask, zeroinitializer
1174 %res = select <16 x i1> %cmp, <16 x i32> %shuf, <16 x i32> %default
1178 define <16 x i32> @test_masked_z_8xi32_to_16xi32_mem_mask3(<8 x i32>* %vp, <16 x i32> %mask) {
1179 ; CHECK-LABEL: test_masked_z_8xi32_to_16xi32_mem_mask3:
1181 ; CHECK-NEXT: vptestnmd %zmm0, %zmm0, %k1
1182 ; CHECK-NEXT: vbroadcasti32x8 {{.*#+}} zmm0 {%k1} {z} = mem[0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7]
1184 %vec = load <8 x i32>, <8 x i32>* %vp
1185 %shuf = shufflevector <8 x i32> %vec, <8 x i32> undef, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
1186 %cmp = icmp eq <16 x i32> %mask, zeroinitializer
1187 %res = select <16 x i1> %cmp, <16 x i32> %shuf, <16 x i32> zeroinitializer
1190 define <8 x i64> @test_4xi64_to_8xi64_mem(<4 x i64>* %vp) {
1191 ; CHECK-LABEL: test_4xi64_to_8xi64_mem:
1193 ; CHECK-NEXT: vbroadcasti64x4 {{.*#+}} zmm0 = mem[0,1,2,3,0,1,2,3]
1195 %vec = load <4 x i64>, <4 x i64>* %vp
1196 %res = shufflevector <4 x i64> %vec, <4 x i64> undef, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
1199 define <8 x i64> @test_masked_4xi64_to_8xi64_mem_mask0(<4 x i64>* %vp, <8 x i64> %default, <8 x i64> %mask) {
1200 ; CHECK-LABEL: test_masked_4xi64_to_8xi64_mem_mask0:
1202 ; CHECK-NEXT: vptestnmq %zmm1, %zmm1, %k1
1203 ; CHECK-NEXT: vbroadcasti64x4 {{.*#+}} zmm0 {%k1} = mem[0,1,2,3,0,1,2,3]
1205 %vec = load <4 x i64>, <4 x i64>* %vp
1206 %shuf = shufflevector <4 x i64> %vec, <4 x i64> undef, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
1207 %cmp = icmp eq <8 x i64> %mask, zeroinitializer
1208 %res = select <8 x i1> %cmp, <8 x i64> %shuf, <8 x i64> %default
1212 define <8 x i64> @test_masked_z_4xi64_to_8xi64_mem_mask0(<4 x i64>* %vp, <8 x i64> %mask) {
1213 ; CHECK-LABEL: test_masked_z_4xi64_to_8xi64_mem_mask0:
1215 ; CHECK-NEXT: vptestnmq %zmm0, %zmm0, %k1
1216 ; CHECK-NEXT: vbroadcasti64x4 {{.*#+}} zmm0 {%k1} {z} = mem[0,1,2,3,0,1,2,3]
1218 %vec = load <4 x i64>, <4 x i64>* %vp
1219 %shuf = shufflevector <4 x i64> %vec, <4 x i64> undef, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
1220 %cmp = icmp eq <8 x i64> %mask, zeroinitializer
1221 %res = select <8 x i1> %cmp, <8 x i64> %shuf, <8 x i64> zeroinitializer
1224 define <8 x i64> @test_masked_4xi64_to_8xi64_mem_mask1(<4 x i64>* %vp, <8 x i64> %default, <8 x i64> %mask) {
1225 ; CHECK-LABEL: test_masked_4xi64_to_8xi64_mem_mask1:
1227 ; CHECK-NEXT: vptestnmq %zmm1, %zmm1, %k1
1228 ; CHECK-NEXT: vbroadcasti64x4 {{.*#+}} zmm0 {%k1} = mem[0,1,2,3,0,1,2,3]
1230 %vec = load <4 x i64>, <4 x i64>* %vp
1231 %shuf = shufflevector <4 x i64> %vec, <4 x i64> undef, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
1232 %cmp = icmp eq <8 x i64> %mask, zeroinitializer
1233 %res = select <8 x i1> %cmp, <8 x i64> %shuf, <8 x i64> %default
1237 define <8 x i64> @test_masked_z_4xi64_to_8xi64_mem_mask1(<4 x i64>* %vp, <8 x i64> %mask) {
1238 ; CHECK-LABEL: test_masked_z_4xi64_to_8xi64_mem_mask1:
1240 ; CHECK-NEXT: vptestnmq %zmm0, %zmm0, %k1
1241 ; CHECK-NEXT: vbroadcasti64x4 {{.*#+}} zmm0 {%k1} {z} = mem[0,1,2,3,0,1,2,3]
1243 %vec = load <4 x i64>, <4 x i64>* %vp
1244 %shuf = shufflevector <4 x i64> %vec, <4 x i64> undef, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
1245 %cmp = icmp eq <8 x i64> %mask, zeroinitializer
1246 %res = select <8 x i1> %cmp, <8 x i64> %shuf, <8 x i64> zeroinitializer
1249 define <8 x i64> @test_masked_4xi64_to_8xi64_mem_mask2(<4 x i64>* %vp, <8 x i64> %default, <8 x i64> %mask) {
1250 ; CHECK-LABEL: test_masked_4xi64_to_8xi64_mem_mask2:
1252 ; CHECK-NEXT: vptestnmq %zmm1, %zmm1, %k1
1253 ; CHECK-NEXT: vbroadcasti64x4 {{.*#+}} zmm0 {%k1} = mem[0,1,2,3,0,1,2,3]
1255 %vec = load <4 x i64>, <4 x i64>* %vp
1256 %shuf = shufflevector <4 x i64> %vec, <4 x i64> undef, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
1257 %cmp = icmp eq <8 x i64> %mask, zeroinitializer
1258 %res = select <8 x i1> %cmp, <8 x i64> %shuf, <8 x i64> %default
1262 define <8 x i64> @test_masked_z_4xi64_to_8xi64_mem_mask2(<4 x i64>* %vp, <8 x i64> %mask) {
1263 ; CHECK-LABEL: test_masked_z_4xi64_to_8xi64_mem_mask2:
1265 ; CHECK-NEXT: vptestnmq %zmm0, %zmm0, %k1
1266 ; CHECK-NEXT: vbroadcasti64x4 {{.*#+}} zmm0 {%k1} {z} = mem[0,1,2,3,0,1,2,3]
1268 %vec = load <4 x i64>, <4 x i64>* %vp
1269 %shuf = shufflevector <4 x i64> %vec, <4 x i64> undef, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
1270 %cmp = icmp eq <8 x i64> %mask, zeroinitializer
1271 %res = select <8 x i1> %cmp, <8 x i64> %shuf, <8 x i64> zeroinitializer
1274 define <8 x i64> @test_masked_4xi64_to_8xi64_mem_mask3(<4 x i64>* %vp, <8 x i64> %default, <8 x i64> %mask) {
1275 ; CHECK-LABEL: test_masked_4xi64_to_8xi64_mem_mask3:
1277 ; CHECK-NEXT: vptestnmq %zmm1, %zmm1, %k1
1278 ; CHECK-NEXT: vbroadcasti64x4 {{.*#+}} zmm0 {%k1} = mem[0,1,2,3,0,1,2,3]
1280 %vec = load <4 x i64>, <4 x i64>* %vp
1281 %shuf = shufflevector <4 x i64> %vec, <4 x i64> undef, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
1282 %cmp = icmp eq <8 x i64> %mask, zeroinitializer
1283 %res = select <8 x i1> %cmp, <8 x i64> %shuf, <8 x i64> %default
1287 define <8 x i64> @test_masked_z_4xi64_to_8xi64_mem_mask3(<4 x i64>* %vp, <8 x i64> %mask) {
1288 ; CHECK-LABEL: test_masked_z_4xi64_to_8xi64_mem_mask3:
1290 ; CHECK-NEXT: vptestnmq %zmm0, %zmm0, %k1
1291 ; CHECK-NEXT: vbroadcasti64x4 {{.*#+}} zmm0 {%k1} {z} = mem[0,1,2,3,0,1,2,3]
1293 %vec = load <4 x i64>, <4 x i64>* %vp
1294 %shuf = shufflevector <4 x i64> %vec, <4 x i64> undef, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
1295 %cmp = icmp eq <8 x i64> %mask, zeroinitializer
1296 %res = select <8 x i1> %cmp, <8 x i64> %shuf, <8 x i64> zeroinitializer