1 ; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve < %s | FileCheck %s
2 ; RUN: llc -O0 -mtriple=aarch64-linux-gnu -mattr=+sve < %s | FileCheck %s
8 define void @st1b_i8(<vscale x 16 x i8> %data, <vscale x 16 x i1> %pred, i8* %addr) {
9 ; CHECK-LABEL: st1b_i8:
10 ; CHECK: st1b { z0.b }, p0, [x0]
12 call void @llvm.aarch64.sve.st1.nxv16i8(<vscale x 16 x i8> %data,
13 <vscale x 16 x i1> %pred,
18 define void @st1b_h(<vscale x 8 x i16> %data, <vscale x 8 x i1> %pred, i8* %addr) {
19 ; CHECK-LABEL: st1b_h:
20 ; CHECK: st1b { z0.h }, p0, [x0]
22 %trunc = trunc <vscale x 8 x i16> %data to <vscale x 8 x i8>
23 call void @llvm.aarch64.sve.st1.nxv8i8(<vscale x 8 x i8> %trunc,
24 <vscale x 8 x i1> %pred,
29 define void @st1b_s(<vscale x 4 x i32> %data, <vscale x 4 x i1> %pred, i8* %addr) {
30 ; CHECK-LABEL: st1b_s:
31 ; CHECK: st1b { z0.s }, p0, [x0]
33 %trunc = trunc <vscale x 4 x i32> %data to <vscale x 4 x i8>
34 call void @llvm.aarch64.sve.st1.nxv4i8(<vscale x 4 x i8> %trunc,
35 <vscale x 4 x i1> %pred,
40 define void @st1b_d(<vscale x 2 x i64> %data, <vscale x 2 x i1> %pred, i8* %addr) {
41 ; CHECK-LABEL: st1b_d:
42 ; CHECK: st1b { z0.d }, p0, [x0]
44 %trunc = trunc <vscale x 2 x i64> %data to <vscale x 2 x i8>
45 call void @llvm.aarch64.sve.st1.nxv2i8(<vscale x 2 x i8> %trunc,
46 <vscale x 2 x i1> %pred,
55 define void @st1h_i16(<vscale x 8 x i16> %data, <vscale x 8 x i1> %pred, i16* %addr) {
56 ; CHECK-LABEL: st1h_i16:
57 ; CHECK: st1h { z0.h }, p0, [x0]
59 call void @llvm.aarch64.sve.st1.nxv8i16(<vscale x 8 x i16> %data,
60 <vscale x 8 x i1> %pred,
65 define void @st1h_f16(<vscale x 8 x half> %data, <vscale x 8 x i1> %pred, half* %addr) {
66 ; CHECK-LABEL: st1h_f16:
67 ; CHECK: st1h { z0.h }, p0, [x0]
69 call void @llvm.aarch64.sve.st1.nxv8f16(<vscale x 8 x half> %data,
70 <vscale x 8 x i1> %pred,
75 define void @st1h_bf16(<vscale x 8 x bfloat> %data, <vscale x 8 x i1> %pred, bfloat* %addr) #0 {
76 ; CHECK-LABEL: st1h_bf16:
77 ; CHECK: st1h { z0.h }, p0, [x0]
79 call void @llvm.aarch64.sve.st1.nxv8bf16(<vscale x 8 x bfloat> %data,
80 <vscale x 8 x i1> %pred,
85 define void @st1h_s(<vscale x 4 x i32> %data, <vscale x 4 x i1> %pred, i16* %addr) {
86 ; CHECK-LABEL: st1h_s:
87 ; CHECK: st1h { z0.s }, p0, [x0]
89 %trunc = trunc <vscale x 4 x i32> %data to <vscale x 4 x i16>
90 call void @llvm.aarch64.sve.st1.nxv4i16(<vscale x 4 x i16> %trunc,
91 <vscale x 4 x i1> %pred,
96 define void @st1h_d(<vscale x 2 x i64> %data, <vscale x 2 x i1> %pred, i16* %addr) {
97 ; CHECK-LABEL: st1h_d:
98 ; CHECK: st1h { z0.d }, p0, [x0]
100 %trunc = trunc <vscale x 2 x i64> %data to <vscale x 2 x i16>
101 call void @llvm.aarch64.sve.st1.nxv2i16(<vscale x 2 x i16> %trunc,
102 <vscale x 2 x i1> %pred,
111 define void @st1w_i32(<vscale x 4 x i32> %data, <vscale x 4 x i1> %pred, i32* %addr) {
112 ; CHECK-LABEL: st1w_i32:
113 ; CHECK: st1w { z0.s }, p0, [x0]
115 call void @llvm.aarch64.sve.st1.nxv4i32(<vscale x 4 x i32> %data,
116 <vscale x 4 x i1> %pred,
121 define void @st1w_f32(<vscale x 4 x float> %data, <vscale x 4 x i1> %pred, float* %addr) {
122 ; CHECK-LABEL: st1w_f32:
123 ; CHECK: st1w { z0.s }, p0, [x0]
125 call void @llvm.aarch64.sve.st1.nxv4f32(<vscale x 4 x float> %data,
126 <vscale x 4 x i1> %pred,
131 define void @st1w_d(<vscale x 2 x i64> %data, <vscale x 2 x i1> %pred, i32* %addr) {
132 ; CHECK-LABEL: st1w_d:
133 ; CHECK: st1w { z0.d }, p0, [x0]
135 %trunc = trunc <vscale x 2 x i64> %data to <vscale x 2 x i32>
136 call void @llvm.aarch64.sve.st1.nxv2i32(<vscale x 2 x i32> %trunc,
137 <vscale x 2 x i1> %pred,
146 define void @st1d_i64(<vscale x 2 x i64> %data, <vscale x 2 x i1> %pred, i64* %addr) {
147 ; CHECK-LABEL: st1d_i64:
148 ; CHECK: st1d { z0.d }, p0, [x0]
150 call void @llvm.aarch64.sve.st1.nxv2i64(<vscale x 2 x i64> %data,
151 <vscale x 2 x i1> %pred,
156 define void @st1d_f64(<vscale x 2 x double> %data, <vscale x 2 x i1> %pred, double* %addr) {
157 ; CHECK-LABEL: st1d_f64:
158 ; CHECK: st1d { z0.d }, p0, [x0]
160 call void @llvm.aarch64.sve.st1.nxv2f64(<vscale x 2 x double> %data,
161 <vscale x 2 x i1> %pred,
166 declare void @llvm.aarch64.sve.st1.nxv16i8(<vscale x 16 x i8>, <vscale x 16 x i1>, i8*)
168 declare void @llvm.aarch64.sve.st1.nxv8i8(<vscale x 8 x i8>, <vscale x 8 x i1>, i8*)
169 declare void @llvm.aarch64.sve.st1.nxv8i16(<vscale x 8 x i16>, <vscale x 8 x i1>, i16*)
170 declare void @llvm.aarch64.sve.st1.nxv8f16(<vscale x 8 x half>, <vscale x 8 x i1>, half*)
171 declare void @llvm.aarch64.sve.st1.nxv8bf16(<vscale x 8 x bfloat>, <vscale x 8 x i1>, bfloat*)
173 declare void @llvm.aarch64.sve.st1.nxv4i8(<vscale x 4 x i8>, <vscale x 4 x i1>, i8*)
174 declare void @llvm.aarch64.sve.st1.nxv4i16(<vscale x 4 x i16>, <vscale x 4 x i1>, i16*)
175 declare void @llvm.aarch64.sve.st1.nxv4i32(<vscale x 4 x i32>, <vscale x 4 x i1>, i32*)
176 declare void @llvm.aarch64.sve.st1.nxv4f32(<vscale x 4 x float>, <vscale x 4 x i1>, float*)
178 declare void @llvm.aarch64.sve.st1.nxv2i8(<vscale x 2 x i8>, <vscale x 2 x i1>, i8*)
179 declare void @llvm.aarch64.sve.st1.nxv2i16(<vscale x 2 x i16>, <vscale x 2 x i1>, i16*)
180 declare void @llvm.aarch64.sve.st1.nxv2i32(<vscale x 2 x i32>, <vscale x 2 x i1>, i32*)
181 declare void @llvm.aarch64.sve.st1.nxv2i64(<vscale x 2 x i64>, <vscale x 2 x i1>, i64*)
182 declare void @llvm.aarch64.sve.st1.nxv2f64(<vscale x 2 x double>, <vscale x 2 x i1>, double*)
184 ; +bf16 is required for the bfloat version.
185 attributes #0 = { "target-features"="+sve,+bf16" }