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 ; LDFF1B, LDFF1W, LDFF1H, LDFF1D: base + 64-bit unscaled offset
6 ; e.g. ldff1h { z0.d }, p0/z, [x0, z0.d]
9 define <vscale x 2 x i64> @gldff1b_d(<vscale x 2 x i1> %pg, ptr %base, <vscale x 2 x i64> %b) {
10 ; CHECK-LABEL: gldff1b_d:
12 ; CHECK-NEXT: ldff1b { z0.d }, p0/z, [x0, z0.d]
14 %load = call <vscale x 2 x i8> @llvm.aarch64.sve.ldff1.gather.nxv2i8(<vscale x 2 x i1> %pg,
16 <vscale x 2 x i64> %b)
17 %res = zext <vscale x 2 x i8> %load to <vscale x 2 x i64>
18 ret <vscale x 2 x i64> %res
21 define <vscale x 2 x i64> @gldff1h_d(<vscale x 2 x i1> %pg, ptr %base, <vscale x 2 x i64> %b) {
22 ; CHECK-LABEL: gldff1h_d:
24 ; CHECK-NEXT: ldff1h { z0.d }, p0/z, [x0, z0.d]
26 %load = call <vscale x 2 x i16> @llvm.aarch64.sve.ldff1.gather.nxv2i16(<vscale x 2 x i1> %pg,
28 <vscale x 2 x i64> %b)
29 %res = zext <vscale x 2 x i16> %load to <vscale x 2 x i64>
30 ret <vscale x 2 x i64> %res
33 define <vscale x 2 x i64> @gldff1w_d(<vscale x 2 x i1> %pg, ptr %base, <vscale x 2 x i64> %offsets) {
34 ; CHECK-LABEL: gldff1w_d:
36 ; CHECK-NEXT: ldff1w { z0.d }, p0/z, [x0, z0.d]
38 %load = call <vscale x 2 x i32> @llvm.aarch64.sve.ldff1.gather.nxv2i32(<vscale x 2 x i1> %pg,
40 <vscale x 2 x i64> %offsets)
41 %res = zext <vscale x 2 x i32> %load to <vscale x 2 x i64>
42 ret <vscale x 2 x i64> %res
45 define <vscale x 2 x i64> @gldff1d_d(<vscale x 2 x i1> %pg, ptr %base, <vscale x 2 x i64> %b) {
46 ; CHECK-LABEL: gldff1d_d:
48 ; CHECK-NEXT: ldff1d { z0.d }, p0/z, [x0, z0.d]
50 %load = call <vscale x 2 x i64> @llvm.aarch64.sve.ldff1.gather.nxv2i64(<vscale x 2 x i1> %pg,
52 <vscale x 2 x i64> %b)
53 ret <vscale x 2 x i64> %load
56 define <vscale x 2 x double> @gldff1d_d_double(<vscale x 2 x i1> %pg, ptr %base, <vscale x 2 x i64> %b) {
57 ; CHECK-LABEL: gldff1d_d_double:
59 ; CHECK-NEXT: ldff1d { z0.d }, p0/z, [x0, z0.d]
61 %load = call <vscale x 2 x double> @llvm.aarch64.sve.ldff1.gather.nxv2f64(<vscale x 2 x i1> %pg,
63 <vscale x 2 x i64> %b)
64 ret <vscale x 2 x double> %load
68 ; LDFF1SB, LDFF1SW, LDFF1SH: base + 64-bit unscaled offset
69 ; e.g. ldff1sh { z0.d }, p0/z, [x0, z0.d]
72 define <vscale x 2 x i64> @gldff1sb_d(<vscale x 2 x i1> %pg, ptr %base, <vscale x 2 x i64> %b) {
73 ; CHECK-LABEL: gldff1sb_d:
75 ; CHECK-NEXT: ldff1sb { z0.d }, p0/z, [x0, z0.d]
77 %load = call <vscale x 2 x i8> @llvm.aarch64.sve.ldff1.gather.nxv2i8(<vscale x 2 x i1> %pg,
79 <vscale x 2 x i64> %b)
80 %res = sext <vscale x 2 x i8> %load to <vscale x 2 x i64>
81 ret <vscale x 2 x i64> %res
84 define <vscale x 2 x i64> @gldff1sh_d(<vscale x 2 x i1> %pg, ptr %base, <vscale x 2 x i64> %b) {
85 ; CHECK-LABEL: gldff1sh_d:
87 ; CHECK-NEXT: ldff1sh { z0.d }, p0/z, [x0, z0.d]
89 %load = call <vscale x 2 x i16> @llvm.aarch64.sve.ldff1.gather.nxv2i16(<vscale x 2 x i1> %pg,
91 <vscale x 2 x i64> %b)
92 %res = sext <vscale x 2 x i16> %load to <vscale x 2 x i64>
93 ret <vscale x 2 x i64> %res
96 define <vscale x 2 x i64> @gldff1sw_d(<vscale x 2 x i1> %pg, ptr %base, <vscale x 2 x i64> %offsets) {
97 ; CHECK-LABEL: gldff1sw_d:
99 ; CHECK-NEXT: ldff1sw { z0.d }, p0/z, [x0, z0.d]
101 %load = call <vscale x 2 x i32> @llvm.aarch64.sve.ldff1.gather.nxv2i32(<vscale x 2 x i1> %pg,
103 <vscale x 2 x i64> %offsets)
104 %res = sext <vscale x 2 x i32> %load to <vscale x 2 x i64>
105 ret <vscale x 2 x i64> %res
108 declare <vscale x 2 x i8> @llvm.aarch64.sve.ldff1.gather.nxv2i8(<vscale x 2 x i1>, ptr, <vscale x 2 x i64>)
109 declare <vscale x 2 x i16> @llvm.aarch64.sve.ldff1.gather.nxv2i16(<vscale x 2 x i1>, ptr, <vscale x 2 x i64>)
110 declare <vscale x 2 x i32> @llvm.aarch64.sve.ldff1.gather.nxv2i32(<vscale x 2 x i1>, ptr, <vscale x 2 x i64>)
111 declare <vscale x 2 x i64> @llvm.aarch64.sve.ldff1.gather.nxv2i64(<vscale x 2 x i1>, ptr, <vscale x 2 x i64>)
112 declare <vscale x 2 x double> @llvm.aarch64.sve.ldff1.gather.nxv2f64(<vscale x 2 x i1>, ptr, <vscale x 2 x i64>)