1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -O3 -mtriple=x86_64-linux-generic -mattr=avx < %s | FileCheck %s
5 ; The SplitVecRes_MLOAD method should split a extended value type
6 ; according to the halving of the enveloping type to avoid all sorts
7 ; of inconsistencies downstream. For example for a extended value type
8 ; with VL=14 and enveloping type VL=16 that is split 8/8, the extended
9 ; type should be split 8/6 and not 7/7. This also accounts for hi masked
10 ; load that get zero storage size (and are unused).
12 define <9 x float> @mload_split9(<9 x i1> %mask, ptr %addr, <9 x float> %dst) {
13 ; CHECK-LABEL: mload_split9:
15 ; CHECK-NEXT: movq %rdi, %rax
16 ; CHECK-NEXT: vinsertps {{.*#+}} xmm4 = xmm4[0],xmm5[0],xmm4[2,3]
17 ; CHECK-NEXT: vinsertps {{.*#+}} xmm4 = xmm4[0,1],xmm6[0],xmm4[3]
18 ; CHECK-NEXT: vinsertps {{.*#+}} xmm4 = xmm4[0,1,2],xmm7[0]
19 ; CHECK-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[2,3]
20 ; CHECK-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1],xmm2[0],xmm0[3]
21 ; CHECK-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1,2],xmm3[0]
22 ; CHECK-NEXT: vinsertf128 $1, %xmm4, %ymm0, %ymm0
23 ; CHECK-NEXT: vmovss {{.*#+}} xmm1 = mem[0],zero,zero,zero
24 ; CHECK-NEXT: movq {{[0-9]+}}(%rsp), %rdi
25 ; CHECK-NEXT: vmovd %esi, %xmm2
26 ; CHECK-NEXT: vpinsrw $1, %edx, %xmm2, %xmm2
27 ; CHECK-NEXT: vpinsrw $2, %ecx, %xmm2, %xmm2
28 ; CHECK-NEXT: vpinsrw $3, %r8d, %xmm2, %xmm2
29 ; CHECK-NEXT: vpmovzxwd {{.*#+}} xmm3 = xmm2[0],zero,xmm2[1],zero,xmm2[2],zero,xmm2[3],zero
30 ; CHECK-NEXT: vpslld $31, %xmm3, %xmm3
31 ; CHECK-NEXT: vpinsrw $4, %r9d, %xmm2, %xmm2
32 ; CHECK-NEXT: movl {{[0-9]+}}(%rsp), %ecx
33 ; CHECK-NEXT: vpinsrw $5, %ecx, %xmm2, %xmm2
34 ; CHECK-NEXT: movl {{[0-9]+}}(%rsp), %ecx
35 ; CHECK-NEXT: vpinsrw $6, %ecx, %xmm2, %xmm2
36 ; CHECK-NEXT: movl {{[0-9]+}}(%rsp), %ecx
37 ; CHECK-NEXT: vpinsrw $7, %ecx, %xmm2, %xmm2
38 ; CHECK-NEXT: vpunpckhwd {{.*#+}} xmm2 = xmm2[4,4,5,5,6,6,7,7]
39 ; CHECK-NEXT: vpslld $31, %xmm2, %xmm2
40 ; CHECK-NEXT: vinsertf128 $1, %xmm2, %ymm3, %ymm2
41 ; CHECK-NEXT: vmaskmovps (%rdi), %ymm2, %ymm3
42 ; CHECK-NEXT: vblendvps %ymm2, %ymm3, %ymm0, %ymm0
43 ; CHECK-NEXT: movzbl {{[0-9]+}}(%rsp), %ecx
44 ; CHECK-NEXT: vmovd %ecx, %xmm2
45 ; CHECK-NEXT: vpslld $31, %xmm2, %xmm2
46 ; CHECK-NEXT: vmaskmovps 32(%rdi), %ymm2, %ymm3
47 ; CHECK-NEXT: vblendvps %xmm2, %xmm3, %xmm1, %xmm1
48 ; CHECK-NEXT: vmovss %xmm1, 32(%rax)
49 ; CHECK-NEXT: vmovaps %ymm0, (%rax)
50 ; CHECK-NEXT: vzeroupper
52 %res = call <9 x float> @llvm.masked.load.v9f32.p0(ptr %addr, i32 4, <9 x i1>%mask, <9 x float> %dst)
56 define <13 x float> @mload_split13(<13 x i1> %mask, ptr %addr, <13 x float> %dst) {
57 ; CHECK-LABEL: mload_split13:
59 ; CHECK-NEXT: movq %rdi, %rax
60 ; CHECK-NEXT: vinsertps {{.*#+}} xmm4 = xmm4[0],xmm5[0],xmm4[2,3]
61 ; CHECK-NEXT: vinsertps {{.*#+}} xmm4 = xmm4[0,1],xmm6[0],xmm4[3]
62 ; CHECK-NEXT: vinsertps {{.*#+}} xmm4 = xmm4[0,1,2],xmm7[0]
63 ; CHECK-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[2,3]
64 ; CHECK-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1],xmm2[0],xmm0[3]
65 ; CHECK-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1,2],xmm3[0]
66 ; CHECK-NEXT: vinsertf128 $1, %xmm4, %ymm0, %ymm2
67 ; CHECK-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
68 ; CHECK-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],mem[0],xmm0[2,3]
69 ; CHECK-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1],mem[0],xmm0[3]
70 ; CHECK-NEXT: vinsertps {{.*#+}} xmm1 = xmm0[0,1,2],mem[0]
71 ; CHECK-NEXT: vmovd {{.*#+}} xmm0 = mem[0],zero,zero,zero
72 ; CHECK-NEXT: movq {{[0-9]+}}(%rsp), %rdi
73 ; CHECK-NEXT: vmovd %esi, %xmm3
74 ; CHECK-NEXT: vpinsrw $1, %edx, %xmm3, %xmm3
75 ; CHECK-NEXT: vpinsrw $2, %ecx, %xmm3, %xmm3
76 ; CHECK-NEXT: vpinsrw $3, %r8d, %xmm3, %xmm3
77 ; CHECK-NEXT: vpmovzxwd {{.*#+}} xmm4 = xmm3[0],zero,xmm3[1],zero,xmm3[2],zero,xmm3[3],zero
78 ; CHECK-NEXT: vpslld $31, %xmm4, %xmm4
79 ; CHECK-NEXT: vpinsrw $4, %r9d, %xmm3, %xmm3
80 ; CHECK-NEXT: movl {{[0-9]+}}(%rsp), %ecx
81 ; CHECK-NEXT: vpinsrw $5, %ecx, %xmm3, %xmm3
82 ; CHECK-NEXT: movl {{[0-9]+}}(%rsp), %ecx
83 ; CHECK-NEXT: vpinsrw $6, %ecx, %xmm3, %xmm3
84 ; CHECK-NEXT: movl {{[0-9]+}}(%rsp), %ecx
85 ; CHECK-NEXT: vpinsrw $7, %ecx, %xmm3, %xmm3
86 ; CHECK-NEXT: vpunpckhwd {{.*#+}} xmm3 = xmm3[4,4,5,5,6,6,7,7]
87 ; CHECK-NEXT: vpslld $31, %xmm3, %xmm3
88 ; CHECK-NEXT: vinsertf128 $1, %xmm3, %ymm4, %ymm3
89 ; CHECK-NEXT: vmaskmovps (%rdi), %ymm3, %ymm4
90 ; CHECK-NEXT: vblendvps %ymm3, %ymm4, %ymm2, %ymm2
91 ; CHECK-NEXT: movzbl {{[0-9]+}}(%rsp), %ecx
92 ; CHECK-NEXT: vmovd %ecx, %xmm3
93 ; CHECK-NEXT: movl {{[0-9]+}}(%rsp), %ecx
94 ; CHECK-NEXT: vpinsrw $1, %ecx, %xmm3, %xmm3
95 ; CHECK-NEXT: movl {{[0-9]+}}(%rsp), %ecx
96 ; CHECK-NEXT: vpinsrw $2, %ecx, %xmm3, %xmm3
97 ; CHECK-NEXT: movl {{[0-9]+}}(%rsp), %ecx
98 ; CHECK-NEXT: vpinsrw $3, %ecx, %xmm3, %xmm3
99 ; CHECK-NEXT: vpmovzxwd {{.*#+}} xmm4 = xmm3[0],zero,xmm3[1],zero,xmm3[2],zero,xmm3[3],zero
100 ; CHECK-NEXT: vpslld $31, %xmm4, %xmm4
101 ; CHECK-NEXT: movl {{[0-9]+}}(%rsp), %ecx
102 ; CHECK-NEXT: vpinsrw $4, %ecx, %xmm3, %xmm3
103 ; CHECK-NEXT: vpunpckhwd {{.*#+}} xmm3 = xmm3[4,4,5,5,6,6,7,7]
104 ; CHECK-NEXT: vpslld $31, %xmm3, %xmm3
105 ; CHECK-NEXT: vinsertf128 $1, %xmm3, %ymm4, %ymm5
106 ; CHECK-NEXT: vmaskmovps 32(%rdi), %ymm5, %ymm5
107 ; CHECK-NEXT: vblendvps %xmm4, %xmm5, %xmm1, %xmm1
108 ; CHECK-NEXT: vmovaps %xmm1, 32(%rax)
109 ; CHECK-NEXT: vextractf128 $1, %ymm5, %xmm1
110 ; CHECK-NEXT: vblendvps %xmm3, %xmm1, %xmm0, %xmm0
111 ; CHECK-NEXT: vmovss %xmm0, 48(%rax)
112 ; CHECK-NEXT: vmovaps %ymm2, (%rax)
113 ; CHECK-NEXT: vzeroupper
115 %res = call <13 x float> @llvm.masked.load.v13f32.p0(ptr %addr, i32 4, <13 x i1>%mask, <13 x float> %dst)
116 ret <13 x float> %res
119 define <14 x float> @mload_split14(<14 x i1> %mask, ptr %addr, <14 x float> %dst) {
120 ; CHECK-LABEL: mload_split14:
122 ; CHECK-NEXT: movq %rdi, %rax
123 ; CHECK-NEXT: vinsertps {{.*#+}} xmm4 = xmm4[0],xmm5[0],xmm4[2,3]
124 ; CHECK-NEXT: vinsertps {{.*#+}} xmm4 = xmm4[0,1],xmm6[0],xmm4[3]
125 ; CHECK-NEXT: vinsertps {{.*#+}} xmm4 = xmm4[0,1,2],xmm7[0]
126 ; CHECK-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[2,3]
127 ; CHECK-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1],xmm2[0],xmm0[3]
128 ; CHECK-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1,2],xmm3[0]
129 ; CHECK-NEXT: vinsertf128 $1, %xmm4, %ymm0, %ymm2
130 ; CHECK-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
131 ; CHECK-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],mem[0],xmm0[2,3]
132 ; CHECK-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1],mem[0],xmm0[3]
133 ; CHECK-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1,2],mem[0]
134 ; CHECK-NEXT: vmovss {{.*#+}} xmm1 = mem[0],zero,zero,zero
135 ; CHECK-NEXT: vinsertps {{.*#+}} xmm1 = xmm1[0],mem[0],xmm1[2,3]
136 ; CHECK-NEXT: movq {{[0-9]+}}(%rsp), %rdi
137 ; CHECK-NEXT: vmovd %esi, %xmm3
138 ; CHECK-NEXT: vpinsrw $1, %edx, %xmm3, %xmm3
139 ; CHECK-NEXT: vpinsrw $2, %ecx, %xmm3, %xmm3
140 ; CHECK-NEXT: vpinsrw $3, %r8d, %xmm3, %xmm3
141 ; CHECK-NEXT: vpmovzxwd {{.*#+}} xmm4 = xmm3[0],zero,xmm3[1],zero,xmm3[2],zero,xmm3[3],zero
142 ; CHECK-NEXT: vpslld $31, %xmm4, %xmm4
143 ; CHECK-NEXT: vpinsrw $4, %r9d, %xmm3, %xmm3
144 ; CHECK-NEXT: movl {{[0-9]+}}(%rsp), %ecx
145 ; CHECK-NEXT: vpinsrw $5, %ecx, %xmm3, %xmm3
146 ; CHECK-NEXT: movl {{[0-9]+}}(%rsp), %ecx
147 ; CHECK-NEXT: vpinsrw $6, %ecx, %xmm3, %xmm3
148 ; CHECK-NEXT: movl {{[0-9]+}}(%rsp), %ecx
149 ; CHECK-NEXT: vpinsrw $7, %ecx, %xmm3, %xmm3
150 ; CHECK-NEXT: vpunpckhwd {{.*#+}} xmm3 = xmm3[4,4,5,5,6,6,7,7]
151 ; CHECK-NEXT: vpslld $31, %xmm3, %xmm3
152 ; CHECK-NEXT: vinsertf128 $1, %xmm3, %ymm4, %ymm3
153 ; CHECK-NEXT: vmaskmovps (%rdi), %ymm3, %ymm4
154 ; CHECK-NEXT: vblendvps %ymm3, %ymm4, %ymm2, %ymm2
155 ; CHECK-NEXT: movzbl {{[0-9]+}}(%rsp), %ecx
156 ; CHECK-NEXT: vmovd %ecx, %xmm3
157 ; CHECK-NEXT: movl {{[0-9]+}}(%rsp), %ecx
158 ; CHECK-NEXT: vpinsrw $1, %ecx, %xmm3, %xmm3
159 ; CHECK-NEXT: movl {{[0-9]+}}(%rsp), %ecx
160 ; CHECK-NEXT: vpinsrw $2, %ecx, %xmm3, %xmm3
161 ; CHECK-NEXT: movl {{[0-9]+}}(%rsp), %ecx
162 ; CHECK-NEXT: vpinsrw $3, %ecx, %xmm3, %xmm3
163 ; CHECK-NEXT: vpmovzxwd {{.*#+}} xmm4 = xmm3[0],zero,xmm3[1],zero,xmm3[2],zero,xmm3[3],zero
164 ; CHECK-NEXT: vpslld $31, %xmm4, %xmm4
165 ; CHECK-NEXT: movl {{[0-9]+}}(%rsp), %ecx
166 ; CHECK-NEXT: vpinsrw $4, %ecx, %xmm3, %xmm3
167 ; CHECK-NEXT: movl {{[0-9]+}}(%rsp), %ecx
168 ; CHECK-NEXT: vpinsrw $5, %ecx, %xmm3, %xmm3
169 ; CHECK-NEXT: vpunpckhwd {{.*#+}} xmm3 = xmm3[4,4,5,5,6,6,7,7]
170 ; CHECK-NEXT: vpslld $31, %xmm3, %xmm3
171 ; CHECK-NEXT: vinsertf128 $1, %xmm3, %ymm4, %ymm5
172 ; CHECK-NEXT: vmaskmovps 32(%rdi), %ymm5, %ymm5
173 ; CHECK-NEXT: vextractf128 $1, %ymm5, %xmm6
174 ; CHECK-NEXT: vblendvps %xmm3, %xmm6, %xmm1, %xmm1
175 ; CHECK-NEXT: vmovlps %xmm1, 48(%rax)
176 ; CHECK-NEXT: vblendvps %xmm4, %xmm5, %xmm0, %xmm0
177 ; CHECK-NEXT: vmovaps %xmm0, 32(%rax)
178 ; CHECK-NEXT: vmovaps %ymm2, (%rax)
179 ; CHECK-NEXT: vzeroupper
181 %res = call <14 x float> @llvm.masked.load.v14f32.p0(ptr %addr, i32 4, <14 x i1>%mask, <14 x float> %dst)
182 ret <14 x float> %res
185 define <17 x float> @mload_split17(<17 x i1> %mask, ptr %addr, <17 x float> %dst) {
186 ; CHECK-LABEL: mload_split17:
188 ; CHECK-NEXT: movq %rdi, %rax
189 ; CHECK-NEXT: vinsertps {{.*#+}} xmm4 = xmm4[0],xmm5[0],xmm4[2,3]
190 ; CHECK-NEXT: vinsertps {{.*#+}} xmm4 = xmm4[0,1],xmm6[0],xmm4[3]
191 ; CHECK-NEXT: vinsertps {{.*#+}} xmm4 = xmm4[0,1,2],xmm7[0]
192 ; CHECK-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[2,3]
193 ; CHECK-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1],xmm2[0],xmm0[3]
194 ; CHECK-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1,2],xmm3[0]
195 ; CHECK-NEXT: vinsertf128 $1, %xmm4, %ymm0, %ymm2
196 ; CHECK-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
197 ; CHECK-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],mem[0],xmm0[2,3]
198 ; CHECK-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1],mem[0],xmm0[3]
199 ; CHECK-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1,2],mem[0]
200 ; CHECK-NEXT: vmovss {{.*#+}} xmm1 = mem[0],zero,zero,zero
201 ; CHECK-NEXT: vinsertps {{.*#+}} xmm1 = xmm1[0],mem[0],xmm1[2,3]
202 ; CHECK-NEXT: vinsertps {{.*#+}} xmm1 = xmm1[0,1],mem[0],xmm1[3]
203 ; CHECK-NEXT: vinsertps {{.*#+}} xmm1 = xmm1[0,1,2],mem[0]
204 ; CHECK-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm1
205 ; CHECK-NEXT: vmovd {{.*#+}} xmm0 = mem[0],zero,zero,zero
206 ; CHECK-NEXT: movzbl {{[0-9]+}}(%rsp), %edi
207 ; CHECK-NEXT: movq {{[0-9]+}}(%rsp), %r10
208 ; CHECK-NEXT: vmovd %esi, %xmm3
209 ; CHECK-NEXT: vpinsrb $2, %edx, %xmm3, %xmm3
210 ; CHECK-NEXT: vpinsrb $4, %ecx, %xmm3, %xmm3
211 ; CHECK-NEXT: vpinsrb $6, %r8d, %xmm3, %xmm3
212 ; CHECK-NEXT: vpmovzxwd {{.*#+}} xmm4 = xmm3[0],zero,xmm3[1],zero,xmm3[2],zero,xmm3[3],zero
213 ; CHECK-NEXT: vpslld $31, %xmm4, %xmm4
214 ; CHECK-NEXT: vpinsrb $8, %r9d, %xmm3, %xmm3
215 ; CHECK-NEXT: vpinsrb $10, {{[0-9]+}}(%rsp), %xmm3, %xmm3
216 ; CHECK-NEXT: vpinsrb $12, {{[0-9]+}}(%rsp), %xmm3, %xmm3
217 ; CHECK-NEXT: vpinsrb $14, {{[0-9]+}}(%rsp), %xmm3, %xmm3
218 ; CHECK-NEXT: vpunpckhwd {{.*#+}} xmm3 = xmm3[4,4,5,5,6,6,7,7]
219 ; CHECK-NEXT: vpslld $31, %xmm3, %xmm3
220 ; CHECK-NEXT: vinsertf128 $1, %xmm3, %ymm4, %ymm3
221 ; CHECK-NEXT: vmaskmovps (%r10), %ymm3, %ymm4
222 ; CHECK-NEXT: vblendvps %ymm3, %ymm4, %ymm2, %ymm2
223 ; CHECK-NEXT: vmovd {{.*#+}} xmm3 = mem[0],zero,zero,zero
224 ; CHECK-NEXT: vpinsrb $2, {{[0-9]+}}(%rsp), %xmm3, %xmm3
225 ; CHECK-NEXT: vpinsrb $4, {{[0-9]+}}(%rsp), %xmm3, %xmm3
226 ; CHECK-NEXT: vpinsrb $6, {{[0-9]+}}(%rsp), %xmm3, %xmm3
227 ; CHECK-NEXT: vpmovzxwd {{.*#+}} xmm4 = xmm3[0],zero,xmm3[1],zero,xmm3[2],zero,xmm3[3],zero
228 ; CHECK-NEXT: vpslld $31, %xmm4, %xmm4
229 ; CHECK-NEXT: vpinsrb $8, {{[0-9]+}}(%rsp), %xmm3, %xmm3
230 ; CHECK-NEXT: vpinsrb $10, {{[0-9]+}}(%rsp), %xmm3, %xmm3
231 ; CHECK-NEXT: vpinsrb $12, {{[0-9]+}}(%rsp), %xmm3, %xmm3
232 ; CHECK-NEXT: vpinsrb $14, {{[0-9]+}}(%rsp), %xmm3, %xmm3
233 ; CHECK-NEXT: vpunpckhwd {{.*#+}} xmm3 = xmm3[4,4,5,5,6,6,7,7]
234 ; CHECK-NEXT: vpslld $31, %xmm3, %xmm3
235 ; CHECK-NEXT: vinsertf128 $1, %xmm3, %ymm4, %ymm3
236 ; CHECK-NEXT: vmaskmovps 32(%r10), %ymm3, %ymm4
237 ; CHECK-NEXT: vblendvps %ymm3, %ymm4, %ymm1, %ymm1
238 ; CHECK-NEXT: vmovd %edi, %xmm3
239 ; CHECK-NEXT: vpmovzxwd {{.*#+}} xmm3 = xmm3[0],zero,xmm3[1],zero,xmm3[2],zero,xmm3[3],zero
240 ; CHECK-NEXT: vpslld $31, %xmm3, %xmm3
241 ; CHECK-NEXT: vmaskmovps 64(%r10), %ymm3, %ymm4
242 ; CHECK-NEXT: vblendvps %xmm3, %xmm4, %xmm0, %xmm0
243 ; CHECK-NEXT: vmovss %xmm0, 64(%rax)
244 ; CHECK-NEXT: vmovaps %ymm1, 32(%rax)
245 ; CHECK-NEXT: vmovaps %ymm2, (%rax)
246 ; CHECK-NEXT: vzeroupper
248 %res = call <17 x float> @llvm.masked.load.v17f32.p0(ptr %addr, i32 4, <17 x i1>%mask, <17 x float> %dst)
249 ret <17 x float> %res
252 define <23 x float> @mload_split23(<23 x i1> %mask, ptr %addr, <23 x float> %dst) {
253 ; CHECK-LABEL: mload_split23:
255 ; CHECK-NEXT: movq %rdi, %rax
256 ; CHECK-NEXT: vinsertps {{.*#+}} xmm4 = xmm4[0],xmm5[0],xmm4[2,3]
257 ; CHECK-NEXT: vinsertps {{.*#+}} xmm4 = xmm4[0,1],xmm6[0],xmm4[3]
258 ; CHECK-NEXT: vinsertps {{.*#+}} xmm4 = xmm4[0,1,2],xmm7[0]
259 ; CHECK-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[2,3]
260 ; CHECK-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1],xmm2[0],xmm0[3]
261 ; CHECK-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1,2],xmm3[0]
262 ; CHECK-NEXT: vinsertf128 $1, %xmm4, %ymm0, %ymm3
263 ; CHECK-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
264 ; CHECK-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],mem[0],xmm0[2,3]
265 ; CHECK-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1],mem[0],xmm0[3]
266 ; CHECK-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1,2],mem[0]
267 ; CHECK-NEXT: vmovss {{.*#+}} xmm1 = mem[0],zero,zero,zero
268 ; CHECK-NEXT: vinsertps {{.*#+}} xmm1 = xmm1[0],mem[0],xmm1[2,3]
269 ; CHECK-NEXT: vinsertps {{.*#+}} xmm1 = xmm1[0,1],mem[0],xmm1[3]
270 ; CHECK-NEXT: vinsertps {{.*#+}} xmm1 = xmm1[0,1,2],mem[0]
271 ; CHECK-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm2
272 ; CHECK-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero
273 ; CHECK-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0],mem[0],xmm0[2,3]
274 ; CHECK-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1],mem[0],xmm0[3]
275 ; CHECK-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,1,2],mem[0]
276 ; CHECK-NEXT: vmovss {{.*#+}} xmm1 = mem[0],zero,zero,zero
277 ; CHECK-NEXT: vinsertps {{.*#+}} xmm1 = xmm1[0],mem[0],xmm1[2,3]
278 ; CHECK-NEXT: vinsertps {{.*#+}} xmm1 = xmm1[0,1],mem[0],xmm1[3]
279 ; CHECK-NEXT: movzbl {{[0-9]+}}(%rsp), %edi
280 ; CHECK-NEXT: movq {{[0-9]+}}(%rsp), %r10
281 ; CHECK-NEXT: vmovd %esi, %xmm4
282 ; CHECK-NEXT: vpinsrb $2, %edx, %xmm4, %xmm4
283 ; CHECK-NEXT: vpinsrb $4, %ecx, %xmm4, %xmm4
284 ; CHECK-NEXT: vpinsrb $6, %r8d, %xmm4, %xmm4
285 ; CHECK-NEXT: vpmovzxwd {{.*#+}} xmm5 = xmm4[0],zero,xmm4[1],zero,xmm4[2],zero,xmm4[3],zero
286 ; CHECK-NEXT: vpslld $31, %xmm5, %xmm5
287 ; CHECK-NEXT: vpinsrb $8, %r9d, %xmm4, %xmm4
288 ; CHECK-NEXT: vpinsrb $10, {{[0-9]+}}(%rsp), %xmm4, %xmm4
289 ; CHECK-NEXT: vpinsrb $12, {{[0-9]+}}(%rsp), %xmm4, %xmm4
290 ; CHECK-NEXT: vpinsrb $14, {{[0-9]+}}(%rsp), %xmm4, %xmm4
291 ; CHECK-NEXT: vpunpckhwd {{.*#+}} xmm4 = xmm4[4,4,5,5,6,6,7,7]
292 ; CHECK-NEXT: vpslld $31, %xmm4, %xmm4
293 ; CHECK-NEXT: vinsertf128 $1, %xmm4, %ymm5, %ymm4
294 ; CHECK-NEXT: vmaskmovps (%r10), %ymm4, %ymm5
295 ; CHECK-NEXT: vblendvps %ymm4, %ymm5, %ymm3, %ymm3
296 ; CHECK-NEXT: vmovd {{.*#+}} xmm4 = mem[0],zero,zero,zero
297 ; CHECK-NEXT: vpinsrb $2, {{[0-9]+}}(%rsp), %xmm4, %xmm4
298 ; CHECK-NEXT: vpinsrb $4, {{[0-9]+}}(%rsp), %xmm4, %xmm4
299 ; CHECK-NEXT: vpinsrb $6, {{[0-9]+}}(%rsp), %xmm4, %xmm4
300 ; CHECK-NEXT: vpmovzxwd {{.*#+}} xmm5 = xmm4[0],zero,xmm4[1],zero,xmm4[2],zero,xmm4[3],zero
301 ; CHECK-NEXT: vpslld $31, %xmm5, %xmm5
302 ; CHECK-NEXT: vpinsrb $8, {{[0-9]+}}(%rsp), %xmm4, %xmm4
303 ; CHECK-NEXT: vpinsrb $10, {{[0-9]+}}(%rsp), %xmm4, %xmm4
304 ; CHECK-NEXT: vpinsrb $12, {{[0-9]+}}(%rsp), %xmm4, %xmm4
305 ; CHECK-NEXT: vpinsrb $14, {{[0-9]+}}(%rsp), %xmm4, %xmm4
306 ; CHECK-NEXT: vpunpckhwd {{.*#+}} xmm4 = xmm4[4,4,5,5,6,6,7,7]
307 ; CHECK-NEXT: vpslld $31, %xmm4, %xmm4
308 ; CHECK-NEXT: vinsertf128 $1, %xmm4, %ymm5, %ymm4
309 ; CHECK-NEXT: vmaskmovps 32(%r10), %ymm4, %ymm5
310 ; CHECK-NEXT: vblendvps %ymm4, %ymm5, %ymm2, %ymm2
311 ; CHECK-NEXT: vmovd %edi, %xmm4
312 ; CHECK-NEXT: vpinsrb $2, {{[0-9]+}}(%rsp), %xmm4, %xmm4
313 ; CHECK-NEXT: vpinsrb $4, {{[0-9]+}}(%rsp), %xmm4, %xmm4
314 ; CHECK-NEXT: vpinsrb $6, {{[0-9]+}}(%rsp), %xmm4, %xmm4
315 ; CHECK-NEXT: vpmovzxwd {{.*#+}} xmm5 = xmm4[0],zero,xmm4[1],zero,xmm4[2],zero,xmm4[3],zero
316 ; CHECK-NEXT: vpslld $31, %xmm5, %xmm5
317 ; CHECK-NEXT: vpinsrb $8, {{[0-9]+}}(%rsp), %xmm4, %xmm4
318 ; CHECK-NEXT: vpinsrb $10, {{[0-9]+}}(%rsp), %xmm4, %xmm4
319 ; CHECK-NEXT: vpinsrb $12, {{[0-9]+}}(%rsp), %xmm4, %xmm4
320 ; CHECK-NEXT: vpunpckhwd {{.*#+}} xmm4 = xmm4[4,4,5,5,6,6,7,7]
321 ; CHECK-NEXT: vpslld $31, %xmm4, %xmm4
322 ; CHECK-NEXT: vinsertf128 $1, %xmm4, %ymm5, %ymm6
323 ; CHECK-NEXT: vmaskmovps 64(%r10), %ymm6, %ymm6
324 ; CHECK-NEXT: vmovaps %ymm2, 32(%rax)
325 ; CHECK-NEXT: vextractf128 $1, %ymm6, %xmm2
326 ; CHECK-NEXT: vblendvps %xmm4, %xmm2, %xmm1, %xmm1
327 ; CHECK-NEXT: vextractps $2, %xmm1, 88(%rax)
328 ; CHECK-NEXT: vmovlps %xmm1, 80(%rax)
329 ; CHECK-NEXT: vblendvps %xmm5, %xmm6, %xmm0, %xmm0
330 ; CHECK-NEXT: vmovaps %xmm0, 64(%rax)
331 ; CHECK-NEXT: vmovaps %ymm3, (%rax)
332 ; CHECK-NEXT: vzeroupper
334 %res = call <23 x float> @llvm.masked.load.v23f32.p0(ptr %addr, i32 4, <23 x i1>%mask, <23 x float> %dst)
335 ret <23 x float> %res
338 declare <9 x float> @llvm.masked.load.v9f32.p0(ptr %addr, i32 %align, <9 x i1> %mask, <9 x float> %dst)
339 declare <13 x float> @llvm.masked.load.v13f32.p0(ptr %addr, i32 %align, <13 x i1> %mask, <13 x float> %dst)
340 declare <14 x float> @llvm.masked.load.v14f32.p0(ptr %addr, i32 %align, <14 x i1> %mask, <14 x float> %dst)
341 declare <17 x float> @llvm.masked.load.v17f32.p0(ptr %addr, i32 %align, <17 x i1> %mask, <17 x float> %dst)
342 declare <23 x float> @llvm.masked.load.v23f32.p0(ptr %addr, i32 %align, <23 x i1> %mask, <23 x float> %dst)