1 ; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve2 < %s | FileCheck %s
4 ; STNT1H, STNT1W, STNT1D: base + 64-bit index
7 ; stnt1h { z0.d }, p0, [z0.d, x0]
10 define void @sstnt1h_index(<vscale x 2 x i64> %data, <vscale x 2 x i1> %pg, i16* %base, <vscale x 2 x i64> %offsets) {
11 ; CHECK-LABEL: sstnt1h_index
12 ; CHECK: lsl z1.d, z1.d, #1
13 ; CHECK-NEXT: stnt1h { z0.d }, p0, [z1.d, x0]
15 %data_trunc = trunc <vscale x 2 x i64> %data to <vscale x 2 x i16>
16 call void @llvm.aarch64.sve.stnt1.scatter.index.nxv2i16(<vscale x 2 x i16> %data_trunc,
17 <vscale x 2 x i1> %pg,
19 <vscale x 2 x i64> %offsets)
23 define void @sstnt1w_index(<vscale x 2 x i64> %data, <vscale x 2 x i1> %pg, i32* %base, <vscale x 2 x i64> %offsets) {
24 ; CHECK-LABEL: sstnt1w_index
25 ; CHECK: lsl z1.d, z1.d, #2
26 ; CHECK-NEXT: stnt1w { z0.d }, p0, [z1.d, x0]
28 %data_trunc = trunc <vscale x 2 x i64> %data to <vscale x 2 x i32>
29 call void @llvm.aarch64.sve.stnt1.scatter.index.nxv2i32(<vscale x 2 x i32> %data_trunc,
30 <vscale x 2 x i1> %pg,
32 <vscale x 2 x i64> %offsets)
36 define void @sstnt1d_index(<vscale x 2 x i64> %data, <vscale x 2 x i1> %pg, i64* %base, <vscale x 2 x i64> %offsets) {
37 ; CHECK-LABEL: sstnt1d_index
38 ; CHECK: lsl z1.d, z1.d, #3
39 ; CHECK-NEXT: stnt1d { z0.d }, p0, [z1.d, x0]
41 call void @llvm.aarch64.sve.stnt1.scatter.index.nxv2i64(<vscale x 2 x i64> %data,
42 <vscale x 2 x i1> %pg,
44 <vscale x 2 x i64> %offsets)
48 define void @sstnt1d_index_double(<vscale x 2 x double> %data, <vscale x 2 x i1> %pg, double* %base, <vscale x 2 x i64> %offsets) {
49 ; CHECK-LABEL: sstnt1d_index_double
50 ; CHECK: lsl z1.d, z1.d, #3
51 ; CHECK-NEXT: stnt1d { z0.d }, p0, [z1.d, x0]
53 call void @llvm.aarch64.sve.stnt1.scatter.index.nxv2f64(<vscale x 2 x double> %data,
54 <vscale x 2 x i1> %pg,
56 <vscale x 2 x i64> %offsets)
61 declare void @llvm.aarch64.sve.stnt1.scatter.index.nxv2i16(<vscale x 2 x i16>, <vscale x 2 x i1>, i16*, <vscale x 2 x i64>)
62 declare void @llvm.aarch64.sve.stnt1.scatter.index.nxv2i32(<vscale x 2 x i32>, <vscale x 2 x i1>, i32*, <vscale x 2 x i64>)
63 declare void @llvm.aarch64.sve.stnt1.scatter.index.nxv2i64(<vscale x 2 x i64>, <vscale x 2 x i1>, i64*, <vscale x 2 x i64>)
64 declare void @llvm.aarch64.sve.stnt1.scatter.index.nxv2f64(<vscale x 2 x double>, <vscale x 2 x i1>, double*, <vscale x 2 x i64>)