1 ; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve < %s | FileCheck %s
4 ; LDFF1B, LDFF1W, LDFF1H, LDFF1D: base + 64-bit unscaled offset
5 ; e.g. ldff1h { z0.d }, p0/z, [x0, z0.d]
8 define <vscale x 2 x i64> @gldff1b_d(<vscale x 2 x i1> %pg, i8* %base, <vscale x 2 x i64> %b) {
9 ; CHECK-LABEL: gldff1b_d:
10 ; CHECK: ldff1b { z0.d }, p0/z, [x0, z0.d]
12 %load = call <vscale x 2 x i8> @llvm.aarch64.sve.ldff1.gather.nxv2i8(<vscale x 2 x i1> %pg,
14 <vscale x 2 x i64> %b)
15 %res = zext <vscale x 2 x i8> %load to <vscale x 2 x i64>
16 ret <vscale x 2 x i64> %res
19 define <vscale x 2 x i64> @gldff1h_d(<vscale x 2 x i1> %pg, i16* %base, <vscale x 2 x i64> %b) {
20 ; CHECK-LABEL: gldff1h_d:
21 ; CHECK: ldff1h { z0.d }, p0/z, [x0, z0.d]
23 %load = call <vscale x 2 x i16> @llvm.aarch64.sve.ldff1.gather.nxv2i16(<vscale x 2 x i1> %pg,
25 <vscale x 2 x i64> %b)
26 %res = zext <vscale x 2 x i16> %load to <vscale x 2 x i64>
27 ret <vscale x 2 x i64> %res
30 define <vscale x 2 x i64> @gldff1w_d(<vscale x 2 x i1> %pg, i32* %base, <vscale x 2 x i64> %offsets) {
31 ; CHECK-LABEL: gldff1w_d:
32 ; CHECK: ldff1w { z0.d }, p0/z, [x0, z0.d]
34 %load = call <vscale x 2 x i32> @llvm.aarch64.sve.ldff1.gather.nxv2i32(<vscale x 2 x i1> %pg,
36 <vscale x 2 x i64> %offsets)
37 %res = zext <vscale x 2 x i32> %load to <vscale x 2 x i64>
38 ret <vscale x 2 x i64> %res
41 define <vscale x 2 x i64> @gldff1d_d(<vscale x 2 x i1> %pg, i64* %base, <vscale x 2 x i64> %b) {
42 ; CHECK-LABEL: gldff1d_d:
43 ; CHECK: ldff1d { z0.d }, p0/z, [x0, z0.d]
45 %load = call <vscale x 2 x i64> @llvm.aarch64.sve.ldff1.gather.nxv2i64(<vscale x 2 x i1> %pg,
47 <vscale x 2 x i64> %b)
48 ret <vscale x 2 x i64> %load
51 define <vscale x 2 x double> @gldff1d_d_double(<vscale x 2 x i1> %pg, double* %base, <vscale x 2 x i64> %b) {
52 ; CHECK-LABEL: gldff1d_d_double:
53 ; CHECK: ldff1d { z0.d }, p0/z, [x0, z0.d]
55 %load = call <vscale x 2 x double> @llvm.aarch64.sve.ldff1.gather.nxv2f64(<vscale x 2 x i1> %pg,
57 <vscale x 2 x i64> %b)
58 ret <vscale x 2 x double> %load
62 ; LDFF1SB, LDFF1SW, LDFF1SH: base + 64-bit unscaled offset
63 ; e.g. ldff1sh { z0.d }, p0/z, [x0, z0.d]
66 define <vscale x 2 x i64> @gldff1sb_d(<vscale x 2 x i1> %pg, i8* %base, <vscale x 2 x i64> %b) {
67 ; CHECK-LABEL: gldff1sb_d:
68 ; CHECK: ldff1sb { z0.d }, p0/z, [x0, z0.d]
70 %load = call <vscale x 2 x i8> @llvm.aarch64.sve.ldff1.gather.nxv2i8(<vscale x 2 x i1> %pg,
72 <vscale x 2 x i64> %b)
73 %res = sext <vscale x 2 x i8> %load to <vscale x 2 x i64>
74 ret <vscale x 2 x i64> %res
77 define <vscale x 2 x i64> @gldff1sh_d(<vscale x 2 x i1> %pg, i16* %base, <vscale x 2 x i64> %b) {
78 ; CHECK-LABEL: gldff1sh_d:
79 ; CHECK: ldff1sh { z0.d }, p0/z, [x0, z0.d]
81 %load = call <vscale x 2 x i16> @llvm.aarch64.sve.ldff1.gather.nxv2i16(<vscale x 2 x i1> %pg,
83 <vscale x 2 x i64> %b)
84 %res = sext <vscale x 2 x i16> %load to <vscale x 2 x i64>
85 ret <vscale x 2 x i64> %res
88 define <vscale x 2 x i64> @gldff1sw_d(<vscale x 2 x i1> %pg, i32* %base, <vscale x 2 x i64> %offsets) {
89 ; CHECK-LABEL: gldff1sw_d:
90 ; CHECK: ldff1sw { z0.d }, p0/z, [x0, z0.d]
92 %load = call <vscale x 2 x i32> @llvm.aarch64.sve.ldff1.gather.nxv2i32(<vscale x 2 x i1> %pg,
94 <vscale x 2 x i64> %offsets)
95 %res = sext <vscale x 2 x i32> %load to <vscale x 2 x i64>
96 ret <vscale x 2 x i64> %res
99 declare <vscale x 2 x i8> @llvm.aarch64.sve.ldff1.gather.nxv2i8(<vscale x 2 x i1>, i8*, <vscale x 2 x i64>)
100 declare <vscale x 2 x i16> @llvm.aarch64.sve.ldff1.gather.nxv2i16(<vscale x 2 x i1>, i16*, <vscale x 2 x i64>)
101 declare <vscale x 2 x i32> @llvm.aarch64.sve.ldff1.gather.nxv2i32(<vscale x 2 x i1>, i32*, <vscale x 2 x i64>)
102 declare <vscale x 2 x i64> @llvm.aarch64.sve.ldff1.gather.nxv2i64(<vscale x 2 x i1>, i64*, <vscale x 2 x i64>)
103 declare <vscale x 2 x double> @llvm.aarch64.sve.ldff1.gather.nxv2f64(<vscale x 2 x i1>, double*, <vscale x 2 x i64>)