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
5 ; LDFF1H, LDFF1W, LDFF1D: base + 64-bit scaled offset
6 ; e.g. ldff1h z0.d, p0/z, [x0, z0.d, lsl #1]
9 define <vscale x 2 x i64> @gldff1h_index(<vscale x 2 x i1> %pg, ptr %base, <vscale x 2 x i64> %b) {
10 ; CHECK-LABEL: gldff1h_index:
12 ; CHECK-NEXT: ldff1h { z0.d }, p0/z, [x0, z0.d, lsl #1]
14 %load = call <vscale x 2 x i16> @llvm.aarch64.sve.ldff1.gather.index.nxv2i16(<vscale x 2 x i1> %pg,
16 <vscale x 2 x i64> %b)
17 %res = zext <vscale x 2 x i16> %load to <vscale x 2 x i64>
18 ret <vscale x 2 x i64> %res
21 define <vscale x 2 x i64> @gldff1w_index(<vscale x 2 x i1> %pg, ptr %base, <vscale x 2 x i64> %b) {
22 ; CHECK-LABEL: gldff1w_index:
24 ; CHECK-NEXT: ldff1w { z0.d }, p0/z, [x0, z0.d, lsl #2]
26 %load = call <vscale x 2 x i32> @llvm.aarch64.sve.ldff1.gather.index.nxv2i32(<vscale x 2 x i1> %pg,
28 <vscale x 2 x i64> %b)
29 %res = zext <vscale x 2 x i32> %load to <vscale x 2 x i64>
30 ret <vscale x 2 x i64> %res
33 define <vscale x 2 x i64> @gldff1d_index(<vscale x 2 x i1> %pg, ptr %base, <vscale x 2 x i64> %b) {
34 ; CHECK-LABEL: gldff1d_index:
36 ; CHECK-NEXT: ldff1d { z0.d }, p0/z, [x0, z0.d, lsl #3]
38 %load = call <vscale x 2 x i64> @llvm.aarch64.sve.ldff1.gather.index.nxv2i64(<vscale x 2 x i1> %pg,
40 <vscale x 2 x i64> %b)
41 ret <vscale x 2 x i64> %load
44 define <vscale x 2 x double> @gldff1d_index_double(<vscale x 2 x i1> %pg, ptr %base, <vscale x 2 x i64> %b) {
45 ; CHECK-LABEL: gldff1d_index_double:
47 ; CHECK-NEXT: ldff1d { z0.d }, p0/z, [x0, z0.d, lsl #3]
49 %load = call <vscale x 2 x double> @llvm.aarch64.sve.ldff1.gather.index.nxv2f64(<vscale x 2 x i1> %pg,
51 <vscale x 2 x i64> %b)
52 ret <vscale x 2 x double> %load
56 ; LDFF1SH, LDFF1SW: base + 64-bit scaled offset
57 ; e.g. ldff1sh z0.d, p0/z, [x0, z0.d, lsl #1]
60 define <vscale x 2 x i64> @gldff1sh_index(<vscale x 2 x i1> %pg, ptr %base, <vscale x 2 x i64> %b) {
61 ; CHECK-LABEL: gldff1sh_index:
63 ; CHECK-NEXT: ldff1sh { z0.d }, p0/z, [x0, z0.d, lsl #1]
65 %load = call <vscale x 2 x i16> @llvm.aarch64.sve.ldff1.gather.index.nxv2i16(<vscale x 2 x i1> %pg,
67 <vscale x 2 x i64> %b)
68 %res = sext <vscale x 2 x i16> %load to <vscale x 2 x i64>
69 ret <vscale x 2 x i64> %res
72 define <vscale x 2 x i64> @gldff1sw_index(<vscale x 2 x i1> %pg, ptr %base, <vscale x 2 x i64> %b) {
73 ; CHECK-LABEL: gldff1sw_index:
75 ; CHECK-NEXT: ldff1sw { z0.d }, p0/z, [x0, z0.d, lsl #2]
77 %load = call <vscale x 2 x i32> @llvm.aarch64.sve.ldff1.gather.index.nxv2i32(<vscale x 2 x i1> %pg,
79 <vscale x 2 x i64> %b)
80 %res = sext <vscale x 2 x i32> %load to <vscale x 2 x i64>
81 ret <vscale x 2 x i64> %res
84 declare <vscale x 2 x i16> @llvm.aarch64.sve.ldff1.gather.index.nxv2i16(<vscale x 2 x i1>, ptr, <vscale x 2 x i64>)
85 declare <vscale x 2 x i32> @llvm.aarch64.sve.ldff1.gather.index.nxv2i32(<vscale x 2 x i1>, ptr, <vscale x 2 x i64>)
86 declare <vscale x 2 x i64> @llvm.aarch64.sve.ldff1.gather.index.nxv2i64(<vscale x 2 x i1>, ptr, <vscale x 2 x i64>)
87 declare <vscale x 2 x double> @llvm.aarch64.sve.ldff1.gather.index.nxv2f64(<vscale x 2 x i1>, ptr, <vscale x 2 x i64>)