1 ; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve < %s | FileCheck %s
4 ; ST1B, ST1W, ST1H, ST1D: vector base + scalar offset
5 ; e.g. st1h { z0.s }, p0, [x0, z1.d]
9 define void @sst1b_s_scalar_offset(<vscale x 4 x i32> %data, <vscale x 4 x i1> %pg, <vscale x 4 x i32> %base, i64 %offset) {
10 ; CHECK-LABEL: sst1b_s_scalar_offset:
11 ; CHECK: st1b { z0.s }, p0, [x0, z1.s, uxtw]
13 %data_trunc = trunc <vscale x 4 x i32> %data to <vscale x 4 x i8>
14 call void @llvm.aarch64.sve.st1.scatter.scalar.offset.nxv4i8.nxv4i32(<vscale x 4 x i8> %data_trunc,
15 <vscale x 4 x i1> %pg,
16 <vscale x 4 x i32> %base,
21 define void @sst1b_d_scalar_offset(<vscale x 2 x i64> %data, <vscale x 2 x i1> %pg, <vscale x 2 x i64> %base, i64 %offset) {
22 ; CHECK-LABEL: sst1b_d_scalar_offset:
23 ; CHECK: st1b { z0.d }, p0, [x0, z1.d]
25 %data_trunc = trunc <vscale x 2 x i64> %data to <vscale x 2 x i8>
26 call void @llvm.aarch64.sve.st1.scatter.scalar.offset.nxv2i8.nxv2i64(<vscale x 2 x i8> %data_trunc,
27 <vscale x 2 x i1> %pg,
28 <vscale x 2 x i64> %base,
34 define void @sst1h_s_scalar_offset(<vscale x 4 x i32> %data, <vscale x 4 x i1> %pg, <vscale x 4 x i32> %base, i64 %offset) {
35 ; CHECK-LABEL: sst1h_s_scalar_offset:
36 ; CHECK: st1h { z0.s }, p0, [x0, z1.s, uxtw]
38 %data_trunc = trunc <vscale x 4 x i32> %data to <vscale x 4 x i16>
39 call void @llvm.aarch64.sve.st1.scatter.scalar.offset.nxv4i16.nxv4i32(<vscale x 4 x i16> %data_trunc,
40 <vscale x 4 x i1> %pg,
41 <vscale x 4 x i32> %base,
46 define void @sst1h_d_scalar_offset(<vscale x 2 x i64> %data, <vscale x 2 x i1> %pg, <vscale x 2 x i64> %base, i64 %offset) {
47 ; CHECK-LABEL: sst1h_d_scalar_offset:
48 ; CHECK: st1h { z0.d }, p0, [x0, z1.d]
50 %data_trunc = trunc <vscale x 2 x i64> %data to <vscale x 2 x i16>
51 call void @llvm.aarch64.sve.st1.scatter.scalar.offset.nxv2i16.nxv2i64(<vscale x 2 x i16> %data_trunc,
52 <vscale x 2 x i1> %pg,
53 <vscale x 2 x i64> %base,
59 define void @sst1w_s_scalar_offset(<vscale x 4 x i32> %data, <vscale x 4 x i1> %pg, <vscale x 4 x i32> %base, i64 %offset) {
60 ; CHECK-LABEL: sst1w_s_scalar_offset:
61 ; CHECK: st1w { z0.s }, p0, [x0, z1.s, uxtw]
63 call void @llvm.aarch64.sve.st1.scatter.scalar.offset.nxv4i32.nxv4i32(<vscale x 4 x i32> %data,
64 <vscale x 4 x i1> %pg,
65 <vscale x 4 x i32> %base,
70 define void @sst1w_d_scalar_offset(<vscale x 2 x i64> %data, <vscale x 2 x i1> %pg, <vscale x 2 x i64> %base, i64 %offset) {
71 ; CHECK-LABEL: sst1w_d_scalar_offset:
72 ; CHECK: st1w { z0.d }, p0, [x0, z1.d]
74 %data_trunc = trunc <vscale x 2 x i64> %data to <vscale x 2 x i32>
75 call void @llvm.aarch64.sve.st1.scatter.scalar.offset.nxv2i32.nxv2i64(<vscale x 2 x i32> %data_trunc,
76 <vscale x 2 x i1> %pg,
77 <vscale x 2 x i64> %base,
82 define void @sst1w_s_scalar_offset_float(<vscale x 4 x float> %data, <vscale x 4 x i1> %pg, <vscale x 4 x i32> %base, i64 %offset) {
83 ; CHECK-LABEL: sst1w_s_scalar_offset_float:
84 ; CHECK: st1w { z0.s }, p0, [x0, z1.s, uxtw]
86 call void @llvm.aarch64.sve.st1.scatter.scalar.offset.nxv4f32.nxv4i32(<vscale x 4 x float> %data,
87 <vscale x 4 x i1> %pg,
88 <vscale x 4 x i32> %base,
94 define void @sst1d_d_scalar_offset(<vscale x 2 x i64> %data, <vscale x 2 x i1> %pg, <vscale x 2 x i64> %base, i64 %offset) {
95 ; CHECK-LABEL: sst1d_d_scalar_offset:
96 ; CHECK: st1d { z0.d }, p0, [x0, z1.d]
98 call void @llvm.aarch64.sve.st1.scatter.scalar.offset.nxv2i64.nxv2i64(<vscale x 2 x i64> %data,
99 <vscale x 2 x i1> %pg,
100 <vscale x 2 x i64> %base,
105 define void @sst1d_d_scalar_offset_double(<vscale x 2 x double> %data, <vscale x 2 x i1> %pg, <vscale x 2 x i64> %base, i64 %offset) {
106 ; CHECK-LABEL: sst1d_d_scalar_offset_double:
107 ; CHECK: st1d { z0.d }, p0, [x0, z1.d]
109 call void @llvm.aarch64.sve.st1.scatter.scalar.offset.nxv2f64.nxv2i64(<vscale x 2 x double> %data,
110 <vscale x 2 x i1> %pg,
111 <vscale x 2 x i64> %base,
117 declare void @llvm.aarch64.sve.st1.scatter.scalar.offset.nxv4i8.nxv4i32(<vscale x 4 x i8>, <vscale x 4 x i1>, <vscale x 4 x i32>, i64)
118 declare void @llvm.aarch64.sve.st1.scatter.scalar.offset.nxv2i8.nxv2i64(<vscale x 2 x i8>, <vscale x 2 x i1>, <vscale x 2 x i64>, i64)
121 declare void @llvm.aarch64.sve.st1.scatter.scalar.offset.nxv4i16.nxv4i32(<vscale x 4 x i16>, <vscale x 4 x i1>, <vscale x 4 x i32>, i64)
122 declare void @llvm.aarch64.sve.st1.scatter.scalar.offset.nxv2i16.nxv2i64(<vscale x 2 x i16>, <vscale x 2 x i1>, <vscale x 2 x i64>, i64)
125 declare void @llvm.aarch64.sve.st1.scatter.scalar.offset.nxv4i32.nxv4i32(<vscale x 4 x i32>, <vscale x 4 x i1>, <vscale x 4 x i32>, i64)
126 declare void @llvm.aarch64.sve.st1.scatter.scalar.offset.nxv2i32.nxv2i64(<vscale x 2 x i32>, <vscale x 2 x i1>, <vscale x 2 x i64>, i64)
128 declare void @llvm.aarch64.sve.st1.scatter.scalar.offset.nxv4f32.nxv4i32(<vscale x 4 x float>, <vscale x 4 x i1>, <vscale x 4 x i32>, i64)
131 declare void @llvm.aarch64.sve.st1.scatter.scalar.offset.nxv2i64.nxv2i64(<vscale x 2 x i64>, <vscale x 2 x i1>, <vscale x 2 x i64>, i64)
133 declare void @llvm.aarch64.sve.st1.scatter.scalar.offset.nxv2f64.nxv2i64(<vscale x 2 x double>, <vscale x 2 x i1>, <vscale x 2 x i64>, i64)