1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve < %s | FileCheck %s
3 ; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sme < %s | FileCheck %s
4 ; RUN: llc -O0 -mtriple=aarch64-linux-gnu -mattr=+sve < %s | FileCheck %s
5 ; RUN: llc -O0 -mtriple=aarch64-linux-gnu -mattr=+sme < %s | FileCheck %s
11 define void @st1b_i8(<vscale x 16 x i8> %data, <vscale x 16 x i1> %pred, ptr %addr) {
12 ; CHECK-LABEL: st1b_i8:
14 ; CHECK-NEXT: st1b { z0.b }, p0, [x0]
16 call void @llvm.aarch64.sve.st1.nxv16i8(<vscale x 16 x i8> %data,
17 <vscale x 16 x i1> %pred,
22 define void @st1b_h(<vscale x 8 x i16> %data, <vscale x 8 x i1> %pred, ptr %addr) {
23 ; CHECK-LABEL: st1b_h:
25 ; CHECK-NEXT: st1b { z0.h }, p0, [x0]
27 %trunc = trunc <vscale x 8 x i16> %data to <vscale x 8 x i8>
28 call void @llvm.aarch64.sve.st1.nxv8i8(<vscale x 8 x i8> %trunc,
29 <vscale x 8 x i1> %pred,
34 define void @st1b_s(<vscale x 4 x i32> %data, <vscale x 4 x i1> %pred, ptr %addr) {
35 ; CHECK-LABEL: st1b_s:
37 ; CHECK-NEXT: st1b { z0.s }, p0, [x0]
39 %trunc = trunc <vscale x 4 x i32> %data to <vscale x 4 x i8>
40 call void @llvm.aarch64.sve.st1.nxv4i8(<vscale x 4 x i8> %trunc,
41 <vscale x 4 x i1> %pred,
46 define void @st1b_d(<vscale x 2 x i64> %data, <vscale x 2 x i1> %pred, ptr %addr) {
47 ; CHECK-LABEL: st1b_d:
49 ; CHECK-NEXT: st1b { z0.d }, p0, [x0]
51 %trunc = trunc <vscale x 2 x i64> %data to <vscale x 2 x i8>
52 call void @llvm.aarch64.sve.st1.nxv2i8(<vscale x 2 x i8> %trunc,
53 <vscale x 2 x i1> %pred,
62 define void @st1h_i16(<vscale x 8 x i16> %data, <vscale x 8 x i1> %pred, ptr %addr) {
63 ; CHECK-LABEL: st1h_i16:
65 ; CHECK-NEXT: st1h { z0.h }, p0, [x0]
67 call void @llvm.aarch64.sve.st1.nxv8i16(<vscale x 8 x i16> %data,
68 <vscale x 8 x i1> %pred,
73 define void @st1h_f16(<vscale x 8 x half> %data, <vscale x 8 x i1> %pred, ptr %addr) {
74 ; CHECK-LABEL: st1h_f16:
76 ; CHECK-NEXT: st1h { z0.h }, p0, [x0]
78 call void @llvm.aarch64.sve.st1.nxv8f16(<vscale x 8 x half> %data,
79 <vscale x 8 x i1> %pred,
84 define void @st1h_bf16(<vscale x 8 x bfloat> %data, <vscale x 8 x i1> %pred, ptr %addr) #0 {
85 ; CHECK-LABEL: st1h_bf16:
87 ; CHECK-NEXT: st1h { z0.h }, p0, [x0]
89 call void @llvm.aarch64.sve.st1.nxv8bf16(<vscale x 8 x bfloat> %data,
90 <vscale x 8 x i1> %pred,
95 define void @st1h_s(<vscale x 4 x i32> %data, <vscale x 4 x i1> %pred, ptr %addr) {
96 ; CHECK-LABEL: st1h_s:
98 ; CHECK-NEXT: st1h { z0.s }, p0, [x0]
100 %trunc = trunc <vscale x 4 x i32> %data to <vscale x 4 x i16>
101 call void @llvm.aarch64.sve.st1.nxv4i16(<vscale x 4 x i16> %trunc,
102 <vscale x 4 x i1> %pred,
107 define void @st1h_d(<vscale x 2 x i64> %data, <vscale x 2 x i1> %pred, ptr %addr) {
108 ; CHECK-LABEL: st1h_d:
110 ; CHECK-NEXT: st1h { z0.d }, p0, [x0]
112 %trunc = trunc <vscale x 2 x i64> %data to <vscale x 2 x i16>
113 call void @llvm.aarch64.sve.st1.nxv2i16(<vscale x 2 x i16> %trunc,
114 <vscale x 2 x i1> %pred,
123 define void @st1w_i32(<vscale x 4 x i32> %data, <vscale x 4 x i1> %pred, ptr %addr) {
124 ; CHECK-LABEL: st1w_i32:
126 ; CHECK-NEXT: st1w { z0.s }, p0, [x0]
128 call void @llvm.aarch64.sve.st1.nxv4i32(<vscale x 4 x i32> %data,
129 <vscale x 4 x i1> %pred,
134 define void @st1w_f32(<vscale x 4 x float> %data, <vscale x 4 x i1> %pred, ptr %addr) {
135 ; CHECK-LABEL: st1w_f32:
137 ; CHECK-NEXT: st1w { z0.s }, p0, [x0]
139 call void @llvm.aarch64.sve.st1.nxv4f32(<vscale x 4 x float> %data,
140 <vscale x 4 x i1> %pred,
145 define void @st1w_d(<vscale x 2 x i64> %data, <vscale x 2 x i1> %pred, ptr %addr) {
146 ; CHECK-LABEL: st1w_d:
148 ; CHECK-NEXT: st1w { z0.d }, p0, [x0]
150 %trunc = trunc <vscale x 2 x i64> %data to <vscale x 2 x i32>
151 call void @llvm.aarch64.sve.st1.nxv2i32(<vscale x 2 x i32> %trunc,
152 <vscale x 2 x i1> %pred,
161 define void @st1d_i64(<vscale x 2 x i64> %data, <vscale x 2 x i1> %pred, ptr %addr) {
162 ; CHECK-LABEL: st1d_i64:
164 ; CHECK-NEXT: st1d { z0.d }, p0, [x0]
166 call void @llvm.aarch64.sve.st1.nxv2i64(<vscale x 2 x i64> %data,
167 <vscale x 2 x i1> %pred,
172 define void @st1d_f64(<vscale x 2 x double> %data, <vscale x 2 x i1> %pred, ptr %addr) {
173 ; CHECK-LABEL: st1d_f64:
175 ; CHECK-NEXT: st1d { z0.d }, p0, [x0]
177 call void @llvm.aarch64.sve.st1.nxv2f64(<vscale x 2 x double> %data,
178 <vscale x 2 x i1> %pred,
183 declare void @llvm.aarch64.sve.st1.nxv16i8(<vscale x 16 x i8>, <vscale x 16 x i1>, ptr)
185 declare void @llvm.aarch64.sve.st1.nxv8i8(<vscale x 8 x i8>, <vscale x 8 x i1>, ptr)
186 declare void @llvm.aarch64.sve.st1.nxv8i16(<vscale x 8 x i16>, <vscale x 8 x i1>, ptr)
187 declare void @llvm.aarch64.sve.st1.nxv8f16(<vscale x 8 x half>, <vscale x 8 x i1>, ptr)
188 declare void @llvm.aarch64.sve.st1.nxv8bf16(<vscale x 8 x bfloat>, <vscale x 8 x i1>, ptr)
190 declare void @llvm.aarch64.sve.st1.nxv4i8(<vscale x 4 x i8>, <vscale x 4 x i1>, ptr)
191 declare void @llvm.aarch64.sve.st1.nxv4i16(<vscale x 4 x i16>, <vscale x 4 x i1>, ptr)
192 declare void @llvm.aarch64.sve.st1.nxv4i32(<vscale x 4 x i32>, <vscale x 4 x i1>, ptr)
193 declare void @llvm.aarch64.sve.st1.nxv4f32(<vscale x 4 x float>, <vscale x 4 x i1>, ptr)
195 declare void @llvm.aarch64.sve.st1.nxv2i8(<vscale x 2 x i8>, <vscale x 2 x i1>, ptr)
196 declare void @llvm.aarch64.sve.st1.nxv2i16(<vscale x 2 x i16>, <vscale x 2 x i1>, ptr)
197 declare void @llvm.aarch64.sve.st1.nxv2i32(<vscale x 2 x i32>, <vscale x 2 x i1>, ptr)
198 declare void @llvm.aarch64.sve.st1.nxv2i64(<vscale x 2 x i64>, <vscale x 2 x i1>, ptr)
199 declare void @llvm.aarch64.sve.st1.nxv2f64(<vscale x 2 x double>, <vscale x 2 x i1>, ptr)
201 ; +bf16 is required for the bfloat version.
202 attributes #0 = { "target-features"="+bf16" }