1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve,+bf16 < %s | FileCheck %s
6 define void @st1_nxv16i8(ptr %addr, i64 %off, <vscale x 16 x i8> %val) {
7 ; CHECK-LABEL: st1_nxv16i8:
9 ; CHECK-NEXT: ptrue p0.b
10 ; CHECK-NEXT: st1b { z0.b }, p0, [x0, x1]
12 %ptr = getelementptr inbounds i8, ptr %addr, i64 %off
13 store <vscale x 16 x i8> %val, <vscale x 16 x i8>* %ptr
17 define void @st1_nxv16i8_bitcast_from_i16(ptr %addr, i64 %off, <vscale x 8 x i16> %val) {
18 ; CHECK-LABEL: st1_nxv16i8_bitcast_from_i16:
20 ; CHECK-NEXT: ptrue p0.b
21 ; CHECK-NEXT: st1b { z0.b }, p0, [x0, x1]
23 %ptr = getelementptr inbounds i8, ptr %addr, i64 %off
24 store <vscale x 8 x i16> %val, <vscale x 8 x i16>* %ptr
28 define void @st1_nxv16i8_bitcast_from_i32(ptr %addr, i64 %off, <vscale x 4 x i32> %val) {
29 ; CHECK-LABEL: st1_nxv16i8_bitcast_from_i32:
31 ; CHECK-NEXT: ptrue p0.b
32 ; CHECK-NEXT: st1b { z0.b }, p0, [x0, x1]
34 %ptr = getelementptr inbounds i8, ptr %addr, i64 %off
35 store <vscale x 4 x i32> %val, <vscale x 4 x i32>* %ptr
39 define void @st1_nxv16i8_bitcast_from_i64(ptr %addr, i64 %off, <vscale x 2 x i64> %val) {
40 ; CHECK-LABEL: st1_nxv16i8_bitcast_from_i64:
42 ; CHECK-NEXT: ptrue p0.b
43 ; CHECK-NEXT: st1b { z0.b }, p0, [x0, x1]
45 %ptr = getelementptr inbounds i8, ptr %addr, i64 %off
46 store <vscale x 2 x i64> %val, <vscale x 2 x i64>* %ptr
50 define void @st1_nxv8i16_trunc8(ptr %addr, i64 %off, <vscale x 8 x i16> %val) {
51 ; CHECK-LABEL: st1_nxv8i16_trunc8:
53 ; CHECK-NEXT: ptrue p0.h
54 ; CHECK-NEXT: st1b { z0.h }, p0, [x0, x1]
56 %ptr = getelementptr inbounds i8, ptr %addr, i64 %off
57 %trunc = trunc <vscale x 8 x i16> %val to <vscale x 8 x i8>
58 store <vscale x 8 x i8> %trunc, <vscale x 8 x i8>* %ptr
62 define void @st1_nxv4i32_trunc8(ptr %addr, i64 %off, <vscale x 4 x i32> %val) {
63 ; CHECK-LABEL: st1_nxv4i32_trunc8:
65 ; CHECK-NEXT: ptrue p0.s
66 ; CHECK-NEXT: st1b { z0.s }, p0, [x0, x1]
68 %ptr = getelementptr inbounds i8, ptr %addr, i64 %off
69 %trunc = trunc <vscale x 4 x i32> %val to <vscale x 4 x i8>
70 store <vscale x 4 x i8> %trunc, <vscale x 4 x i8>* %ptr
74 define void @st1_nxv2i64_trunc8(ptr %addr, i64 %off, <vscale x 2 x i64> %val) {
75 ; CHECK-LABEL: st1_nxv2i64_trunc8:
77 ; CHECK-NEXT: ptrue p0.d
78 ; CHECK-NEXT: st1b { z0.d }, p0, [x0, x1]
80 %ptr = getelementptr inbounds i8, ptr %addr, i64 %off
81 %trunc = trunc <vscale x 2 x i64> %val to <vscale x 2 x i8>
82 store <vscale x 2 x i8> %trunc, <vscale x 2 x i8>* %ptr
88 define void @st1_nxv8i16(ptr %addr, i64 %off, <vscale x 8 x i16> %val) {
89 ; CHECK-LABEL: st1_nxv8i16:
91 ; CHECK-NEXT: ptrue p0.h
92 ; CHECK-NEXT: st1h { z0.h }, p0, [x0, x1, lsl #1]
94 %ptr = getelementptr inbounds i16, ptr %addr, i64 %off
95 store <vscale x 8 x i16> %val, <vscale x 8 x i16>* %ptr
99 define void @st1_nxv4i32_trunc16(ptr %addr, i64 %off, <vscale x 4 x i32> %val) {
100 ; CHECK-LABEL: st1_nxv4i32_trunc16:
102 ; CHECK-NEXT: ptrue p0.s
103 ; CHECK-NEXT: st1h { z0.s }, p0, [x0, x1, lsl #1]
105 %ptr = getelementptr inbounds i16, ptr %addr, i64 %off
106 %trunc = trunc <vscale x 4 x i32> %val to <vscale x 4 x i16>
107 store <vscale x 4 x i16> %trunc, <vscale x 4 x i16>* %ptr
111 define void @st1_nxv2i64_trunc16(ptr %addr, i64 %off, <vscale x 2 x i64> %val) {
112 ; CHECK-LABEL: st1_nxv2i64_trunc16:
114 ; CHECK-NEXT: ptrue p0.d
115 ; CHECK-NEXT: st1h { z0.d }, p0, [x0, x1, lsl #1]
117 %ptr = getelementptr inbounds i16, ptr %addr, i64 %off
118 %trunc = trunc <vscale x 2 x i64> %val to <vscale x 2 x i16>
119 store <vscale x 2 x i16> %trunc, <vscale x 2 x i16>* %ptr
123 define void @st1_nxv8f16(ptr %addr, i64 %off, <vscale x 8 x half> %val) {
124 ; CHECK-LABEL: st1_nxv8f16:
126 ; CHECK-NEXT: ptrue p0.h
127 ; CHECK-NEXT: st1h { z0.h }, p0, [x0, x1, lsl #1]
129 %ptr = getelementptr inbounds half, ptr %addr, i64 %off
130 store <vscale x 8 x half> %val, <vscale x 8 x half>* %ptr
134 define void @st1_nxv8bf16(ptr %addr, i64 %off, <vscale x 8 x bfloat> %val) {
135 ; CHECK-LABEL: st1_nxv8bf16:
137 ; CHECK-NEXT: ptrue p0.h
138 ; CHECK-NEXT: st1h { z0.h }, p0, [x0, x1, lsl #1]
140 %ptr = getelementptr inbounds bfloat, ptr %addr, i64 %off
141 store <vscale x 8 x bfloat> %val, <vscale x 8 x bfloat>* %ptr
145 define void @st1_nxv4f16(ptr %addr, i64 %off, <vscale x 4 x half> %val) {
146 ; CHECK-LABEL: st1_nxv4f16:
148 ; CHECK-NEXT: ptrue p0.s
149 ; CHECK-NEXT: st1h { z0.s }, p0, [x0, x1, lsl #1]
151 %ptr = getelementptr inbounds half, ptr %addr, i64 %off
152 store <vscale x 4 x half> %val, <vscale x 4 x half>* %ptr
156 define void @st1_nxv4bf16(ptr %addr, i64 %off, <vscale x 4 x bfloat> %val) {
157 ; CHECK-LABEL: st1_nxv4bf16:
159 ; CHECK-NEXT: ptrue p0.s
160 ; CHECK-NEXT: st1h { z0.s }, p0, [x0, x1, lsl #1]
162 %ptr = getelementptr inbounds bfloat, ptr %addr, i64 %off
163 store <vscale x 4 x bfloat> %val, <vscale x 4 x bfloat>* %ptr
167 define void @st1_nxv2f16(ptr %addr, i64 %off, <vscale x 2 x half> %val) {
168 ; CHECK-LABEL: st1_nxv2f16:
170 ; CHECK-NEXT: ptrue p0.d
171 ; CHECK-NEXT: st1h { z0.d }, p0, [x0, x1, lsl #1]
173 %ptr = getelementptr inbounds half, ptr %addr, i64 %off
174 store <vscale x 2 x half> %val, <vscale x 2 x half>* %ptr
178 define void @st1_nxv2bf16(ptr %addr, i64 %off, <vscale x 2 x bfloat> %val) {
179 ; CHECK-LABEL: st1_nxv2bf16:
181 ; CHECK-NEXT: ptrue p0.d
182 ; CHECK-NEXT: st1h { z0.d }, p0, [x0, x1, lsl #1]
184 %ptr = getelementptr inbounds bfloat, ptr %addr, i64 %off
185 store <vscale x 2 x bfloat> %val, <vscale x 2 x bfloat>* %ptr
191 define void @st1_nxv4i32(ptr %addr, i64 %off, <vscale x 4 x i32> %val) {
192 ; CHECK-LABEL: st1_nxv4i32:
194 ; CHECK-NEXT: ptrue p0.s
195 ; CHECK-NEXT: st1w { z0.s }, p0, [x0, x1, lsl #2]
197 %ptr = getelementptr inbounds i32, ptr %addr, i64 %off
198 store <vscale x 4 x i32> %val, <vscale x 4 x i32>* %ptr
202 define void @st1_nxv2i64_trunc32(ptr %addr, i64 %off, <vscale x 2 x i64> %val) {
203 ; CHECK-LABEL: st1_nxv2i64_trunc32:
205 ; CHECK-NEXT: ptrue p0.d
206 ; CHECK-NEXT: st1w { z0.d }, p0, [x0, x1, lsl #2]
208 %ptr = getelementptr inbounds i32, ptr %addr, i64 %off
209 %trunc = trunc <vscale x 2 x i64> %val to <vscale x 2 x i32>
210 store <vscale x 2 x i32> %trunc, <vscale x 2 x i32>* %ptr
214 define void @st1_nxv4f32(ptr %addr, i64 %off, <vscale x 4 x float> %val) {
215 ; CHECK-LABEL: st1_nxv4f32:
217 ; CHECK-NEXT: ptrue p0.s
218 ; CHECK-NEXT: st1w { z0.s }, p0, [x0, x1, lsl #2]
220 %ptr = getelementptr inbounds float, ptr %addr, i64 %off
221 store <vscale x 4 x float> %val, <vscale x 4 x float>* %ptr
225 define void @st1_nxv2f32(ptr %addr, i64 %off, <vscale x 2 x float> %val) {
226 ; CHECK-LABEL: st1_nxv2f32:
228 ; CHECK-NEXT: ptrue p0.d
229 ; CHECK-NEXT: st1w { z0.d }, p0, [x0, x1, lsl #2]
231 %ptr = getelementptr inbounds float, ptr %addr, i64 %off
232 store <vscale x 2 x float> %val, <vscale x 2 x float>* %ptr
238 define void @st1_nxv2i64(ptr %addr, i64 %off, <vscale x 2 x i64> %val) {
239 ; CHECK-LABEL: st1_nxv2i64:
241 ; CHECK-NEXT: ptrue p0.d
242 ; CHECK-NEXT: st1d { z0.d }, p0, [x0, x1, lsl #3]
244 %ptr = getelementptr inbounds i64, ptr %addr, i64 %off
245 store <vscale x 2 x i64> %val, <vscale x 2 x i64>* %ptr
249 define void @st1_nxv2f64(ptr %addr, i64 %off, <vscale x 2 x double> %val) {
250 ; CHECK-LABEL: st1_nxv2f64:
252 ; CHECK-NEXT: ptrue p0.d
253 ; CHECK-NEXT: st1d { z0.d }, p0, [x0, x1, lsl #3]
255 %ptr = getelementptr inbounds double, ptr %addr, i64 %off
256 store <vscale x 2 x double> %val, <vscale x 2 x double>* %ptr