1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -mtriple=x86_64-unknown -passes=slp-vectorizer -S | FileCheck %s --check-prefixes=CHECK,SSE
3 ; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=slm -passes=slp-vectorizer -S | FileCheck %s --check-prefixes=CHECK,SLM
4 ; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=corei7-avx -mattr=-prefer-128-bit -passes=slp-vectorizer -S | FileCheck %s --check-prefixes=CHECK,AVX
5 ; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=corei7-avx -mattr=+prefer-128-bit -passes=slp-vectorizer -S | FileCheck %s --check-prefixes=CHECK,SSE
6 ; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=core-avx2 -mattr=-prefer-128-bit -passes=slp-vectorizer -S | FileCheck %s --check-prefixes=CHECK,AVX
7 ; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=core-avx2 -mattr=+prefer-128-bit -passes=slp-vectorizer -S | FileCheck %s --check-prefixes=CHECK,SSE
8 ; RUN: opt < %s -mtriple=x86_64-unknown -mcpu=skx -passes=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: [[TMP1:%.*]] = shufflevector <8 x double> [[A:%.*]], <8 x double> poison, <2 x i32> <i32 0, i32 1>
611 ; SLM-NEXT: [[TMP2:%.*]] = shufflevector <8 x double> [[B:%.*]], <8 x double> poison, <2 x i32> <i32 0, i32 1>
612 ; SLM-NEXT: [[TMP3:%.*]] = fdiv <2 x double> [[TMP1]], [[TMP2]]
613 ; SLM-NEXT: [[TMP4:%.*]] = shufflevector <8 x double> [[A]], <8 x double> poison, <2 x i32> <i32 2, i32 3>
614 ; SLM-NEXT: [[TMP5:%.*]] = shufflevector <8 x double> [[B]], <8 x double> poison, <2 x i32> <i32 2, i32 3>
615 ; SLM-NEXT: [[TMP6:%.*]] = fdiv <2 x double> [[TMP4]], [[TMP5]]
616 ; SLM-NEXT: [[TMP7:%.*]] = shufflevector <8 x double> [[A]], <8 x double> poison, <2 x i32> <i32 4, i32 5>
617 ; SLM-NEXT: [[TMP8:%.*]] = shufflevector <8 x double> [[B]], <8 x double> poison, <2 x i32> <i32 4, i32 5>
618 ; SLM-NEXT: [[TMP9:%.*]] = fdiv <2 x double> [[TMP7]], [[TMP8]]
619 ; SLM-NEXT: [[TMP10:%.*]] = shufflevector <8 x double> [[A]], <8 x double> poison, <2 x i32> <i32 6, i32 7>
620 ; SLM-NEXT: [[TMP11:%.*]] = shufflevector <8 x double> [[B]], <8 x double> poison, <2 x i32> <i32 6, i32 7>
621 ; SLM-NEXT: [[TMP12:%.*]] = fdiv <2 x double> [[TMP10]], [[TMP11]]
622 ; SLM-NEXT: [[TMP13:%.*]] = shufflevector <2 x double> [[TMP3]], <2 x double> poison, <8 x i32> <i32 0, i32 1, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison>
623 ; SLM-NEXT: [[TMP14:%.*]] = shufflevector <2 x double> [[TMP6]], <2 x double> poison, <8 x i32> <i32 0, i32 1, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison>
624 ; SLM-NEXT: [[R31:%.*]] = shufflevector <8 x double> [[TMP13]], <8 x double> [[TMP14]], <8 x i32> <i32 0, i32 1, i32 8, i32 9, i32 4, i32 5, i32 6, i32 7>
625 ; SLM-NEXT: [[TMP15:%.*]] = shufflevector <2 x double> [[TMP9]], <2 x double> poison, <8 x i32> <i32 0, i32 1, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison>
626 ; SLM-NEXT: [[R52:%.*]] = shufflevector <8 x double> [[R31]], <8 x double> [[TMP15]], <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 8, i32 9, i32 6, i32 7>
627 ; SLM-NEXT: [[TMP16:%.*]] = shufflevector <2 x double> [[TMP12]], <2 x double> poison, <8 x i32> <i32 0, i32 1, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison>
628 ; SLM-NEXT: [[R73:%.*]] = shufflevector <8 x double> [[R52]], <8 x double> [[TMP16]], <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 8, i32 9>
629 ; SLM-NEXT: ret <8 x double> [[R73]]
631 ; AVX-LABEL: @buildvector_div_8f64(
632 ; AVX-NEXT: [[TMP1:%.*]] = fdiv <8 x double> [[A:%.*]], [[B:%.*]]
633 ; AVX-NEXT: ret <8 x double> [[TMP1]]
635 ; AVX512-LABEL: @buildvector_div_8f64(
636 ; AVX512-NEXT: [[TMP1:%.*]] = fdiv <8 x double> [[A:%.*]], [[B:%.*]]
637 ; AVX512-NEXT: ret <8 x double> [[TMP1]]
639 %a0 = extractelement <8 x double> %a, i32 0
640 %a1 = extractelement <8 x double> %a, i32 1
641 %a2 = extractelement <8 x double> %a, i32 2
642 %a3 = extractelement <8 x double> %a, i32 3
643 %a4 = extractelement <8 x double> %a, i32 4
644 %a5 = extractelement <8 x double> %a, i32 5
645 %a6 = extractelement <8 x double> %a, i32 6
646 %a7 = extractelement <8 x double> %a, i32 7
647 %b0 = extractelement <8 x double> %b, i32 0
648 %b1 = extractelement <8 x double> %b, i32 1
649 %b2 = extractelement <8 x double> %b, i32 2
650 %b3 = extractelement <8 x double> %b, i32 3
651 %b4 = extractelement <8 x double> %b, i32 4
652 %b5 = extractelement <8 x double> %b, i32 5
653 %b6 = extractelement <8 x double> %b, i32 6
654 %b7 = extractelement <8 x double> %b, i32 7
655 %c0 = fdiv double %a0, %b0
656 %c1 = fdiv double %a1, %b1
657 %c2 = fdiv double %a2, %b2
658 %c3 = fdiv double %a3, %b3
659 %c4 = fdiv double %a4, %b4
660 %c5 = fdiv double %a5, %b5
661 %c6 = fdiv double %a6, %b6
662 %c7 = fdiv double %a7, %b7
663 %r0 = insertelement <8 x double> poison, double %c0, i32 0
664 %r1 = insertelement <8 x double> %r0, double %c1, i32 1
665 %r2 = insertelement <8 x double> %r1, double %c2, i32 2
666 %r3 = insertelement <8 x double> %r2, double %c3, i32 3
667 %r4 = insertelement <8 x double> %r3, double %c4, i32 4
668 %r5 = insertelement <8 x double> %r4, double %c5, i32 5
669 %r6 = insertelement <8 x double> %r5, double %c6, i32 6
670 %r7 = insertelement <8 x double> %r6, double %c7, i32 7
674 define <16 x float> @buildvector_add_16f32(<16 x float> %a, <16 x float> %b) {
675 ; CHECK-LABEL: @buildvector_add_16f32(
676 ; CHECK-NEXT: [[TMP1:%.*]] = fadd <16 x float> [[A:%.*]], [[B:%.*]]
677 ; CHECK-NEXT: ret <16 x float> [[TMP1]]
679 %a0 = extractelement <16 x float> %a, i32 0
680 %a1 = extractelement <16 x float> %a, i32 1
681 %a2 = extractelement <16 x float> %a, i32 2
682 %a3 = extractelement <16 x float> %a, i32 3
683 %a4 = extractelement <16 x float> %a, i32 4
684 %a5 = extractelement <16 x float> %a, i32 5
685 %a6 = extractelement <16 x float> %a, i32 6
686 %a7 = extractelement <16 x float> %a, i32 7
687 %a8 = extractelement <16 x float> %a, i32 8
688 %a9 = extractelement <16 x float> %a, i32 9
689 %a10 = extractelement <16 x float> %a, i32 10
690 %a11 = extractelement <16 x float> %a, i32 11
691 %a12 = extractelement <16 x float> %a, i32 12
692 %a13 = extractelement <16 x float> %a, i32 13
693 %a14 = extractelement <16 x float> %a, i32 14
694 %a15 = extractelement <16 x float> %a, i32 15
695 %b0 = extractelement <16 x float> %b, i32 0
696 %b1 = extractelement <16 x float> %b, i32 1
697 %b2 = extractelement <16 x float> %b, i32 2
698 %b3 = extractelement <16 x float> %b, i32 3
699 %b4 = extractelement <16 x float> %b, i32 4
700 %b5 = extractelement <16 x float> %b, i32 5
701 %b6 = extractelement <16 x float> %b, i32 6
702 %b7 = extractelement <16 x float> %b, i32 7
703 %b8 = extractelement <16 x float> %b, i32 8
704 %b9 = extractelement <16 x float> %b, i32 9
705 %b10 = extractelement <16 x float> %b, i32 10
706 %b11 = extractelement <16 x float> %b, i32 11
707 %b12 = extractelement <16 x float> %b, i32 12
708 %b13 = extractelement <16 x float> %b, i32 13
709 %b14 = extractelement <16 x float> %b, i32 14
710 %b15 = extractelement <16 x float> %b, i32 15
711 %c0 = fadd float %a0 , %b0
712 %c1 = fadd float %a1 , %b1
713 %c2 = fadd float %a2 , %b2
714 %c3 = fadd float %a3 , %b3
715 %c4 = fadd float %a4 , %b4
716 %c5 = fadd float %a5 , %b5
717 %c6 = fadd float %a6 , %b6
718 %c7 = fadd float %a7 , %b7
719 %c8 = fadd float %a8 , %b8
720 %c9 = fadd float %a9 , %b9
721 %c10 = fadd float %a10, %b10
722 %c11 = fadd float %a11, %b11
723 %c12 = fadd float %a12, %b12
724 %c13 = fadd float %a13, %b13
725 %c14 = fadd float %a14, %b14
726 %c15 = fadd float %a15, %b15
727 %r0 = insertelement <16 x float> poison, float %c0 , i32 0
728 %r1 = insertelement <16 x float> %r0 , float %c1 , i32 1
729 %r2 = insertelement <16 x float> %r1 , float %c2 , i32 2
730 %r3 = insertelement <16 x float> %r2 , float %c3 , i32 3
731 %r4 = insertelement <16 x float> %r3 , float %c4 , i32 4
732 %r5 = insertelement <16 x float> %r4 , float %c5 , i32 5
733 %r6 = insertelement <16 x float> %r5 , float %c6 , i32 6
734 %r7 = insertelement <16 x float> %r6 , float %c7 , i32 7
735 %r8 = insertelement <16 x float> %r7 , float %c8 , i32 8
736 %r9 = insertelement <16 x float> %r8 , float %c9 , i32 9
737 %r10 = insertelement <16 x float> %r9 , float %c10, i32 10
738 %r11 = insertelement <16 x float> %r10, float %c11, i32 11
739 %r12 = insertelement <16 x float> %r11, float %c12, i32 12
740 %r13 = insertelement <16 x float> %r12, float %c13, i32 13
741 %r14 = insertelement <16 x float> %r13, float %c14, i32 14
742 %r15 = insertelement <16 x float> %r14, float %c15, i32 15
743 ret <16 x float> %r15
746 define <16 x float> @buildvector_sub_16f32(<16 x float> %a, <16 x float> %b) {
747 ; CHECK-LABEL: @buildvector_sub_16f32(
748 ; CHECK-NEXT: [[TMP1:%.*]] = fsub <16 x float> [[A:%.*]], [[B:%.*]]
749 ; CHECK-NEXT: ret <16 x float> [[TMP1]]
751 %a0 = extractelement <16 x float> %a, i32 0
752 %a1 = extractelement <16 x float> %a, i32 1
753 %a2 = extractelement <16 x float> %a, i32 2
754 %a3 = extractelement <16 x float> %a, i32 3
755 %a4 = extractelement <16 x float> %a, i32 4
756 %a5 = extractelement <16 x float> %a, i32 5
757 %a6 = extractelement <16 x float> %a, i32 6
758 %a7 = extractelement <16 x float> %a, i32 7
759 %a8 = extractelement <16 x float> %a, i32 8
760 %a9 = extractelement <16 x float> %a, i32 9
761 %a10 = extractelement <16 x float> %a, i32 10
762 %a11 = extractelement <16 x float> %a, i32 11
763 %a12 = extractelement <16 x float> %a, i32 12
764 %a13 = extractelement <16 x float> %a, i32 13
765 %a14 = extractelement <16 x float> %a, i32 14
766 %a15 = extractelement <16 x float> %a, i32 15
767 %b0 = extractelement <16 x float> %b, i32 0
768 %b1 = extractelement <16 x float> %b, i32 1
769 %b2 = extractelement <16 x float> %b, i32 2
770 %b3 = extractelement <16 x float> %b, i32 3
771 %b4 = extractelement <16 x float> %b, i32 4
772 %b5 = extractelement <16 x float> %b, i32 5
773 %b6 = extractelement <16 x float> %b, i32 6
774 %b7 = extractelement <16 x float> %b, i32 7
775 %b8 = extractelement <16 x float> %b, i32 8
776 %b9 = extractelement <16 x float> %b, i32 9
777 %b10 = extractelement <16 x float> %b, i32 10
778 %b11 = extractelement <16 x float> %b, i32 11
779 %b12 = extractelement <16 x float> %b, i32 12
780 %b13 = extractelement <16 x float> %b, i32 13
781 %b14 = extractelement <16 x float> %b, i32 14
782 %b15 = extractelement <16 x float> %b, i32 15
783 %c0 = fsub float %a0 , %b0
784 %c1 = fsub float %a1 , %b1
785 %c2 = fsub float %a2 , %b2
786 %c3 = fsub float %a3 , %b3
787 %c4 = fsub float %a4 , %b4
788 %c5 = fsub float %a5 , %b5
789 %c6 = fsub float %a6 , %b6
790 %c7 = fsub float %a7 , %b7
791 %c8 = fsub float %a8 , %b8
792 %c9 = fsub float %a9 , %b9
793 %c10 = fsub float %a10, %b10
794 %c11 = fsub float %a11, %b11
795 %c12 = fsub float %a12, %b12
796 %c13 = fsub float %a13, %b13
797 %c14 = fsub float %a14, %b14
798 %c15 = fsub float %a15, %b15
799 %r0 = insertelement <16 x float> poison, float %c0 , i32 0
800 %r1 = insertelement <16 x float> %r0 , float %c1 , i32 1
801 %r2 = insertelement <16 x float> %r1 , float %c2 , i32 2
802 %r3 = insertelement <16 x float> %r2 , float %c3 , i32 3
803 %r4 = insertelement <16 x float> %r3 , float %c4 , i32 4
804 %r5 = insertelement <16 x float> %r4 , float %c5 , i32 5
805 %r6 = insertelement <16 x float> %r5 , float %c6 , i32 6
806 %r7 = insertelement <16 x float> %r6 , float %c7 , i32 7
807 %r8 = insertelement <16 x float> %r7 , float %c8 , i32 8
808 %r9 = insertelement <16 x float> %r8 , float %c9 , i32 9
809 %r10 = insertelement <16 x float> %r9 , float %c10, i32 10
810 %r11 = insertelement <16 x float> %r10, float %c11, i32 11
811 %r12 = insertelement <16 x float> %r11, float %c12, i32 12
812 %r13 = insertelement <16 x float> %r12, float %c13, i32 13
813 %r14 = insertelement <16 x float> %r13, float %c14, i32 14
814 %r15 = insertelement <16 x float> %r14, float %c15, i32 15
815 ret <16 x float> %r15
818 define <16 x float> @buildvector_mul_16f32(<16 x float> %a, <16 x float> %b) {
819 ; CHECK-LABEL: @buildvector_mul_16f32(
820 ; CHECK-NEXT: [[TMP1:%.*]] = fmul <16 x float> [[A:%.*]], [[B:%.*]]
821 ; CHECK-NEXT: ret <16 x float> [[TMP1]]
823 %a0 = extractelement <16 x float> %a, i32 0
824 %a1 = extractelement <16 x float> %a, i32 1
825 %a2 = extractelement <16 x float> %a, i32 2
826 %a3 = extractelement <16 x float> %a, i32 3
827 %a4 = extractelement <16 x float> %a, i32 4
828 %a5 = extractelement <16 x float> %a, i32 5
829 %a6 = extractelement <16 x float> %a, i32 6
830 %a7 = extractelement <16 x float> %a, i32 7
831 %a8 = extractelement <16 x float> %a, i32 8
832 %a9 = extractelement <16 x float> %a, i32 9
833 %a10 = extractelement <16 x float> %a, i32 10
834 %a11 = extractelement <16 x float> %a, i32 11
835 %a12 = extractelement <16 x float> %a, i32 12
836 %a13 = extractelement <16 x float> %a, i32 13
837 %a14 = extractelement <16 x float> %a, i32 14
838 %a15 = extractelement <16 x float> %a, i32 15
839 %b0 = extractelement <16 x float> %b, i32 0
840 %b1 = extractelement <16 x float> %b, i32 1
841 %b2 = extractelement <16 x float> %b, i32 2
842 %b3 = extractelement <16 x float> %b, i32 3
843 %b4 = extractelement <16 x float> %b, i32 4
844 %b5 = extractelement <16 x float> %b, i32 5
845 %b6 = extractelement <16 x float> %b, i32 6
846 %b7 = extractelement <16 x float> %b, i32 7
847 %b8 = extractelement <16 x float> %b, i32 8
848 %b9 = extractelement <16 x float> %b, i32 9
849 %b10 = extractelement <16 x float> %b, i32 10
850 %b11 = extractelement <16 x float> %b, i32 11
851 %b12 = extractelement <16 x float> %b, i32 12
852 %b13 = extractelement <16 x float> %b, i32 13
853 %b14 = extractelement <16 x float> %b, i32 14
854 %b15 = extractelement <16 x float> %b, i32 15
855 %c0 = fmul float %a0 , %b0
856 %c1 = fmul float %a1 , %b1
857 %c2 = fmul float %a2 , %b2
858 %c3 = fmul float %a3 , %b3
859 %c4 = fmul float %a4 , %b4
860 %c5 = fmul float %a5 , %b5
861 %c6 = fmul float %a6 , %b6
862 %c7 = fmul float %a7 , %b7
863 %c8 = fmul float %a8 , %b8
864 %c9 = fmul float %a9 , %b9
865 %c10 = fmul float %a10, %b10
866 %c11 = fmul float %a11, %b11
867 %c12 = fmul float %a12, %b12
868 %c13 = fmul float %a13, %b13
869 %c14 = fmul float %a14, %b14
870 %c15 = fmul float %a15, %b15
871 %r0 = insertelement <16 x float> poison, float %c0 , i32 0
872 %r1 = insertelement <16 x float> %r0 , float %c1 , i32 1
873 %r2 = insertelement <16 x float> %r1 , float %c2 , i32 2
874 %r3 = insertelement <16 x float> %r2 , float %c3 , i32 3
875 %r4 = insertelement <16 x float> %r3 , float %c4 , i32 4
876 %r5 = insertelement <16 x float> %r4 , float %c5 , i32 5
877 %r6 = insertelement <16 x float> %r5 , float %c6 , i32 6
878 %r7 = insertelement <16 x float> %r6 , float %c7 , i32 7
879 %r8 = insertelement <16 x float> %r7 , float %c8 , i32 8
880 %r9 = insertelement <16 x float> %r8 , float %c9 , i32 9
881 %r10 = insertelement <16 x float> %r9 , float %c10, i32 10
882 %r11 = insertelement <16 x float> %r10, float %c11, i32 11
883 %r12 = insertelement <16 x float> %r11, float %c12, i32 12
884 %r13 = insertelement <16 x float> %r12, float %c13, i32 13
885 %r14 = insertelement <16 x float> %r13, float %c14, i32 14
886 %r15 = insertelement <16 x float> %r14, float %c15, i32 15
887 ret <16 x float> %r15
890 define <16 x float> @buildvector_div_16f32(<16 x float> %a, <16 x float> %b) {
891 ; CHECK-LABEL: @buildvector_div_16f32(
892 ; CHECK-NEXT: [[TMP1:%.*]] = fdiv <16 x float> [[A:%.*]], [[B:%.*]]
893 ; CHECK-NEXT: ret <16 x float> [[TMP1]]
895 %a0 = extractelement <16 x float> %a, i32 0
896 %a1 = extractelement <16 x float> %a, i32 1
897 %a2 = extractelement <16 x float> %a, i32 2
898 %a3 = extractelement <16 x float> %a, i32 3
899 %a4 = extractelement <16 x float> %a, i32 4
900 %a5 = extractelement <16 x float> %a, i32 5
901 %a6 = extractelement <16 x float> %a, i32 6
902 %a7 = extractelement <16 x float> %a, i32 7
903 %a8 = extractelement <16 x float> %a, i32 8
904 %a9 = extractelement <16 x float> %a, i32 9
905 %a10 = extractelement <16 x float> %a, i32 10
906 %a11 = extractelement <16 x float> %a, i32 11
907 %a12 = extractelement <16 x float> %a, i32 12
908 %a13 = extractelement <16 x float> %a, i32 13
909 %a14 = extractelement <16 x float> %a, i32 14
910 %a15 = extractelement <16 x float> %a, i32 15
911 %b0 = extractelement <16 x float> %b, i32 0
912 %b1 = extractelement <16 x float> %b, i32 1
913 %b2 = extractelement <16 x float> %b, i32 2
914 %b3 = extractelement <16 x float> %b, i32 3
915 %b4 = extractelement <16 x float> %b, i32 4
916 %b5 = extractelement <16 x float> %b, i32 5
917 %b6 = extractelement <16 x float> %b, i32 6
918 %b7 = extractelement <16 x float> %b, i32 7
919 %b8 = extractelement <16 x float> %b, i32 8
920 %b9 = extractelement <16 x float> %b, i32 9
921 %b10 = extractelement <16 x float> %b, i32 10
922 %b11 = extractelement <16 x float> %b, i32 11
923 %b12 = extractelement <16 x float> %b, i32 12
924 %b13 = extractelement <16 x float> %b, i32 13
925 %b14 = extractelement <16 x float> %b, i32 14
926 %b15 = extractelement <16 x float> %b, i32 15
927 %c0 = fdiv float %a0 , %b0
928 %c1 = fdiv float %a1 , %b1
929 %c2 = fdiv float %a2 , %b2
930 %c3 = fdiv float %a3 , %b3
931 %c4 = fdiv float %a4 , %b4
932 %c5 = fdiv float %a5 , %b5
933 %c6 = fdiv float %a6 , %b6
934 %c7 = fdiv float %a7 , %b7
935 %c8 = fdiv float %a8 , %b8
936 %c9 = fdiv float %a9 , %b9
937 %c10 = fdiv float %a10, %b10
938 %c11 = fdiv float %a11, %b11
939 %c12 = fdiv float %a12, %b12
940 %c13 = fdiv float %a13, %b13
941 %c14 = fdiv float %a14, %b14
942 %c15 = fdiv float %a15, %b15
943 %r0 = insertelement <16 x float> poison, float %c0 , i32 0
944 %r1 = insertelement <16 x float> %r0 , float %c1 , i32 1
945 %r2 = insertelement <16 x float> %r1 , float %c2 , i32 2
946 %r3 = insertelement <16 x float> %r2 , float %c3 , i32 3
947 %r4 = insertelement <16 x float> %r3 , float %c4 , i32 4
948 %r5 = insertelement <16 x float> %r4 , float %c5 , i32 5
949 %r6 = insertelement <16 x float> %r5 , float %c6 , i32 6
950 %r7 = insertelement <16 x float> %r6 , float %c7 , i32 7
951 %r8 = insertelement <16 x float> %r7 , float %c8 , i32 8
952 %r9 = insertelement <16 x float> %r8 , float %c9 , i32 9
953 %r10 = insertelement <16 x float> %r9 , float %c10, i32 10
954 %r11 = insertelement <16 x float> %r10, float %c11, i32 11
955 %r12 = insertelement <16 x float> %r11, float %c12, i32 12
956 %r13 = insertelement <16 x float> %r12, float %c13, i32 13
957 %r14 = insertelement <16 x float> %r13, float %c14, i32 14
958 %r15 = insertelement <16 x float> %r14, float %c15, i32 15
959 ret <16 x float> %r15