1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -mtriple=x86_64-unknown -basic-aa -slp-vectorizer -S | FileCheck %s --check-prefixes=CHECK,SSE
3 ; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=slm -basic-aa -slp-vectorizer -S | FileCheck %s --check-prefixes=CHECK,SLM
4 ; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=corei7-avx -mattr=-prefer-128-bit -basic-aa -slp-vectorizer -S | FileCheck %s --check-prefixes=CHECK,AVX
5 ; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=corei7-avx -mattr=+prefer-128-bit -basic-aa -slp-vectorizer -S | FileCheck %s --check-prefixes=CHECK,SSE
6 ; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=core-avx2 -mattr=-prefer-128-bit -basic-aa -slp-vectorizer -S | FileCheck %s --check-prefixes=CHECK,AVX
7 ; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=core-avx2 -mattr=+prefer-128-bit -basic-aa -slp-vectorizer -S | FileCheck %s --check-prefixes=CHECK,SSE
8 ; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=skx -basic-aa -slp-vectorizer -S | FileCheck %s --check-prefixes=CHECK,AVX512
14 define <2 x double> @buildvector_add_2f64(<2 x double> %a, <2 x double> %b) {
15 ; CHECK-LABEL: @buildvector_add_2f64(
16 ; CHECK-NEXT: [[TMP1:%.*]] = fadd <2 x double> [[A:%.*]], [[B:%.*]]
17 ; CHECK-NEXT: ret <2 x double> [[TMP1]]
19 %a0 = extractelement <2 x double> %a, i32 0
20 %a1 = extractelement <2 x double> %a, i32 1
21 %b0 = extractelement <2 x double> %b, i32 0
22 %b1 = extractelement <2 x double> %b, i32 1
23 %c0 = fadd double %a0, %b0
24 %c1 = fadd double %a1, %b1
25 %r0 = insertelement <2 x double> poison, double %c0, i32 0
26 %r1 = insertelement <2 x double> %r0, double %c1, i32 1
30 define <2 x double> @buildvector_sub_2f64(<2 x double> %a, <2 x double> %b) {
31 ; CHECK-LABEL: @buildvector_sub_2f64(
32 ; CHECK-NEXT: [[TMP1:%.*]] = fsub <2 x double> [[A:%.*]], [[B:%.*]]
33 ; CHECK-NEXT: ret <2 x double> [[TMP1]]
35 %a0 = extractelement <2 x double> %a, i32 0
36 %a1 = extractelement <2 x double> %a, i32 1
37 %b0 = extractelement <2 x double> %b, i32 0
38 %b1 = extractelement <2 x double> %b, i32 1
39 %c0 = fsub double %a0, %b0
40 %c1 = fsub double %a1, %b1
41 %r0 = insertelement <2 x double> poison, double %c0, i32 0
42 %r1 = insertelement <2 x double> %r0, double %c1, i32 1
46 define <2 x double> @buildvector_mul_2f64(<2 x double> %a, <2 x double> %b) {
47 ; CHECK-LABEL: @buildvector_mul_2f64(
48 ; CHECK-NEXT: [[TMP1:%.*]] = fmul <2 x double> [[A:%.*]], [[B:%.*]]
49 ; CHECK-NEXT: ret <2 x double> [[TMP1]]
51 %a0 = extractelement <2 x double> %a, i32 0
52 %a1 = extractelement <2 x double> %a, i32 1
53 %b0 = extractelement <2 x double> %b, i32 0
54 %b1 = extractelement <2 x double> %b, i32 1
55 %c0 = fmul double %a0, %b0
56 %c1 = fmul double %a1, %b1
57 %r0 = insertelement <2 x double> poison, double %c0, i32 0
58 %r1 = insertelement <2 x double> %r0, double %c1, i32 1
62 define <2 x double> @buildvector_div_2f64(<2 x double> %a, <2 x double> %b) {
63 ; SSE-LABEL: @buildvector_div_2f64(
64 ; SSE-NEXT: [[TMP1:%.*]] = fdiv <2 x double> [[A:%.*]], [[B:%.*]]
65 ; SSE-NEXT: ret <2 x double> [[TMP1]]
67 ; SLM-LABEL: @buildvector_div_2f64(
68 ; SLM-NEXT: [[A0:%.*]] = extractelement <2 x double> [[A:%.*]], i32 0
69 ; SLM-NEXT: [[A1:%.*]] = extractelement <2 x double> [[A]], i32 1
70 ; SLM-NEXT: [[B0:%.*]] = extractelement <2 x double> [[B:%.*]], i32 0
71 ; SLM-NEXT: [[B1:%.*]] = extractelement <2 x double> [[B]], i32 1
72 ; SLM-NEXT: [[C0:%.*]] = fdiv double [[A0]], [[B0]]
73 ; SLM-NEXT: [[C1:%.*]] = fdiv double [[A1]], [[B1]]
74 ; SLM-NEXT: [[R0:%.*]] = insertelement <2 x double> poison, double [[C0]], i32 0
75 ; SLM-NEXT: [[R1:%.*]] = insertelement <2 x double> [[R0]], double [[C1]], i32 1
76 ; SLM-NEXT: ret <2 x double> [[R1]]
78 ; AVX-LABEL: @buildvector_div_2f64(
79 ; AVX-NEXT: [[TMP1:%.*]] = fdiv <2 x double> [[A:%.*]], [[B:%.*]]
80 ; AVX-NEXT: ret <2 x double> [[TMP1]]
82 ; AVX512-LABEL: @buildvector_div_2f64(
83 ; AVX512-NEXT: [[TMP1:%.*]] = fdiv <2 x double> [[A:%.*]], [[B:%.*]]
84 ; AVX512-NEXT: ret <2 x double> [[TMP1]]
86 %a0 = extractelement <2 x double> %a, i32 0
87 %a1 = extractelement <2 x double> %a, i32 1
88 %b0 = extractelement <2 x double> %b, i32 0
89 %b1 = extractelement <2 x double> %b, i32 1
90 %c0 = fdiv double %a0, %b0
91 %c1 = fdiv double %a1, %b1
92 %r0 = insertelement <2 x double> poison, double %c0, i32 0
93 %r1 = insertelement <2 x double> %r0, double %c1, i32 1
97 define <4 x float> @buildvector_add_4f32(<4 x float> %a, <4 x float> %b) {
98 ; CHECK-LABEL: @buildvector_add_4f32(
99 ; CHECK-NEXT: [[TMP1:%.*]] = fadd <4 x float> [[A:%.*]], [[B:%.*]]
100 ; CHECK-NEXT: ret <4 x float> [[TMP1]]
102 %a0 = extractelement <4 x float> %a, i32 0
103 %a1 = extractelement <4 x float> %a, i32 1
104 %a2 = extractelement <4 x float> %a, i32 2
105 %a3 = extractelement <4 x float> %a, i32 3
106 %b0 = extractelement <4 x float> %b, i32 0
107 %b1 = extractelement <4 x float> %b, i32 1
108 %b2 = extractelement <4 x float> %b, i32 2
109 %b3 = extractelement <4 x float> %b, i32 3
110 %c0 = fadd float %a0, %b0
111 %c1 = fadd float %a1, %b1
112 %c2 = fadd float %a2, %b2
113 %c3 = fadd float %a3, %b3
114 %r0 = insertelement <4 x float> poison, float %c0, i32 0
115 %r1 = insertelement <4 x float> %r0, float %c1, i32 1
116 %r2 = insertelement <4 x float> %r1, float %c2, i32 2
117 %r3 = insertelement <4 x float> %r2, float %c3, i32 3
121 define <4 x float> @buildvector_sub_4f32(<4 x float> %a, <4 x float> %b) {
122 ; CHECK-LABEL: @buildvector_sub_4f32(
123 ; CHECK-NEXT: [[TMP1:%.*]] = fsub <4 x float> [[A:%.*]], [[B:%.*]]
124 ; CHECK-NEXT: ret <4 x float> [[TMP1]]
126 %a0 = extractelement <4 x float> %a, i32 0
127 %a1 = extractelement <4 x float> %a, i32 1
128 %a2 = extractelement <4 x float> %a, i32 2
129 %a3 = extractelement <4 x float> %a, i32 3
130 %b0 = extractelement <4 x float> %b, i32 0
131 %b1 = extractelement <4 x float> %b, i32 1
132 %b2 = extractelement <4 x float> %b, i32 2
133 %b3 = extractelement <4 x float> %b, i32 3
134 %c0 = fsub float %a0, %b0
135 %c1 = fsub float %a1, %b1
136 %c2 = fsub float %a2, %b2
137 %c3 = fsub float %a3, %b3
138 %r0 = insertelement <4 x float> poison, float %c0, i32 0
139 %r1 = insertelement <4 x float> %r0, float %c1, i32 1
140 %r2 = insertelement <4 x float> %r1, float %c2, i32 2
141 %r3 = insertelement <4 x float> %r2, float %c3, i32 3
145 define <4 x float> @buildvector_mul_4f32(<4 x float> %a, <4 x float> %b) {
146 ; CHECK-LABEL: @buildvector_mul_4f32(
147 ; CHECK-NEXT: [[TMP1:%.*]] = fmul <4 x float> [[A:%.*]], [[B:%.*]]
148 ; CHECK-NEXT: ret <4 x float> [[TMP1]]
150 %a0 = extractelement <4 x float> %a, i32 0
151 %a1 = extractelement <4 x float> %a, i32 1
152 %a2 = extractelement <4 x float> %a, i32 2
153 %a3 = extractelement <4 x float> %a, i32 3
154 %b0 = extractelement <4 x float> %b, i32 0
155 %b1 = extractelement <4 x float> %b, i32 1
156 %b2 = extractelement <4 x float> %b, i32 2
157 %b3 = extractelement <4 x float> %b, i32 3
158 %c0 = fmul float %a0, %b0
159 %c1 = fmul float %a1, %b1
160 %c2 = fmul float %a2, %b2
161 %c3 = fmul float %a3, %b3
162 %r0 = insertelement <4 x float> poison, float %c0, i32 0
163 %r1 = insertelement <4 x float> %r0, float %c1, i32 1
164 %r2 = insertelement <4 x float> %r1, float %c2, i32 2
165 %r3 = insertelement <4 x float> %r2, float %c3, i32 3
169 define <4 x float> @buildvector_div_4f32(<4 x float> %a, <4 x float> %b) {
170 ; CHECK-LABEL: @buildvector_div_4f32(
171 ; CHECK-NEXT: [[TMP1:%.*]] = fdiv <4 x float> [[A:%.*]], [[B:%.*]]
172 ; CHECK-NEXT: ret <4 x float> [[TMP1]]
174 %a0 = extractelement <4 x float> %a, i32 0
175 %a1 = extractelement <4 x float> %a, i32 1
176 %a2 = extractelement <4 x float> %a, i32 2
177 %a3 = extractelement <4 x float> %a, i32 3
178 %b0 = extractelement <4 x float> %b, i32 0
179 %b1 = extractelement <4 x float> %b, i32 1
180 %b2 = extractelement <4 x float> %b, i32 2
181 %b3 = extractelement <4 x float> %b, i32 3
182 %c0 = fdiv float %a0, %b0
183 %c1 = fdiv float %a1, %b1
184 %c2 = fdiv float %a2, %b2
185 %c3 = fdiv float %a3, %b3
186 %r0 = insertelement <4 x float> poison, float %c0, i32 0
187 %r1 = insertelement <4 x float> %r0, float %c1, i32 1
188 %r2 = insertelement <4 x float> %r1, float %c2, i32 2
189 %r3 = insertelement <4 x float> %r2, float %c3, i32 3
197 define <4 x double> @buildvector_add_4f64(<4 x double> %a, <4 x double> %b) {
198 ; CHECK-LABEL: @buildvector_add_4f64(
199 ; CHECK-NEXT: [[TMP1:%.*]] = fadd <4 x double> [[A:%.*]], [[B:%.*]]
200 ; CHECK-NEXT: ret <4 x double> [[TMP1]]
202 %a0 = extractelement <4 x double> %a, i32 0
203 %a1 = extractelement <4 x double> %a, i32 1
204 %a2 = extractelement <4 x double> %a, i32 2
205 %a3 = extractelement <4 x double> %a, i32 3
206 %b0 = extractelement <4 x double> %b, i32 0
207 %b1 = extractelement <4 x double> %b, i32 1
208 %b2 = extractelement <4 x double> %b, i32 2
209 %b3 = extractelement <4 x double> %b, i32 3
210 %c0 = fadd double %a0, %b0
211 %c1 = fadd double %a1, %b1
212 %c2 = fadd double %a2, %b2
213 %c3 = fadd double %a3, %b3
214 %r0 = insertelement <4 x double> poison, double %c0, i32 0
215 %r1 = insertelement <4 x double> %r0, double %c1, i32 1
216 %r2 = insertelement <4 x double> %r1, double %c2, i32 2
217 %r3 = insertelement <4 x double> %r2, double %c3, i32 3
221 define <4 x double> @buildvector_sub_4f64(<4 x double> %a, <4 x double> %b) {
222 ; CHECK-LABEL: @buildvector_sub_4f64(
223 ; CHECK-NEXT: [[TMP1:%.*]] = fsub <4 x double> [[A:%.*]], [[B:%.*]]
224 ; CHECK-NEXT: ret <4 x double> [[TMP1]]
226 %a0 = extractelement <4 x double> %a, i32 0
227 %a1 = extractelement <4 x double> %a, i32 1
228 %a2 = extractelement <4 x double> %a, i32 2
229 %a3 = extractelement <4 x double> %a, i32 3
230 %b0 = extractelement <4 x double> %b, i32 0
231 %b1 = extractelement <4 x double> %b, i32 1
232 %b2 = extractelement <4 x double> %b, i32 2
233 %b3 = extractelement <4 x double> %b, i32 3
234 %c0 = fsub double %a0, %b0
235 %c1 = fsub double %a1, %b1
236 %c2 = fsub double %a2, %b2
237 %c3 = fsub double %a3, %b3
238 %r0 = insertelement <4 x double> poison, double %c0, i32 0
239 %r1 = insertelement <4 x double> %r0, double %c1, i32 1
240 %r2 = insertelement <4 x double> %r1, double %c2, i32 2
241 %r3 = insertelement <4 x double> %r2, double %c3, i32 3
245 define <4 x double> @buildvector_mul_4f64(<4 x double> %a, <4 x double> %b) {
246 ; CHECK-LABEL: @buildvector_mul_4f64(
247 ; CHECK-NEXT: [[TMP1:%.*]] = fmul <4 x double> [[A:%.*]], [[B:%.*]]
248 ; CHECK-NEXT: ret <4 x double> [[TMP1]]
250 %a0 = extractelement <4 x double> %a, i32 0
251 %a1 = extractelement <4 x double> %a, i32 1
252 %a2 = extractelement <4 x double> %a, i32 2
253 %a3 = extractelement <4 x double> %a, i32 3
254 %b0 = extractelement <4 x double> %b, i32 0
255 %b1 = extractelement <4 x double> %b, i32 1
256 %b2 = extractelement <4 x double> %b, i32 2
257 %b3 = extractelement <4 x double> %b, i32 3
258 %c0 = fmul double %a0, %b0
259 %c1 = fmul double %a1, %b1
260 %c2 = fmul double %a2, %b2
261 %c3 = fmul double %a3, %b3
262 %r0 = insertelement <4 x double> poison, double %c0, i32 0
263 %r1 = insertelement <4 x double> %r0, double %c1, i32 1
264 %r2 = insertelement <4 x double> %r1, double %c2, i32 2
265 %r3 = insertelement <4 x double> %r2, double %c3, i32 3
269 define <4 x double> @buildvector_div_4f64(<4 x double> %a, <4 x double> %b) {
270 ; SSE-LABEL: @buildvector_div_4f64(
271 ; SSE-NEXT: [[TMP1:%.*]] = fdiv <4 x double> [[A:%.*]], [[B:%.*]]
272 ; SSE-NEXT: ret <4 x double> [[TMP1]]
274 ; SLM-LABEL: @buildvector_div_4f64(
275 ; SLM-NEXT: [[A0:%.*]] = extractelement <4 x double> [[A:%.*]], i32 0
276 ; SLM-NEXT: [[A1:%.*]] = extractelement <4 x double> [[A]], i32 1
277 ; SLM-NEXT: [[A2:%.*]] = extractelement <4 x double> [[A]], i32 2
278 ; SLM-NEXT: [[A3:%.*]] = extractelement <4 x double> [[A]], i32 3
279 ; SLM-NEXT: [[B0:%.*]] = extractelement <4 x double> [[B:%.*]], i32 0
280 ; SLM-NEXT: [[B1:%.*]] = extractelement <4 x double> [[B]], i32 1
281 ; SLM-NEXT: [[B2:%.*]] = extractelement <4 x double> [[B]], i32 2
282 ; SLM-NEXT: [[B3:%.*]] = extractelement <4 x double> [[B]], i32 3
283 ; SLM-NEXT: [[C0:%.*]] = fdiv double [[A0]], [[B0]]
284 ; SLM-NEXT: [[C1:%.*]] = fdiv double [[A1]], [[B1]]
285 ; SLM-NEXT: [[C2:%.*]] = fdiv double [[A2]], [[B2]]
286 ; SLM-NEXT: [[C3:%.*]] = fdiv double [[A3]], [[B3]]
287 ; SLM-NEXT: [[R0:%.*]] = insertelement <4 x double> poison, double [[C0]], i32 0
288 ; SLM-NEXT: [[R1:%.*]] = insertelement <4 x double> [[R0]], double [[C1]], i32 1
289 ; SLM-NEXT: [[R2:%.*]] = insertelement <4 x double> [[R1]], double [[C2]], i32 2
290 ; SLM-NEXT: [[R3:%.*]] = insertelement <4 x double> [[R2]], double [[C3]], i32 3
291 ; SLM-NEXT: ret <4 x double> [[R3]]
293 ; AVX-LABEL: @buildvector_div_4f64(
294 ; AVX-NEXT: [[TMP1:%.*]] = fdiv <4 x double> [[A:%.*]], [[B:%.*]]
295 ; AVX-NEXT: ret <4 x double> [[TMP1]]
297 ; AVX512-LABEL: @buildvector_div_4f64(
298 ; AVX512-NEXT: [[TMP1:%.*]] = fdiv <4 x double> [[A:%.*]], [[B:%.*]]
299 ; AVX512-NEXT: ret <4 x double> [[TMP1]]
301 %a0 = extractelement <4 x double> %a, i32 0
302 %a1 = extractelement <4 x double> %a, i32 1
303 %a2 = extractelement <4 x double> %a, i32 2
304 %a3 = extractelement <4 x double> %a, i32 3
305 %b0 = extractelement <4 x double> %b, i32 0
306 %b1 = extractelement <4 x double> %b, i32 1
307 %b2 = extractelement <4 x double> %b, i32 2
308 %b3 = extractelement <4 x double> %b, i32 3
309 %c0 = fdiv double %a0, %b0
310 %c1 = fdiv double %a1, %b1
311 %c2 = fdiv double %a2, %b2
312 %c3 = fdiv double %a3, %b3
313 %r0 = insertelement <4 x double> poison, double %c0, i32 0
314 %r1 = insertelement <4 x double> %r0, double %c1, i32 1
315 %r2 = insertelement <4 x double> %r1, double %c2, i32 2
316 %r3 = insertelement <4 x double> %r2, double %c3, i32 3
320 define <8 x float> @buildvector_add_8f32(<8 x float> %a, <8 x float> %b) {
321 ; CHECK-LABEL: @buildvector_add_8f32(
322 ; CHECK-NEXT: [[TMP1:%.*]] = fadd <8 x float> [[A:%.*]], [[B:%.*]]
323 ; CHECK-NEXT: ret <8 x float> [[TMP1]]
325 %a0 = extractelement <8 x float> %a, i32 0
326 %a1 = extractelement <8 x float> %a, i32 1
327 %a2 = extractelement <8 x float> %a, i32 2
328 %a3 = extractelement <8 x float> %a, i32 3
329 %a4 = extractelement <8 x float> %a, i32 4
330 %a5 = extractelement <8 x float> %a, i32 5
331 %a6 = extractelement <8 x float> %a, i32 6
332 %a7 = extractelement <8 x float> %a, i32 7
333 %b0 = extractelement <8 x float> %b, i32 0
334 %b1 = extractelement <8 x float> %b, i32 1
335 %b2 = extractelement <8 x float> %b, i32 2
336 %b3 = extractelement <8 x float> %b, i32 3
337 %b4 = extractelement <8 x float> %b, i32 4
338 %b5 = extractelement <8 x float> %b, i32 5
339 %b6 = extractelement <8 x float> %b, i32 6
340 %b7 = extractelement <8 x float> %b, i32 7
341 %c0 = fadd float %a0, %b0
342 %c1 = fadd float %a1, %b1
343 %c2 = fadd float %a2, %b2
344 %c3 = fadd float %a3, %b3
345 %c4 = fadd float %a4, %b4
346 %c5 = fadd float %a5, %b5
347 %c6 = fadd float %a6, %b6
348 %c7 = fadd float %a7, %b7
349 %r0 = insertelement <8 x float> poison, float %c0, i32 0
350 %r1 = insertelement <8 x float> %r0, float %c1, i32 1
351 %r2 = insertelement <8 x float> %r1, float %c2, i32 2
352 %r3 = insertelement <8 x float> %r2, float %c3, i32 3
353 %r4 = insertelement <8 x float> %r3, float %c4, i32 4
354 %r5 = insertelement <8 x float> %r4, float %c5, i32 5
355 %r6 = insertelement <8 x float> %r5, float %c6, i32 6
356 %r7 = insertelement <8 x float> %r6, float %c7, i32 7
360 define <8 x float> @buildvector_sub_8f32(<8 x float> %a, <8 x float> %b) {
361 ; CHECK-LABEL: @buildvector_sub_8f32(
362 ; CHECK-NEXT: [[TMP1:%.*]] = fsub <8 x float> [[A:%.*]], [[B:%.*]]
363 ; CHECK-NEXT: ret <8 x float> [[TMP1]]
365 %a0 = extractelement <8 x float> %a, i32 0
366 %a1 = extractelement <8 x float> %a, i32 1
367 %a2 = extractelement <8 x float> %a, i32 2
368 %a3 = extractelement <8 x float> %a, i32 3
369 %a4 = extractelement <8 x float> %a, i32 4
370 %a5 = extractelement <8 x float> %a, i32 5
371 %a6 = extractelement <8 x float> %a, i32 6
372 %a7 = extractelement <8 x float> %a, i32 7
373 %b0 = extractelement <8 x float> %b, i32 0
374 %b1 = extractelement <8 x float> %b, i32 1
375 %b2 = extractelement <8 x float> %b, i32 2
376 %b3 = extractelement <8 x float> %b, i32 3
377 %b4 = extractelement <8 x float> %b, i32 4
378 %b5 = extractelement <8 x float> %b, i32 5
379 %b6 = extractelement <8 x float> %b, i32 6
380 %b7 = extractelement <8 x float> %b, i32 7
381 %c0 = fsub float %a0, %b0
382 %c1 = fsub float %a1, %b1
383 %c2 = fsub float %a2, %b2
384 %c3 = fsub float %a3, %b3
385 %c4 = fsub float %a4, %b4
386 %c5 = fsub float %a5, %b5
387 %c6 = fsub float %a6, %b6
388 %c7 = fsub float %a7, %b7
389 %r0 = insertelement <8 x float> poison, float %c0, i32 0
390 %r1 = insertelement <8 x float> %r0, float %c1, i32 1
391 %r2 = insertelement <8 x float> %r1, float %c2, i32 2
392 %r3 = insertelement <8 x float> %r2, float %c3, i32 3
393 %r4 = insertelement <8 x float> %r3, float %c4, i32 4
394 %r5 = insertelement <8 x float> %r4, float %c5, i32 5
395 %r6 = insertelement <8 x float> %r5, float %c6, i32 6
396 %r7 = insertelement <8 x float> %r6, float %c7, i32 7
400 define <8 x float> @buildvector_mul_8f32(<8 x float> %a, <8 x float> %b) {
401 ; CHECK-LABEL: @buildvector_mul_8f32(
402 ; CHECK-NEXT: [[TMP1:%.*]] = fmul <8 x float> [[A:%.*]], [[B:%.*]]
403 ; CHECK-NEXT: ret <8 x float> [[TMP1]]
405 %a0 = extractelement <8 x float> %a, i32 0
406 %a1 = extractelement <8 x float> %a, i32 1
407 %a2 = extractelement <8 x float> %a, i32 2
408 %a3 = extractelement <8 x float> %a, i32 3
409 %a4 = extractelement <8 x float> %a, i32 4
410 %a5 = extractelement <8 x float> %a, i32 5
411 %a6 = extractelement <8 x float> %a, i32 6
412 %a7 = extractelement <8 x float> %a, i32 7
413 %b0 = extractelement <8 x float> %b, i32 0
414 %b1 = extractelement <8 x float> %b, i32 1
415 %b2 = extractelement <8 x float> %b, i32 2
416 %b3 = extractelement <8 x float> %b, i32 3
417 %b4 = extractelement <8 x float> %b, i32 4
418 %b5 = extractelement <8 x float> %b, i32 5
419 %b6 = extractelement <8 x float> %b, i32 6
420 %b7 = extractelement <8 x float> %b, i32 7
421 %c0 = fmul float %a0, %b0
422 %c1 = fmul float %a1, %b1
423 %c2 = fmul float %a2, %b2
424 %c3 = fmul float %a3, %b3
425 %c4 = fmul float %a4, %b4
426 %c5 = fmul float %a5, %b5
427 %c6 = fmul float %a6, %b6
428 %c7 = fmul float %a7, %b7
429 %r0 = insertelement <8 x float> poison, float %c0, i32 0
430 %r1 = insertelement <8 x float> %r0, float %c1, i32 1
431 %r2 = insertelement <8 x float> %r1, float %c2, i32 2
432 %r3 = insertelement <8 x float> %r2, float %c3, i32 3
433 %r4 = insertelement <8 x float> %r3, float %c4, i32 4
434 %r5 = insertelement <8 x float> %r4, float %c5, i32 5
435 %r6 = insertelement <8 x float> %r5, float %c6, i32 6
436 %r7 = insertelement <8 x float> %r6, float %c7, i32 7
440 define <8 x float> @buildvector_div_8f32(<8 x float> %a, <8 x float> %b) {
441 ; CHECK-LABEL: @buildvector_div_8f32(
442 ; CHECK-NEXT: [[TMP1:%.*]] = fdiv <8 x float> [[A:%.*]], [[B:%.*]]
443 ; CHECK-NEXT: ret <8 x float> [[TMP1]]
445 %a0 = extractelement <8 x float> %a, i32 0
446 %a1 = extractelement <8 x float> %a, i32 1
447 %a2 = extractelement <8 x float> %a, i32 2
448 %a3 = extractelement <8 x float> %a, i32 3
449 %a4 = extractelement <8 x float> %a, i32 4
450 %a5 = extractelement <8 x float> %a, i32 5
451 %a6 = extractelement <8 x float> %a, i32 6
452 %a7 = extractelement <8 x float> %a, i32 7
453 %b0 = extractelement <8 x float> %b, i32 0
454 %b1 = extractelement <8 x float> %b, i32 1
455 %b2 = extractelement <8 x float> %b, i32 2
456 %b3 = extractelement <8 x float> %b, i32 3
457 %b4 = extractelement <8 x float> %b, i32 4
458 %b5 = extractelement <8 x float> %b, i32 5
459 %b6 = extractelement <8 x float> %b, i32 6
460 %b7 = extractelement <8 x float> %b, i32 7
461 %c0 = fdiv float %a0, %b0
462 %c1 = fdiv float %a1, %b1
463 %c2 = fdiv float %a2, %b2
464 %c3 = fdiv float %a3, %b3
465 %c4 = fdiv float %a4, %b4
466 %c5 = fdiv float %a5, %b5
467 %c6 = fdiv float %a6, %b6
468 %c7 = fdiv float %a7, %b7
469 %r0 = insertelement <8 x float> poison, float %c0, i32 0
470 %r1 = insertelement <8 x float> %r0, float %c1, i32 1
471 %r2 = insertelement <8 x float> %r1, float %c2, i32 2
472 %r3 = insertelement <8 x float> %r2, float %c3, i32 3
473 %r4 = insertelement <8 x float> %r3, float %c4, i32 4
474 %r5 = insertelement <8 x float> %r4, float %c5, i32 5
475 %r6 = insertelement <8 x float> %r5, float %c6, i32 6
476 %r7 = insertelement <8 x float> %r6, float %c7, i32 7
484 define <8 x double> @buildvector_add_8f64(<8 x double> %a, <8 x double> %b) {
485 ; CHECK-LABEL: @buildvector_add_8f64(
486 ; CHECK-NEXT: [[TMP1:%.*]] = fadd <8 x double> [[A:%.*]], [[B:%.*]]
487 ; CHECK-NEXT: ret <8 x double> [[TMP1]]
489 %a0 = extractelement <8 x double> %a, i32 0
490 %a1 = extractelement <8 x double> %a, i32 1
491 %a2 = extractelement <8 x double> %a, i32 2
492 %a3 = extractelement <8 x double> %a, i32 3
493 %a4 = extractelement <8 x double> %a, i32 4
494 %a5 = extractelement <8 x double> %a, i32 5
495 %a6 = extractelement <8 x double> %a, i32 6
496 %a7 = extractelement <8 x double> %a, i32 7
497 %b0 = extractelement <8 x double> %b, i32 0
498 %b1 = extractelement <8 x double> %b, i32 1
499 %b2 = extractelement <8 x double> %b, i32 2
500 %b3 = extractelement <8 x double> %b, i32 3
501 %b4 = extractelement <8 x double> %b, i32 4
502 %b5 = extractelement <8 x double> %b, i32 5
503 %b6 = extractelement <8 x double> %b, i32 6
504 %b7 = extractelement <8 x double> %b, i32 7
505 %c0 = fadd double %a0, %b0
506 %c1 = fadd double %a1, %b1
507 %c2 = fadd double %a2, %b2
508 %c3 = fadd double %a3, %b3
509 %c4 = fadd double %a4, %b4
510 %c5 = fadd double %a5, %b5
511 %c6 = fadd double %a6, %b6
512 %c7 = fadd double %a7, %b7
513 %r0 = insertelement <8 x double> poison, double %c0, i32 0
514 %r1 = insertelement <8 x double> %r0, double %c1, i32 1
515 %r2 = insertelement <8 x double> %r1, double %c2, i32 2
516 %r3 = insertelement <8 x double> %r2, double %c3, i32 3
517 %r4 = insertelement <8 x double> %r3, double %c4, i32 4
518 %r5 = insertelement <8 x double> %r4, double %c5, i32 5
519 %r6 = insertelement <8 x double> %r5, double %c6, i32 6
520 %r7 = insertelement <8 x double> %r6, double %c7, i32 7
524 define <8 x double> @buildvector_sub_8f64(<8 x double> %a, <8 x double> %b) {
525 ; CHECK-LABEL: @buildvector_sub_8f64(
526 ; CHECK-NEXT: [[TMP1:%.*]] = fsub <8 x double> [[A:%.*]], [[B:%.*]]
527 ; CHECK-NEXT: ret <8 x double> [[TMP1]]
529 %a0 = extractelement <8 x double> %a, i32 0
530 %a1 = extractelement <8 x double> %a, i32 1
531 %a2 = extractelement <8 x double> %a, i32 2
532 %a3 = extractelement <8 x double> %a, i32 3
533 %a4 = extractelement <8 x double> %a, i32 4
534 %a5 = extractelement <8 x double> %a, i32 5
535 %a6 = extractelement <8 x double> %a, i32 6
536 %a7 = extractelement <8 x double> %a, i32 7
537 %b0 = extractelement <8 x double> %b, i32 0
538 %b1 = extractelement <8 x double> %b, i32 1
539 %b2 = extractelement <8 x double> %b, i32 2
540 %b3 = extractelement <8 x double> %b, i32 3
541 %b4 = extractelement <8 x double> %b, i32 4
542 %b5 = extractelement <8 x double> %b, i32 5
543 %b6 = extractelement <8 x double> %b, i32 6
544 %b7 = extractelement <8 x double> %b, i32 7
545 %c0 = fsub double %a0, %b0
546 %c1 = fsub double %a1, %b1
547 %c2 = fsub double %a2, %b2
548 %c3 = fsub double %a3, %b3
549 %c4 = fsub double %a4, %b4
550 %c5 = fsub double %a5, %b5
551 %c6 = fsub double %a6, %b6
552 %c7 = fsub double %a7, %b7
553 %r0 = insertelement <8 x double> poison, double %c0, i32 0
554 %r1 = insertelement <8 x double> %r0, double %c1, i32 1
555 %r2 = insertelement <8 x double> %r1, double %c2, i32 2
556 %r3 = insertelement <8 x double> %r2, double %c3, i32 3
557 %r4 = insertelement <8 x double> %r3, double %c4, i32 4
558 %r5 = insertelement <8 x double> %r4, double %c5, i32 5
559 %r6 = insertelement <8 x double> %r5, double %c6, i32 6
560 %r7 = insertelement <8 x double> %r6, double %c7, i32 7
564 define <8 x double> @buildvector_mul_8f64(<8 x double> %a, <8 x double> %b) {
565 ; CHECK-LABEL: @buildvector_mul_8f64(
566 ; CHECK-NEXT: [[TMP1:%.*]] = fmul <8 x double> [[A:%.*]], [[B:%.*]]
567 ; CHECK-NEXT: ret <8 x double> [[TMP1]]
569 %a0 = extractelement <8 x double> %a, i32 0
570 %a1 = extractelement <8 x double> %a, i32 1
571 %a2 = extractelement <8 x double> %a, i32 2
572 %a3 = extractelement <8 x double> %a, i32 3
573 %a4 = extractelement <8 x double> %a, i32 4
574 %a5 = extractelement <8 x double> %a, i32 5
575 %a6 = extractelement <8 x double> %a, i32 6
576 %a7 = extractelement <8 x double> %a, i32 7
577 %b0 = extractelement <8 x double> %b, i32 0
578 %b1 = extractelement <8 x double> %b, i32 1
579 %b2 = extractelement <8 x double> %b, i32 2
580 %b3 = extractelement <8 x double> %b, i32 3
581 %b4 = extractelement <8 x double> %b, i32 4
582 %b5 = extractelement <8 x double> %b, i32 5
583 %b6 = extractelement <8 x double> %b, i32 6
584 %b7 = extractelement <8 x double> %b, i32 7
585 %c0 = fmul double %a0, %b0
586 %c1 = fmul double %a1, %b1
587 %c2 = fmul double %a2, %b2
588 %c3 = fmul double %a3, %b3
589 %c4 = fmul double %a4, %b4
590 %c5 = fmul double %a5, %b5
591 %c6 = fmul double %a6, %b6
592 %c7 = fmul double %a7, %b7
593 %r0 = insertelement <8 x double> poison, double %c0, i32 0
594 %r1 = insertelement <8 x double> %r0, double %c1, i32 1
595 %r2 = insertelement <8 x double> %r1, double %c2, i32 2
596 %r3 = insertelement <8 x double> %r2, double %c3, i32 3
597 %r4 = insertelement <8 x double> %r3, double %c4, i32 4
598 %r5 = insertelement <8 x double> %r4, double %c5, i32 5
599 %r6 = insertelement <8 x double> %r5, double %c6, i32 6
600 %r7 = insertelement <8 x double> %r6, double %c7, i32 7
604 define <8 x double> @buildvector_div_8f64(<8 x double> %a, <8 x double> %b) {
605 ; SSE-LABEL: @buildvector_div_8f64(
606 ; SSE-NEXT: [[TMP1:%.*]] = fdiv <8 x double> [[A:%.*]], [[B:%.*]]
607 ; SSE-NEXT: ret <8 x double> [[TMP1]]
609 ; SLM-LABEL: @buildvector_div_8f64(
610 ; SLM-NEXT: [[A0:%.*]] = extractelement <8 x double> [[A:%.*]], i32 0
611 ; SLM-NEXT: [[A1:%.*]] = extractelement <8 x double> [[A]], i32 1
612 ; SLM-NEXT: [[A2:%.*]] = extractelement <8 x double> [[A]], i32 2
613 ; SLM-NEXT: [[A3:%.*]] = extractelement <8 x double> [[A]], i32 3
614 ; SLM-NEXT: [[A4:%.*]] = extractelement <8 x double> [[A]], i32 4
615 ; SLM-NEXT: [[A5:%.*]] = extractelement <8 x double> [[A]], i32 5
616 ; SLM-NEXT: [[A6:%.*]] = extractelement <8 x double> [[A]], i32 6
617 ; SLM-NEXT: [[A7:%.*]] = extractelement <8 x double> [[A]], i32 7
618 ; SLM-NEXT: [[B0:%.*]] = extractelement <8 x double> [[B:%.*]], i32 0
619 ; SLM-NEXT: [[B1:%.*]] = extractelement <8 x double> [[B]], i32 1
620 ; SLM-NEXT: [[B2:%.*]] = extractelement <8 x double> [[B]], i32 2
621 ; SLM-NEXT: [[B3:%.*]] = extractelement <8 x double> [[B]], i32 3
622 ; SLM-NEXT: [[B4:%.*]] = extractelement <8 x double> [[B]], i32 4
623 ; SLM-NEXT: [[B5:%.*]] = extractelement <8 x double> [[B]], i32 5
624 ; SLM-NEXT: [[B6:%.*]] = extractelement <8 x double> [[B]], i32 6
625 ; SLM-NEXT: [[B7:%.*]] = extractelement <8 x double> [[B]], i32 7
626 ; SLM-NEXT: [[TMP1:%.*]] = insertelement <2 x double> poison, double [[A0]], i32 0
627 ; SLM-NEXT: [[TMP2:%.*]] = insertelement <2 x double> [[TMP1]], double [[A1]], i32 1
628 ; SLM-NEXT: [[TMP3:%.*]] = insertelement <2 x double> poison, double [[B0]], i32 0
629 ; SLM-NEXT: [[TMP4:%.*]] = insertelement <2 x double> [[TMP3]], double [[B1]], i32 1
630 ; SLM-NEXT: [[TMP5:%.*]] = fdiv <2 x double> [[TMP2]], [[TMP4]]
631 ; SLM-NEXT: [[TMP6:%.*]] = insertelement <2 x double> poison, double [[A2]], i32 0
632 ; SLM-NEXT: [[TMP7:%.*]] = insertelement <2 x double> [[TMP6]], double [[A3]], i32 1
633 ; SLM-NEXT: [[TMP8:%.*]] = insertelement <2 x double> poison, double [[B2]], i32 0
634 ; SLM-NEXT: [[TMP9:%.*]] = insertelement <2 x double> [[TMP8]], double [[B3]], i32 1
635 ; SLM-NEXT: [[TMP10:%.*]] = fdiv <2 x double> [[TMP7]], [[TMP9]]
636 ; SLM-NEXT: [[TMP11:%.*]] = insertelement <2 x double> poison, double [[A4]], i32 0
637 ; SLM-NEXT: [[TMP12:%.*]] = insertelement <2 x double> [[TMP11]], double [[A5]], i32 1
638 ; SLM-NEXT: [[TMP13:%.*]] = insertelement <2 x double> poison, double [[B4]], i32 0
639 ; SLM-NEXT: [[TMP14:%.*]] = insertelement <2 x double> [[TMP13]], double [[B5]], i32 1
640 ; SLM-NEXT: [[TMP15:%.*]] = fdiv <2 x double> [[TMP12]], [[TMP14]]
641 ; SLM-NEXT: [[TMP16:%.*]] = insertelement <2 x double> poison, double [[A6]], i32 0
642 ; SLM-NEXT: [[TMP17:%.*]] = insertelement <2 x double> [[TMP16]], double [[A7]], i32 1
643 ; SLM-NEXT: [[TMP18:%.*]] = insertelement <2 x double> poison, double [[B6]], i32 0
644 ; SLM-NEXT: [[TMP19:%.*]] = insertelement <2 x double> [[TMP18]], double [[B7]], i32 1
645 ; SLM-NEXT: [[TMP20:%.*]] = fdiv <2 x double> [[TMP17]], [[TMP19]]
646 ; SLM-NEXT: [[TMP21:%.*]] = shufflevector <2 x double> [[TMP5]], <2 x double> poison, <8 x i32> <i32 0, i32 1, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
647 ; SLM-NEXT: [[TMP22:%.*]] = shufflevector <2 x double> [[TMP10]], <2 x double> poison, <8 x i32> <i32 0, i32 1, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
648 ; SLM-NEXT: [[R31:%.*]] = shufflevector <8 x double> [[TMP21]], <8 x double> [[TMP22]], <8 x i32> <i32 0, i32 1, i32 8, i32 9, i32 4, i32 5, i32 6, i32 7>
649 ; SLM-NEXT: [[TMP23:%.*]] = shufflevector <2 x double> [[TMP15]], <2 x double> poison, <8 x i32> <i32 0, i32 1, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
650 ; SLM-NEXT: [[R52:%.*]] = shufflevector <8 x double> [[R31]], <8 x double> [[TMP23]], <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 8, i32 9, i32 6, i32 7>
651 ; SLM-NEXT: [[TMP24:%.*]] = shufflevector <2 x double> [[TMP20]], <2 x double> poison, <8 x i32> <i32 0, i32 1, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
652 ; SLM-NEXT: [[R73:%.*]] = shufflevector <8 x double> [[R52]], <8 x double> [[TMP24]], <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 8, i32 9>
653 ; SLM-NEXT: ret <8 x double> [[R73]]
655 ; AVX-LABEL: @buildvector_div_8f64(
656 ; AVX-NEXT: [[TMP1:%.*]] = fdiv <8 x double> [[A:%.*]], [[B:%.*]]
657 ; AVX-NEXT: ret <8 x double> [[TMP1]]
659 ; AVX512-LABEL: @buildvector_div_8f64(
660 ; AVX512-NEXT: [[TMP1:%.*]] = fdiv <8 x double> [[A:%.*]], [[B:%.*]]
661 ; AVX512-NEXT: ret <8 x double> [[TMP1]]
663 %a0 = extractelement <8 x double> %a, i32 0
664 %a1 = extractelement <8 x double> %a, i32 1
665 %a2 = extractelement <8 x double> %a, i32 2
666 %a3 = extractelement <8 x double> %a, i32 3
667 %a4 = extractelement <8 x double> %a, i32 4
668 %a5 = extractelement <8 x double> %a, i32 5
669 %a6 = extractelement <8 x double> %a, i32 6
670 %a7 = extractelement <8 x double> %a, i32 7
671 %b0 = extractelement <8 x double> %b, i32 0
672 %b1 = extractelement <8 x double> %b, i32 1
673 %b2 = extractelement <8 x double> %b, i32 2
674 %b3 = extractelement <8 x double> %b, i32 3
675 %b4 = extractelement <8 x double> %b, i32 4
676 %b5 = extractelement <8 x double> %b, i32 5
677 %b6 = extractelement <8 x double> %b, i32 6
678 %b7 = extractelement <8 x double> %b, i32 7
679 %c0 = fdiv double %a0, %b0
680 %c1 = fdiv double %a1, %b1
681 %c2 = fdiv double %a2, %b2
682 %c3 = fdiv double %a3, %b3
683 %c4 = fdiv double %a4, %b4
684 %c5 = fdiv double %a5, %b5
685 %c6 = fdiv double %a6, %b6
686 %c7 = fdiv double %a7, %b7
687 %r0 = insertelement <8 x double> poison, double %c0, i32 0
688 %r1 = insertelement <8 x double> %r0, double %c1, i32 1
689 %r2 = insertelement <8 x double> %r1, double %c2, i32 2
690 %r3 = insertelement <8 x double> %r2, double %c3, i32 3
691 %r4 = insertelement <8 x double> %r3, double %c4, i32 4
692 %r5 = insertelement <8 x double> %r4, double %c5, i32 5
693 %r6 = insertelement <8 x double> %r5, double %c6, i32 6
694 %r7 = insertelement <8 x double> %r6, double %c7, i32 7
698 define <16 x float> @buildvector_add_16f32(<16 x float> %a, <16 x float> %b) {
699 ; CHECK-LABEL: @buildvector_add_16f32(
700 ; CHECK-NEXT: [[TMP1:%.*]] = fadd <16 x float> [[A:%.*]], [[B:%.*]]
701 ; CHECK-NEXT: ret <16 x float> [[TMP1]]
703 %a0 = extractelement <16 x float> %a, i32 0
704 %a1 = extractelement <16 x float> %a, i32 1
705 %a2 = extractelement <16 x float> %a, i32 2
706 %a3 = extractelement <16 x float> %a, i32 3
707 %a4 = extractelement <16 x float> %a, i32 4
708 %a5 = extractelement <16 x float> %a, i32 5
709 %a6 = extractelement <16 x float> %a, i32 6
710 %a7 = extractelement <16 x float> %a, i32 7
711 %a8 = extractelement <16 x float> %a, i32 8
712 %a9 = extractelement <16 x float> %a, i32 9
713 %a10 = extractelement <16 x float> %a, i32 10
714 %a11 = extractelement <16 x float> %a, i32 11
715 %a12 = extractelement <16 x float> %a, i32 12
716 %a13 = extractelement <16 x float> %a, i32 13
717 %a14 = extractelement <16 x float> %a, i32 14
718 %a15 = extractelement <16 x float> %a, i32 15
719 %b0 = extractelement <16 x float> %b, i32 0
720 %b1 = extractelement <16 x float> %b, i32 1
721 %b2 = extractelement <16 x float> %b, i32 2
722 %b3 = extractelement <16 x float> %b, i32 3
723 %b4 = extractelement <16 x float> %b, i32 4
724 %b5 = extractelement <16 x float> %b, i32 5
725 %b6 = extractelement <16 x float> %b, i32 6
726 %b7 = extractelement <16 x float> %b, i32 7
727 %b8 = extractelement <16 x float> %b, i32 8
728 %b9 = extractelement <16 x float> %b, i32 9
729 %b10 = extractelement <16 x float> %b, i32 10
730 %b11 = extractelement <16 x float> %b, i32 11
731 %b12 = extractelement <16 x float> %b, i32 12
732 %b13 = extractelement <16 x float> %b, i32 13
733 %b14 = extractelement <16 x float> %b, i32 14
734 %b15 = extractelement <16 x float> %b, i32 15
735 %c0 = fadd float %a0 , %b0
736 %c1 = fadd float %a1 , %b1
737 %c2 = fadd float %a2 , %b2
738 %c3 = fadd float %a3 , %b3
739 %c4 = fadd float %a4 , %b4
740 %c5 = fadd float %a5 , %b5
741 %c6 = fadd float %a6 , %b6
742 %c7 = fadd float %a7 , %b7
743 %c8 = fadd float %a8 , %b8
744 %c9 = fadd float %a9 , %b9
745 %c10 = fadd float %a10, %b10
746 %c11 = fadd float %a11, %b11
747 %c12 = fadd float %a12, %b12
748 %c13 = fadd float %a13, %b13
749 %c14 = fadd float %a14, %b14
750 %c15 = fadd float %a15, %b15
751 %r0 = insertelement <16 x float> poison, float %c0 , i32 0
752 %r1 = insertelement <16 x float> %r0 , float %c1 , i32 1
753 %r2 = insertelement <16 x float> %r1 , float %c2 , i32 2
754 %r3 = insertelement <16 x float> %r2 , float %c3 , i32 3
755 %r4 = insertelement <16 x float> %r3 , float %c4 , i32 4
756 %r5 = insertelement <16 x float> %r4 , float %c5 , i32 5
757 %r6 = insertelement <16 x float> %r5 , float %c6 , i32 6
758 %r7 = insertelement <16 x float> %r6 , float %c7 , i32 7
759 %r8 = insertelement <16 x float> %r7 , float %c8 , i32 8
760 %r9 = insertelement <16 x float> %r8 , float %c9 , i32 9
761 %r10 = insertelement <16 x float> %r9 , float %c10, i32 10
762 %r11 = insertelement <16 x float> %r10, float %c11, i32 11
763 %r12 = insertelement <16 x float> %r11, float %c12, i32 12
764 %r13 = insertelement <16 x float> %r12, float %c13, i32 13
765 %r14 = insertelement <16 x float> %r13, float %c14, i32 14
766 %r15 = insertelement <16 x float> %r14, float %c15, i32 15
767 ret <16 x float> %r15
770 define <16 x float> @buildvector_sub_16f32(<16 x float> %a, <16 x float> %b) {
771 ; CHECK-LABEL: @buildvector_sub_16f32(
772 ; CHECK-NEXT: [[TMP1:%.*]] = fsub <16 x float> [[A:%.*]], [[B:%.*]]
773 ; CHECK-NEXT: ret <16 x float> [[TMP1]]
775 %a0 = extractelement <16 x float> %a, i32 0
776 %a1 = extractelement <16 x float> %a, i32 1
777 %a2 = extractelement <16 x float> %a, i32 2
778 %a3 = extractelement <16 x float> %a, i32 3
779 %a4 = extractelement <16 x float> %a, i32 4
780 %a5 = extractelement <16 x float> %a, i32 5
781 %a6 = extractelement <16 x float> %a, i32 6
782 %a7 = extractelement <16 x float> %a, i32 7
783 %a8 = extractelement <16 x float> %a, i32 8
784 %a9 = extractelement <16 x float> %a, i32 9
785 %a10 = extractelement <16 x float> %a, i32 10
786 %a11 = extractelement <16 x float> %a, i32 11
787 %a12 = extractelement <16 x float> %a, i32 12
788 %a13 = extractelement <16 x float> %a, i32 13
789 %a14 = extractelement <16 x float> %a, i32 14
790 %a15 = extractelement <16 x float> %a, i32 15
791 %b0 = extractelement <16 x float> %b, i32 0
792 %b1 = extractelement <16 x float> %b, i32 1
793 %b2 = extractelement <16 x float> %b, i32 2
794 %b3 = extractelement <16 x float> %b, i32 3
795 %b4 = extractelement <16 x float> %b, i32 4
796 %b5 = extractelement <16 x float> %b, i32 5
797 %b6 = extractelement <16 x float> %b, i32 6
798 %b7 = extractelement <16 x float> %b, i32 7
799 %b8 = extractelement <16 x float> %b, i32 8
800 %b9 = extractelement <16 x float> %b, i32 9
801 %b10 = extractelement <16 x float> %b, i32 10
802 %b11 = extractelement <16 x float> %b, i32 11
803 %b12 = extractelement <16 x float> %b, i32 12
804 %b13 = extractelement <16 x float> %b, i32 13
805 %b14 = extractelement <16 x float> %b, i32 14
806 %b15 = extractelement <16 x float> %b, i32 15
807 %c0 = fsub float %a0 , %b0
808 %c1 = fsub float %a1 , %b1
809 %c2 = fsub float %a2 , %b2
810 %c3 = fsub float %a3 , %b3
811 %c4 = fsub float %a4 , %b4
812 %c5 = fsub float %a5 , %b5
813 %c6 = fsub float %a6 , %b6
814 %c7 = fsub float %a7 , %b7
815 %c8 = fsub float %a8 , %b8
816 %c9 = fsub float %a9 , %b9
817 %c10 = fsub float %a10, %b10
818 %c11 = fsub float %a11, %b11
819 %c12 = fsub float %a12, %b12
820 %c13 = fsub float %a13, %b13
821 %c14 = fsub float %a14, %b14
822 %c15 = fsub float %a15, %b15
823 %r0 = insertelement <16 x float> poison, float %c0 , i32 0
824 %r1 = insertelement <16 x float> %r0 , float %c1 , i32 1
825 %r2 = insertelement <16 x float> %r1 , float %c2 , i32 2
826 %r3 = insertelement <16 x float> %r2 , float %c3 , i32 3
827 %r4 = insertelement <16 x float> %r3 , float %c4 , i32 4
828 %r5 = insertelement <16 x float> %r4 , float %c5 , i32 5
829 %r6 = insertelement <16 x float> %r5 , float %c6 , i32 6
830 %r7 = insertelement <16 x float> %r6 , float %c7 , i32 7
831 %r8 = insertelement <16 x float> %r7 , float %c8 , i32 8
832 %r9 = insertelement <16 x float> %r8 , float %c9 , i32 9
833 %r10 = insertelement <16 x float> %r9 , float %c10, i32 10
834 %r11 = insertelement <16 x float> %r10, float %c11, i32 11
835 %r12 = insertelement <16 x float> %r11, float %c12, i32 12
836 %r13 = insertelement <16 x float> %r12, float %c13, i32 13
837 %r14 = insertelement <16 x float> %r13, float %c14, i32 14
838 %r15 = insertelement <16 x float> %r14, float %c15, i32 15
839 ret <16 x float> %r15
842 define <16 x float> @buildvector_mul_16f32(<16 x float> %a, <16 x float> %b) {
843 ; CHECK-LABEL: @buildvector_mul_16f32(
844 ; CHECK-NEXT: [[TMP1:%.*]] = fmul <16 x float> [[A:%.*]], [[B:%.*]]
845 ; CHECK-NEXT: ret <16 x float> [[TMP1]]
847 %a0 = extractelement <16 x float> %a, i32 0
848 %a1 = extractelement <16 x float> %a, i32 1
849 %a2 = extractelement <16 x float> %a, i32 2
850 %a3 = extractelement <16 x float> %a, i32 3
851 %a4 = extractelement <16 x float> %a, i32 4
852 %a5 = extractelement <16 x float> %a, i32 5
853 %a6 = extractelement <16 x float> %a, i32 6
854 %a7 = extractelement <16 x float> %a, i32 7
855 %a8 = extractelement <16 x float> %a, i32 8
856 %a9 = extractelement <16 x float> %a, i32 9
857 %a10 = extractelement <16 x float> %a, i32 10
858 %a11 = extractelement <16 x float> %a, i32 11
859 %a12 = extractelement <16 x float> %a, i32 12
860 %a13 = extractelement <16 x float> %a, i32 13
861 %a14 = extractelement <16 x float> %a, i32 14
862 %a15 = extractelement <16 x float> %a, i32 15
863 %b0 = extractelement <16 x float> %b, i32 0
864 %b1 = extractelement <16 x float> %b, i32 1
865 %b2 = extractelement <16 x float> %b, i32 2
866 %b3 = extractelement <16 x float> %b, i32 3
867 %b4 = extractelement <16 x float> %b, i32 4
868 %b5 = extractelement <16 x float> %b, i32 5
869 %b6 = extractelement <16 x float> %b, i32 6
870 %b7 = extractelement <16 x float> %b, i32 7
871 %b8 = extractelement <16 x float> %b, i32 8
872 %b9 = extractelement <16 x float> %b, i32 9
873 %b10 = extractelement <16 x float> %b, i32 10
874 %b11 = extractelement <16 x float> %b, i32 11
875 %b12 = extractelement <16 x float> %b, i32 12
876 %b13 = extractelement <16 x float> %b, i32 13
877 %b14 = extractelement <16 x float> %b, i32 14
878 %b15 = extractelement <16 x float> %b, i32 15
879 %c0 = fmul float %a0 , %b0
880 %c1 = fmul float %a1 , %b1
881 %c2 = fmul float %a2 , %b2
882 %c3 = fmul float %a3 , %b3
883 %c4 = fmul float %a4 , %b4
884 %c5 = fmul float %a5 , %b5
885 %c6 = fmul float %a6 , %b6
886 %c7 = fmul float %a7 , %b7
887 %c8 = fmul float %a8 , %b8
888 %c9 = fmul float %a9 , %b9
889 %c10 = fmul float %a10, %b10
890 %c11 = fmul float %a11, %b11
891 %c12 = fmul float %a12, %b12
892 %c13 = fmul float %a13, %b13
893 %c14 = fmul float %a14, %b14
894 %c15 = fmul float %a15, %b15
895 %r0 = insertelement <16 x float> poison, float %c0 , i32 0
896 %r1 = insertelement <16 x float> %r0 , float %c1 , i32 1
897 %r2 = insertelement <16 x float> %r1 , float %c2 , i32 2
898 %r3 = insertelement <16 x float> %r2 , float %c3 , i32 3
899 %r4 = insertelement <16 x float> %r3 , float %c4 , i32 4
900 %r5 = insertelement <16 x float> %r4 , float %c5 , i32 5
901 %r6 = insertelement <16 x float> %r5 , float %c6 , i32 6
902 %r7 = insertelement <16 x float> %r6 , float %c7 , i32 7
903 %r8 = insertelement <16 x float> %r7 , float %c8 , i32 8
904 %r9 = insertelement <16 x float> %r8 , float %c9 , i32 9
905 %r10 = insertelement <16 x float> %r9 , float %c10, i32 10
906 %r11 = insertelement <16 x float> %r10, float %c11, i32 11
907 %r12 = insertelement <16 x float> %r11, float %c12, i32 12
908 %r13 = insertelement <16 x float> %r12, float %c13, i32 13
909 %r14 = insertelement <16 x float> %r13, float %c14, i32 14
910 %r15 = insertelement <16 x float> %r14, float %c15, i32 15
911 ret <16 x float> %r15
914 define <16 x float> @buildvector_div_16f32(<16 x float> %a, <16 x float> %b) {
915 ; CHECK-LABEL: @buildvector_div_16f32(
916 ; CHECK-NEXT: [[TMP1:%.*]] = fdiv <16 x float> [[A:%.*]], [[B:%.*]]
917 ; CHECK-NEXT: ret <16 x float> [[TMP1]]
919 %a0 = extractelement <16 x float> %a, i32 0
920 %a1 = extractelement <16 x float> %a, i32 1
921 %a2 = extractelement <16 x float> %a, i32 2
922 %a3 = extractelement <16 x float> %a, i32 3
923 %a4 = extractelement <16 x float> %a, i32 4
924 %a5 = extractelement <16 x float> %a, i32 5
925 %a6 = extractelement <16 x float> %a, i32 6
926 %a7 = extractelement <16 x float> %a, i32 7
927 %a8 = extractelement <16 x float> %a, i32 8
928 %a9 = extractelement <16 x float> %a, i32 9
929 %a10 = extractelement <16 x float> %a, i32 10
930 %a11 = extractelement <16 x float> %a, i32 11
931 %a12 = extractelement <16 x float> %a, i32 12
932 %a13 = extractelement <16 x float> %a, i32 13
933 %a14 = extractelement <16 x float> %a, i32 14
934 %a15 = extractelement <16 x float> %a, i32 15
935 %b0 = extractelement <16 x float> %b, i32 0
936 %b1 = extractelement <16 x float> %b, i32 1
937 %b2 = extractelement <16 x float> %b, i32 2
938 %b3 = extractelement <16 x float> %b, i32 3
939 %b4 = extractelement <16 x float> %b, i32 4
940 %b5 = extractelement <16 x float> %b, i32 5
941 %b6 = extractelement <16 x float> %b, i32 6
942 %b7 = extractelement <16 x float> %b, i32 7
943 %b8 = extractelement <16 x float> %b, i32 8
944 %b9 = extractelement <16 x float> %b, i32 9
945 %b10 = extractelement <16 x float> %b, i32 10
946 %b11 = extractelement <16 x float> %b, i32 11
947 %b12 = extractelement <16 x float> %b, i32 12
948 %b13 = extractelement <16 x float> %b, i32 13
949 %b14 = extractelement <16 x float> %b, i32 14
950 %b15 = extractelement <16 x float> %b, i32 15
951 %c0 = fdiv float %a0 , %b0
952 %c1 = fdiv float %a1 , %b1
953 %c2 = fdiv float %a2 , %b2
954 %c3 = fdiv float %a3 , %b3
955 %c4 = fdiv float %a4 , %b4
956 %c5 = fdiv float %a5 , %b5
957 %c6 = fdiv float %a6 , %b6
958 %c7 = fdiv float %a7 , %b7
959 %c8 = fdiv float %a8 , %b8
960 %c9 = fdiv float %a9 , %b9
961 %c10 = fdiv float %a10, %b10
962 %c11 = fdiv float %a11, %b11
963 %c12 = fdiv float %a12, %b12
964 %c13 = fdiv float %a13, %b13
965 %c14 = fdiv float %a14, %b14
966 %c15 = fdiv float %a15, %b15
967 %r0 = insertelement <16 x float> poison, float %c0 , i32 0
968 %r1 = insertelement <16 x float> %r0 , float %c1 , i32 1
969 %r2 = insertelement <16 x float> %r1 , float %c2 , i32 2
970 %r3 = insertelement <16 x float> %r2 , float %c3 , i32 3
971 %r4 = insertelement <16 x float> %r3 , float %c4 , i32 4
972 %r5 = insertelement <16 x float> %r4 , float %c5 , i32 5
973 %r6 = insertelement <16 x float> %r5 , float %c6 , i32 6
974 %r7 = insertelement <16 x float> %r6 , float %c7 , i32 7
975 %r8 = insertelement <16 x float> %r7 , float %c8 , i32 8
976 %r9 = insertelement <16 x float> %r8 , float %c9 , i32 9
977 %r10 = insertelement <16 x float> %r9 , float %c10, i32 10
978 %r11 = insertelement <16 x float> %r10, float %c11, i32 11
979 %r12 = insertelement <16 x float> %r11, float %c12, i32 12
980 %r13 = insertelement <16 x float> %r12, float %c13, i32 13
981 %r14 = insertelement <16 x float> %r13, float %c14, i32 14
982 %r15 = insertelement <16 x float> %r14, float %c15, i32 15
983 ret <16 x float> %r15