1; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve < %s 2>%t | FileCheck %s 2; RUN: FileCheck --check-prefix=WARN --allow-empty %s <%t 3 4; If this check fails please read test/CodeGen/AArch64/README for instructions on how to resolve it. 5; WARN-NOT: warning 6 7; 8; ST1B, ST1W, ST1H, ST1D: base + 64-bit unscaled offset 9; e.g. st1h { z0.d }, p0, [x0, z1.d] 10; 11 12define void @sst1b_d(<vscale x 2 x i64> %data, <vscale x 2 x i1> %pg, i8* %base, <vscale x 2 x i64> %b) { 13; CHECK-LABEL: sst1b_d: 14; CHECK: st1b { z0.d }, p0, [x0, z1.d] 15; CHECK-NEXT: ret 16 %data_trunc = trunc <vscale x 2 x i64> %data to <vscale x 2 x i8> 17 call void @llvm.aarch64.sve.st1.scatter.nxv2i8(<vscale x 2 x i8> %data_trunc, 18 <vscale x 2 x i1> %pg, 19 i8* %base, 20 <vscale x 2 x i64> %b) 21 ret void 22} 23 24define void @sst1h_d(<vscale x 2 x i64> %data, <vscale x 2 x i1> %pg, i16* %base, <vscale x 2 x i64> %b) { 25; CHECK-LABEL: sst1h_d: 26; CHECK: st1h { z0.d }, p0, [x0, z1.d] 27; CHECK-NEXT: ret 28 %data_trunc = trunc <vscale x 2 x i64> %data to <vscale x 2 x i16> 29 call void @llvm.aarch64.sve.st1.scatter.nxv2i16(<vscale x 2 x i16> %data_trunc, 30 <vscale x 2 x i1> %pg, 31 i16* %base, 32 <vscale x 2 x i64> %b) 33 ret void 34} 35 36define void @sst1w_d(<vscale x 2 x i64> %data, <vscale x 2 x i1> %pg, i32* %base, <vscale x 2 x i64> %b) { 37; CHECK-LABEL: sst1w_d: 38; CHECK: st1w { z0.d }, p0, [x0, z1.d] 39; CHECK-NEXT: ret 40 %data_trunc = trunc <vscale x 2 x i64> %data to <vscale x 2 x i32> 41 call void @llvm.aarch64.sve.st1.scatter.nxv2i32(<vscale x 2 x i32> %data_trunc, 42 <vscale x 2 x i1> %pg, 43 i32* %base, 44 <vscale x 2 x i64> %b) 45 ret void 46} 47 48define void @sst1d_d(<vscale x 2 x i64> %data, <vscale x 2 x i1> %pg, i64* %base, <vscale x 2 x i64> %b) { 49; CHECK-LABEL: sst1d_d: 50; CHECK: st1d { z0.d }, p0, [x0, z1.d] 51; CHECK-NEXT: ret 52 call void @llvm.aarch64.sve.st1.scatter.nxv2i64(<vscale x 2 x i64> %data, 53 <vscale x 2 x i1> %pg, 54 i64* %base, 55 <vscale x 2 x i64> %b) 56 ret void 57} 58 59define void @sst1d_d_double(<vscale x 2 x double> %data, <vscale x 2 x i1> %pg, double* %base, <vscale x 2 x i64> %b) { 60; CHECK-LABEL: sst1d_d_double: 61; CHECK: st1d { z0.d }, p0, [x0, z1.d] 62; CHECK-NEXT: ret 63 call void @llvm.aarch64.sve.st1.scatter.nxv2f64(<vscale x 2 x double> %data, 64 <vscale x 2 x i1> %pg, 65 double* %base, 66 <vscale x 2 x i64> %b) 67 ret void 68} 69 70declare void @llvm.aarch64.sve.st1.scatter.nxv2i8(<vscale x 2 x i8>, <vscale x 2 x i1>, i8*, <vscale x 2 x i64>) 71declare void @llvm.aarch64.sve.st1.scatter.nxv2i16(<vscale x 2 x i16>, <vscale x 2 x i1>, i16*, <vscale x 2 x i64>) 72declare void @llvm.aarch64.sve.st1.scatter.nxv2i32(<vscale x 2 x i32>, <vscale x 2 x i1>, i32*, <vscale x 2 x i64>) 73declare void @llvm.aarch64.sve.st1.scatter.nxv2i64(<vscale x 2 x i64>, <vscale x 2 x i1>, i64*, <vscale x 2 x i64>) 74declare void @llvm.aarch64.sve.st1.scatter.nxv2f64(<vscale x 2 x double>, <vscale x 2 x i1>, double*, <vscale x 2 x i64>) 75