1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -verify-machineinstrs -mtriple=arm64-none-linux-gnu -mattr=+neon | FileCheck %s
5 %struct.uint8x16x2_t = type { [2 x <16 x i8>] }
6 %struct.poly8x16x2_t = type { [2 x <16 x i8>] }
7 %struct.uint8x16x3_t = type { [3 x <16 x i8>] }
8 %struct.int8x16x2_t = type { [2 x <16 x i8>] }
9 %struct.int16x8x2_t = type { [2 x <8 x i16>] }
10 %struct.int32x4x2_t = type { [2 x <4 x i32>] }
11 %struct.int64x2x2_t = type { [2 x <2 x i64>] }
12 %struct.float32x4x2_t = type { [2 x <4 x float>] }
13 %struct.float64x2x2_t = type { [2 x <2 x double>] }
14 %struct.int8x8x2_t = type { [2 x <8 x i8>] }
15 %struct.int16x4x2_t = type { [2 x <4 x i16>] }
16 %struct.int32x2x2_t = type { [2 x <2 x i32>] }
17 %struct.int64x1x2_t = type { [2 x <1 x i64>] }
18 %struct.float32x2x2_t = type { [2 x <2 x float>] }
19 %struct.float64x1x2_t = type { [2 x <1 x double>] }
20 %struct.int8x16x3_t = type { [3 x <16 x i8>] }
21 %struct.int16x8x3_t = type { [3 x <8 x i16>] }
22 %struct.int32x4x3_t = type { [3 x <4 x i32>] }
23 %struct.int64x2x3_t = type { [3 x <2 x i64>] }
24 %struct.float32x4x3_t = type { [3 x <4 x float>] }
25 %struct.float64x2x3_t = type { [3 x <2 x double>] }
26 %struct.int8x8x3_t = type { [3 x <8 x i8>] }
27 %struct.int16x4x3_t = type { [3 x <4 x i16>] }
28 %struct.int32x2x3_t = type { [3 x <2 x i32>] }
29 %struct.int64x1x3_t = type { [3 x <1 x i64>] }
30 %struct.float32x2x3_t = type { [3 x <2 x float>] }
31 %struct.float64x1x3_t = type { [3 x <1 x double>] }
32 %struct.int8x16x4_t = type { [4 x <16 x i8>] }
33 %struct.int16x8x4_t = type { [4 x <8 x i16>] }
34 %struct.int32x4x4_t = type { [4 x <4 x i32>] }
35 %struct.int64x2x4_t = type { [4 x <2 x i64>] }
36 %struct.float32x4x4_t = type { [4 x <4 x float>] }
37 %struct.float64x2x4_t = type { [4 x <2 x double>] }
38 %struct.int8x8x4_t = type { [4 x <8 x i8>] }
39 %struct.int16x4x4_t = type { [4 x <4 x i16>] }
40 %struct.int32x2x4_t = type { [4 x <2 x i32>] }
41 %struct.int64x1x4_t = type { [4 x <1 x i64>] }
42 %struct.float32x2x4_t = type { [4 x <2 x float>] }
43 %struct.float64x1x4_t = type { [4 x <1 x double>] }
45 define <16 x i8> @test_ld_from_poll_v16i8(<16 x i8> %a) {
46 ; CHECK-LABEL: test_ld_from_poll_v16i8:
47 ; CHECK: // %bb.0: // %entry
48 ; CHECK-NEXT: adrp x8, .LCPI0_0
49 ; CHECK-NEXT: ldr q1, [x8, :lo12:.LCPI0_0]
50 ; CHECK-NEXT: add v0.16b, v0.16b, v1.16b
53 %b = add <16 x i8> %a, <i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 8, i8 9, i8 10, i8 11, i8 2, i8 13, i8 14, i8 15, i8 16>
57 define <8 x i16> @test_ld_from_poll_v8i16(<8 x i16> %a) {
58 ; CHECK-LABEL: test_ld_from_poll_v8i16:
59 ; CHECK: // %bb.0: // %entry
60 ; CHECK-NEXT: adrp x8, .LCPI1_0
61 ; CHECK-NEXT: ldr q1, [x8, :lo12:.LCPI1_0]
62 ; CHECK-NEXT: add v0.8h, v0.8h, v1.8h
65 %b = add <8 x i16> %a, <i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8>
69 define <4 x i32> @test_ld_from_poll_v4i32(<4 x i32> %a) {
70 ; CHECK-LABEL: test_ld_from_poll_v4i32:
71 ; CHECK: // %bb.0: // %entry
72 ; CHECK-NEXT: adrp x8, .LCPI2_0
73 ; CHECK-NEXT: ldr q1, [x8, :lo12:.LCPI2_0]
74 ; CHECK-NEXT: add v0.4s, v0.4s, v1.4s
77 %b = add <4 x i32> %a, <i32 1, i32 2, i32 3, i32 4>
81 define <2 x i64> @test_ld_from_poll_v2i64(<2 x i64> %a) {
82 ; CHECK-LABEL: test_ld_from_poll_v2i64:
83 ; CHECK: // %bb.0: // %entry
84 ; CHECK-NEXT: adrp x8, .LCPI3_0
85 ; CHECK-NEXT: ldr q1, [x8, :lo12:.LCPI3_0]
86 ; CHECK-NEXT: add v0.2d, v0.2d, v1.2d
89 %b = add <2 x i64> %a, <i64 1, i64 2>
93 define <4 x float> @test_ld_from_poll_v4f32(<4 x float> %a) {
94 ; CHECK-LABEL: test_ld_from_poll_v4f32:
95 ; CHECK: // %bb.0: // %entry
96 ; CHECK-NEXT: adrp x8, .LCPI4_0
97 ; CHECK-NEXT: ldr q1, [x8, :lo12:.LCPI4_0]
98 ; CHECK-NEXT: fadd v0.4s, v0.4s, v1.4s
101 %b = fadd <4 x float> %a, <float 1.0, float 2.0, float 3.0, float 4.0>
105 define <2 x double> @test_ld_from_poll_v2f64(<2 x double> %a) {
106 ; CHECK-LABEL: test_ld_from_poll_v2f64:
107 ; CHECK: // %bb.0: // %entry
108 ; CHECK-NEXT: adrp x8, .LCPI5_0
109 ; CHECK-NEXT: ldr q1, [x8, :lo12:.LCPI5_0]
110 ; CHECK-NEXT: fadd v0.2d, v0.2d, v1.2d
113 %b = fadd <2 x double> %a, <double 1.0, double 2.0>
117 define <8 x i8> @test_ld_from_poll_v8i8(<8 x i8> %a) {
118 ; CHECK-LABEL: test_ld_from_poll_v8i8:
119 ; CHECK: // %bb.0: // %entry
120 ; CHECK-NEXT: adrp x8, .LCPI6_0
121 ; CHECK-NEXT: ldr d1, [x8, :lo12:.LCPI6_0]
122 ; CHECK-NEXT: add v0.8b, v0.8b, v1.8b
125 %b = add <8 x i8> %a, <i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 8>
129 define <4 x i16> @test_ld_from_poll_v4i16(<4 x i16> %a) {
130 ; CHECK-LABEL: test_ld_from_poll_v4i16:
131 ; CHECK: // %bb.0: // %entry
132 ; CHECK-NEXT: adrp x8, .LCPI7_0
133 ; CHECK-NEXT: ldr d1, [x8, :lo12:.LCPI7_0]
134 ; CHECK-NEXT: add v0.4h, v0.4h, v1.4h
137 %b = add <4 x i16> %a, <i16 1, i16 2, i16 3, i16 4>
141 define <2 x i32> @test_ld_from_poll_v2i32(<2 x i32> %a) {
142 ; CHECK-LABEL: test_ld_from_poll_v2i32:
143 ; CHECK: // %bb.0: // %entry
144 ; CHECK-NEXT: adrp x8, .LCPI8_0
145 ; CHECK-NEXT: ldr d1, [x8, :lo12:.LCPI8_0]
146 ; CHECK-NEXT: add v0.2s, v0.2s, v1.2s
149 %b = add <2 x i32> %a, <i32 1, i32 2>
153 define <16 x i8> @test_vld1q_dup_s8(ptr %a) {
154 ; CHECK-LABEL: test_vld1q_dup_s8:
155 ; CHECK: // %bb.0: // %entry
156 ; CHECK-NEXT: ld1r { v0.16b }, [x0]
159 %0 = load i8, ptr %a, align 1
160 %1 = insertelement <16 x i8> undef, i8 %0, i32 0
161 %lane = shufflevector <16 x i8> %1, <16 x i8> undef, <16 x i32> zeroinitializer
165 define <8 x i16> @test_vld1q_dup_s16(ptr %a) {
166 ; CHECK-LABEL: test_vld1q_dup_s16:
167 ; CHECK: // %bb.0: // %entry
168 ; CHECK-NEXT: ld1r { v0.8h }, [x0]
171 %0 = load i16, ptr %a, align 2
172 %1 = insertelement <8 x i16> undef, i16 %0, i32 0
173 %lane = shufflevector <8 x i16> %1, <8 x i16> undef, <8 x i32> zeroinitializer
177 define <4 x i32> @test_vld1q_dup_s32(ptr %a) {
178 ; CHECK-LABEL: test_vld1q_dup_s32:
179 ; CHECK: // %bb.0: // %entry
180 ; CHECK-NEXT: ld1r { v0.4s }, [x0]
183 %0 = load i32, ptr %a, align 4
184 %1 = insertelement <4 x i32> undef, i32 %0, i32 0
185 %lane = shufflevector <4 x i32> %1, <4 x i32> undef, <4 x i32> zeroinitializer
189 define <2 x i64> @test_vld1q_dup_s64(ptr %a) {
190 ; CHECK-LABEL: test_vld1q_dup_s64:
191 ; CHECK: // %bb.0: // %entry
192 ; CHECK-NEXT: ld1r { v0.2d }, [x0]
195 %0 = load i64, ptr %a, align 8
196 %1 = insertelement <2 x i64> undef, i64 %0, i32 0
197 %lane = shufflevector <2 x i64> %1, <2 x i64> undef, <2 x i32> zeroinitializer
201 define <4 x float> @test_vld1q_dup_f32(ptr %a) {
202 ; CHECK-LABEL: test_vld1q_dup_f32:
203 ; CHECK: // %bb.0: // %entry
204 ; CHECK-NEXT: ld1r { v0.4s }, [x0]
207 %0 = load float, ptr %a, align 4
208 %1 = insertelement <4 x float> undef, float %0, i32 0
209 %lane = shufflevector <4 x float> %1, <4 x float> undef, <4 x i32> zeroinitializer
210 ret <4 x float> %lane
213 define <2 x double> @test_vld1q_dup_f64(ptr %a) {
214 ; CHECK-LABEL: test_vld1q_dup_f64:
215 ; CHECK: // %bb.0: // %entry
216 ; CHECK-NEXT: ld1r { v0.2d }, [x0]
219 %0 = load double, ptr %a, align 8
220 %1 = insertelement <2 x double> undef, double %0, i32 0
221 %lane = shufflevector <2 x double> %1, <2 x double> undef, <2 x i32> zeroinitializer
222 ret <2 x double> %lane
225 define <8 x i8> @test_vld1_dup_s8(ptr %a) {
226 ; CHECK-LABEL: test_vld1_dup_s8:
227 ; CHECK: // %bb.0: // %entry
228 ; CHECK-NEXT: ld1r { v0.8b }, [x0]
231 %0 = load i8, ptr %a, align 1
232 %1 = insertelement <8 x i8> undef, i8 %0, i32 0
233 %lane = shufflevector <8 x i8> %1, <8 x i8> undef, <8 x i32> zeroinitializer
237 define <4 x i16> @test_vld1_dup_s16(ptr %a) {
238 ; CHECK-LABEL: test_vld1_dup_s16:
239 ; CHECK: // %bb.0: // %entry
240 ; CHECK-NEXT: ld1r { v0.4h }, [x0]
243 %0 = load i16, ptr %a, align 2
244 %1 = insertelement <4 x i16> undef, i16 %0, i32 0
245 %lane = shufflevector <4 x i16> %1, <4 x i16> undef, <4 x i32> zeroinitializer
249 define <2 x i32> @test_vld1_dup_s32(ptr %a) {
250 ; CHECK-LABEL: test_vld1_dup_s32:
251 ; CHECK: // %bb.0: // %entry
252 ; CHECK-NEXT: ld1r { v0.2s }, [x0]
255 %0 = load i32, ptr %a, align 4
256 %1 = insertelement <2 x i32> undef, i32 %0, i32 0
257 %lane = shufflevector <2 x i32> %1, <2 x i32> undef, <2 x i32> zeroinitializer
261 define <1 x i64> @test_vld1_dup_s64(ptr %a) {
262 ; CHECK-LABEL: test_vld1_dup_s64:
263 ; CHECK: // %bb.0: // %entry
264 ; CHECK-NEXT: ldr d0, [x0]
267 %0 = load i64, ptr %a, align 8
268 %1 = insertelement <1 x i64> undef, i64 %0, i32 0
272 define <2 x float> @test_vld1_dup_f32(ptr %a) {
273 ; CHECK-LABEL: test_vld1_dup_f32:
274 ; CHECK: // %bb.0: // %entry
275 ; CHECK-NEXT: ld1r { v0.2s }, [x0]
278 %0 = load float, ptr %a, align 4
279 %1 = insertelement <2 x float> undef, float %0, i32 0
280 %lane = shufflevector <2 x float> %1, <2 x float> undef, <2 x i32> zeroinitializer
281 ret <2 x float> %lane
284 define <1 x double> @test_vld1_dup_f64(ptr %a) {
285 ; CHECK-LABEL: test_vld1_dup_f64:
286 ; CHECK: // %bb.0: // %entry
287 ; CHECK-NEXT: ldr d0, [x0]
290 %0 = load double, ptr %a, align 8
291 %1 = insertelement <1 x double> undef, double %0, i32 0
295 define <1 x i64> @testDUP.v1i64(ptr %a, ptr %b) #0 {
296 ; As there is a store operation depending on %1, LD1R pattern can't be selected.
297 ; So LDR and FMOV should be emitted.
298 ; CHECK-LABEL: testDUP.v1i64:
300 ; CHECK-NEXT: ldr x8, [x0]
301 ; CHECK-NEXT: fmov d0, x8
302 ; CHECK-NEXT: str x8, [x1]
304 %1 = load i64, ptr %a, align 8
305 store i64 %1, ptr %b, align 8
306 %vecinit.i = insertelement <1 x i64> undef, i64 %1, i32 0
307 ret <1 x i64> %vecinit.i
310 define <1 x double> @testDUP.v1f64(ptr %a, ptr %b) #0 {
311 ; As there is a store operation depending on %1, LD1R pattern can't be selected.
312 ; So LDR and FMOV should be emitted.
313 ; CHECK-LABEL: testDUP.v1f64:
315 ; CHECK-NEXT: ldr d0, [x0]
316 ; CHECK-NEXT: str d0, [x1]
318 %1 = load double, ptr %a, align 8
319 store double %1, ptr %b, align 8
320 %vecinit.i = insertelement <1 x double> undef, double %1, i32 0
321 ret <1 x double> %vecinit.i
324 define <16 x i8> @test_vld1q_lane_s8(ptr %a, <16 x i8> %b) {
325 ; CHECK-LABEL: test_vld1q_lane_s8:
326 ; CHECK: // %bb.0: // %entry
327 ; CHECK-NEXT: ld1 { v0.b }[15], [x0]
330 %0 = load i8, ptr %a, align 1
331 %vld1_lane = insertelement <16 x i8> %b, i8 %0, i32 15
332 ret <16 x i8> %vld1_lane
335 define <8 x i16> @test_vld1q_lane_s16(ptr %a, <8 x i16> %b) {
336 ; CHECK-LABEL: test_vld1q_lane_s16:
337 ; CHECK: // %bb.0: // %entry
338 ; CHECK-NEXT: ld1 { v0.h }[7], [x0]
341 %0 = load i16, ptr %a, align 2
342 %vld1_lane = insertelement <8 x i16> %b, i16 %0, i32 7
343 ret <8 x i16> %vld1_lane
346 define <4 x i32> @test_vld1q_lane_s32(ptr %a, <4 x i32> %b) {
347 ; CHECK-LABEL: test_vld1q_lane_s32:
348 ; CHECK: // %bb.0: // %entry
349 ; CHECK-NEXT: ld1 { v0.s }[3], [x0]
352 %0 = load i32, ptr %a, align 4
353 %vld1_lane = insertelement <4 x i32> %b, i32 %0, i32 3
354 ret <4 x i32> %vld1_lane
357 define <2 x i64> @test_vld1q_lane_s64(ptr %a, <2 x i64> %b) {
358 ; CHECK-LABEL: test_vld1q_lane_s64:
359 ; CHECK: // %bb.0: // %entry
360 ; CHECK-NEXT: ld1 { v0.d }[1], [x0]
363 %0 = load i64, ptr %a, align 8
364 %vld1_lane = insertelement <2 x i64> %b, i64 %0, i32 1
365 ret <2 x i64> %vld1_lane
368 define <4 x float> @test_vld1q_lane_f32(ptr %a, <4 x float> %b) {
369 ; CHECK-LABEL: test_vld1q_lane_f32:
370 ; CHECK: // %bb.0: // %entry
371 ; CHECK-NEXT: ld1 { v0.s }[3], [x0]
374 %0 = load float, ptr %a, align 4
375 %vld1_lane = insertelement <4 x float> %b, float %0, i32 3
376 ret <4 x float> %vld1_lane
379 define <2 x double> @test_vld1q_lane_f64(ptr %a, <2 x double> %b) {
380 ; CHECK-LABEL: test_vld1q_lane_f64:
381 ; CHECK: // %bb.0: // %entry
382 ; CHECK-NEXT: ld1 { v0.d }[1], [x0]
385 %0 = load double, ptr %a, align 8
386 %vld1_lane = insertelement <2 x double> %b, double %0, i32 1
387 ret <2 x double> %vld1_lane
390 define <8 x i8> @test_vld1_lane_s8(ptr %a, <8 x i8> %b) {
391 ; CHECK-LABEL: test_vld1_lane_s8:
392 ; CHECK: // %bb.0: // %entry
393 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $q0
394 ; CHECK-NEXT: ld1 { v0.b }[7], [x0]
395 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $q0
398 %0 = load i8, ptr %a, align 1
399 %vld1_lane = insertelement <8 x i8> %b, i8 %0, i32 7
400 ret <8 x i8> %vld1_lane
403 define <4 x i16> @test_vld1_lane_s16(ptr %a, <4 x i16> %b) {
404 ; CHECK-LABEL: test_vld1_lane_s16:
405 ; CHECK: // %bb.0: // %entry
406 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $q0
407 ; CHECK-NEXT: ld1 { v0.h }[3], [x0]
408 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $q0
411 %0 = load i16, ptr %a, align 2
412 %vld1_lane = insertelement <4 x i16> %b, i16 %0, i32 3
413 ret <4 x i16> %vld1_lane
416 define <2 x i32> @test_vld1_lane_s32(ptr %a, <2 x i32> %b) {
417 ; CHECK-LABEL: test_vld1_lane_s32:
418 ; CHECK: // %bb.0: // %entry
419 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $q0
420 ; CHECK-NEXT: ld1 { v0.s }[1], [x0]
421 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $q0
424 %0 = load i32, ptr %a, align 4
425 %vld1_lane = insertelement <2 x i32> %b, i32 %0, i32 1
426 ret <2 x i32> %vld1_lane
429 define <1 x i64> @test_vld1_lane_s64(ptr %a, <1 x i64> %b) {
430 ; CHECK-LABEL: test_vld1_lane_s64:
431 ; CHECK: // %bb.0: // %entry
432 ; CHECK-NEXT: ldr d0, [x0]
435 %0 = load i64, ptr %a, align 8
436 %vld1_lane = insertelement <1 x i64> undef, i64 %0, i32 0
437 ret <1 x i64> %vld1_lane
440 define <2 x float> @test_vld1_lane_f32(ptr %a, <2 x float> %b) {
441 ; CHECK-LABEL: test_vld1_lane_f32:
442 ; CHECK: // %bb.0: // %entry
443 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $q0
444 ; CHECK-NEXT: ld1 { v0.s }[1], [x0]
445 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $q0
448 %0 = load float, ptr %a, align 4
449 %vld1_lane = insertelement <2 x float> %b, float %0, i32 1
450 ret <2 x float> %vld1_lane
453 define <1 x double> @test_vld1_lane_f64(ptr %a, <1 x double> %b) {
454 ; CHECK-LABEL: test_vld1_lane_f64:
455 ; CHECK: // %bb.0: // %entry
456 ; CHECK-NEXT: ldr d0, [x0]
459 %0 = load double, ptr %a, align 8
460 %vld1_lane = insertelement <1 x double> undef, double %0, i32 0
461 ret <1 x double> %vld1_lane
464 define void @test_vst1q_lane_s8(ptr %a, <16 x i8> %b) {
465 ; CHECK-LABEL: test_vst1q_lane_s8:
466 ; CHECK: // %bb.0: // %entry
467 ; CHECK-NEXT: st1 { v0.b }[15], [x0]
470 %0 = extractelement <16 x i8> %b, i32 15
471 store i8 %0, ptr %a, align 1
475 define void @test_vst1q_lane_s16(ptr %a, <8 x i16> %b) {
476 ; CHECK-LABEL: test_vst1q_lane_s16:
477 ; CHECK: // %bb.0: // %entry
478 ; CHECK-NEXT: st1 { v0.h }[7], [x0]
481 %0 = extractelement <8 x i16> %b, i32 7
482 store i16 %0, ptr %a, align 2
486 define void @test_vst1q_lane0_s16(ptr %a, <8 x i16> %b) {
487 ; CHECK-LABEL: test_vst1q_lane0_s16:
488 ; CHECK: // %bb.0: // %entry
489 ; CHECK-NEXT: str h0, [x0]
492 %0 = extractelement <8 x i16> %b, i32 0
493 store i16 %0, ptr %a, align 2
497 define void @test_vst1q_lane_s32(ptr %a, <4 x i32> %b) {
498 ; CHECK-LABEL: test_vst1q_lane_s32:
499 ; CHECK: // %bb.0: // %entry
500 ; CHECK-NEXT: st1 { v0.s }[3], [x0]
503 %0 = extractelement <4 x i32> %b, i32 3
504 store i32 %0, ptr %a, align 4
508 define void @test_vst1q_lane0_s32(ptr %a, <4 x i32> %b) {
509 ; CHECK-LABEL: test_vst1q_lane0_s32:
510 ; CHECK: // %bb.0: // %entry
511 ; CHECK-NEXT: str s0, [x0]
514 %0 = extractelement <4 x i32> %b, i32 0
515 store i32 %0, ptr %a, align 4
519 define void @test_vst1q_lane_s64(ptr %a, <2 x i64> %b) {
520 ; CHECK-LABEL: test_vst1q_lane_s64:
521 ; CHECK: // %bb.0: // %entry
522 ; CHECK-NEXT: st1 { v0.d }[1], [x0]
525 %0 = extractelement <2 x i64> %b, i32 1
526 store i64 %0, ptr %a, align 8
530 define void @test_vst1q_lane0_s64(ptr %a, <2 x i64> %b) {
531 ; CHECK-LABEL: test_vst1q_lane0_s64:
532 ; CHECK: // %bb.0: // %entry
533 ; CHECK-NEXT: str d0, [x0]
536 %0 = extractelement <2 x i64> %b, i32 0
537 store i64 %0, ptr %a, align 8
541 define void @test_vst1q_lane_f32(ptr %a, <4 x float> %b) {
542 ; CHECK-LABEL: test_vst1q_lane_f32:
543 ; CHECK: // %bb.0: // %entry
544 ; CHECK-NEXT: st1 { v0.s }[3], [x0]
547 %0 = extractelement <4 x float> %b, i32 3
548 store float %0, ptr %a, align 4
552 define void @test_vst1q_lane0_f32(ptr %a, <4 x float> %b) {
553 ; CHECK-LABEL: test_vst1q_lane0_f32:
554 ; CHECK: // %bb.0: // %entry
555 ; CHECK-NEXT: str s0, [x0]
558 %0 = extractelement <4 x float> %b, i32 0
559 store float %0, ptr %a, align 4
563 define void @test_vst1q_lane_f64(ptr %a, <2 x double> %b) {
564 ; CHECK-LABEL: test_vst1q_lane_f64:
565 ; CHECK: // %bb.0: // %entry
566 ; CHECK-NEXT: st1 { v0.d }[1], [x0]
569 %0 = extractelement <2 x double> %b, i32 1
570 store double %0, ptr %a, align 8
574 define void @test_vst1q_lane0_f64(ptr %a, <2 x double> %b) {
575 ; CHECK-LABEL: test_vst1q_lane0_f64:
576 ; CHECK: // %bb.0: // %entry
577 ; CHECK-NEXT: str d0, [x0]
580 %0 = extractelement <2 x double> %b, i32 0
581 store double %0, ptr %a, align 8
585 define void @test_vst1_lane_s8(ptr %a, <8 x i8> %b) {
586 ; CHECK-LABEL: test_vst1_lane_s8:
587 ; CHECK: // %bb.0: // %entry
588 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $q0
589 ; CHECK-NEXT: st1 { v0.b }[7], [x0]
592 %0 = extractelement <8 x i8> %b, i32 7
593 store i8 %0, ptr %a, align 1
597 define void @test_vst1_lane_s16(ptr %a, <4 x i16> %b) {
598 ; CHECK-LABEL: test_vst1_lane_s16:
599 ; CHECK: // %bb.0: // %entry
600 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $q0
601 ; CHECK-NEXT: st1 { v0.h }[3], [x0]
604 %0 = extractelement <4 x i16> %b, i32 3
605 store i16 %0, ptr %a, align 2
609 define void @test_vst1_lane0_s16(ptr %a, <4 x i16> %b) {
610 ; CHECK-LABEL: test_vst1_lane0_s16:
611 ; CHECK: // %bb.0: // %entry
612 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $q0
613 ; CHECK-NEXT: str h0, [x0]
616 %0 = extractelement <4 x i16> %b, i32 0
617 store i16 %0, ptr %a, align 2
621 define void @test_vst1_lane_s32(ptr %a, <2 x i32> %b) {
622 ; CHECK-LABEL: test_vst1_lane_s32:
623 ; CHECK: // %bb.0: // %entry
624 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $q0
625 ; CHECK-NEXT: st1 { v0.s }[1], [x0]
628 %0 = extractelement <2 x i32> %b, i32 1
629 store i32 %0, ptr %a, align 4
633 define void @test_vst1_lane0_s32(ptr %a, <2 x i32> %b) {
634 ; CHECK-LABEL: test_vst1_lane0_s32:
635 ; CHECK: // %bb.0: // %entry
636 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $q0
637 ; CHECK-NEXT: str s0, [x0]
640 %0 = extractelement <2 x i32> %b, i32 0
641 store i32 %0, ptr %a, align 4
645 define void @test_vst1_lane_s64(ptr %a, <1 x i64> %b) {
646 ; CHECK-LABEL: test_vst1_lane_s64:
647 ; CHECK: // %bb.0: // %entry
648 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $q0
649 ; CHECK-NEXT: str d0, [x0]
652 %0 = extractelement <1 x i64> %b, i32 0
653 store i64 %0, ptr %a, align 8
657 define void @test_vst1_lane_f32(ptr %a, <2 x float> %b) {
658 ; CHECK-LABEL: test_vst1_lane_f32:
659 ; CHECK: // %bb.0: // %entry
660 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $q0
661 ; CHECK-NEXT: st1 { v0.s }[1], [x0]
664 %0 = extractelement <2 x float> %b, i32 1
665 store float %0, ptr %a, align 4
669 define void @test_vst1_lane0_f32(ptr %a, <2 x float> %b) {
670 ; CHECK-LABEL: test_vst1_lane0_f32:
671 ; CHECK: // %bb.0: // %entry
672 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $q0
673 ; CHECK-NEXT: str s0, [x0]
676 %0 = extractelement <2 x float> %b, i32 0
677 store float %0, ptr %a, align 4
681 define void @test_vst1_lane_f64(ptr %a, <1 x double> %b) {
682 ; CHECK-LABEL: test_vst1_lane_f64:
683 ; CHECK: // %bb.0: // %entry
684 ; CHECK-NEXT: str d0, [x0]
687 %0 = extractelement <1 x double> %b, i32 0
688 store double %0, ptr %a, align 8