1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve2 < %s | FileCheck %s
5 ; LDNT1B, LDNT1W, LDNT1H, LDNT1D: base + 64-bit unscaled offsets
6 ; e.g. ldnt1h { z0.d }, p0/z, [z0.d, x0]
9 define <vscale x 2 x i64> @gldnt1b_d(<vscale x 2 x i1> %pg, ptr %base, <vscale x 2 x i64> %b) {
10 ; CHECK-LABEL: gldnt1b_d:
12 ; CHECK-NEXT: ldnt1b { z0.d }, p0/z, [z0.d, x0]
14 %load = call <vscale x 2 x i8> @llvm.aarch64.sve.ldnt1.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> @gldnt1h_d(<vscale x 2 x i1> %pg, ptr %base, <vscale x 2 x i64> %b) {
22 ; CHECK-LABEL: gldnt1h_d:
24 ; CHECK-NEXT: ldnt1h { z0.d }, p0/z, [z0.d, x0]
26 %load = call <vscale x 2 x i16> @llvm.aarch64.sve.ldnt1.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> @gldnt1w_d(<vscale x 2 x i1> %pg, ptr %base, <vscale x 2 x i64> %offsets) {
34 ; CHECK-LABEL: gldnt1w_d:
36 ; CHECK-NEXT: ldnt1w { z0.d }, p0/z, [z0.d, x0]
38 %load = call <vscale x 2 x i32> @llvm.aarch64.sve.ldnt1.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> @gldnt1d_d(<vscale x 2 x i1> %pg, ptr %base, <vscale x 2 x i64> %b) {
46 ; CHECK-LABEL: gldnt1d_d:
48 ; CHECK-NEXT: ldnt1d { z0.d }, p0/z, [z0.d, x0]
50 %load = call <vscale x 2 x i64> @llvm.aarch64.sve.ldnt1.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> @gldnt1d_d_double(<vscale x 2 x i1> %pg, ptr %base, <vscale x 2 x i64> %b) {
57 ; CHECK-LABEL: gldnt1d_d_double:
59 ; CHECK-NEXT: ldnt1d { z0.d }, p0/z, [z0.d, x0]
61 %load = call <vscale x 2 x double> @llvm.aarch64.sve.ldnt1.gather.nxv2f64(<vscale x 2 x i1> %pg,
63 <vscale x 2 x i64> %b)
64 ret <vscale x 2 x double> %load
68 ; LDNT1SB, LDNT1SW, LDNT1SH: base + 64-bit unscaled offsets
69 ; e.g. ldnt1sh { z0.d }, p0/z, [z0.d, x0]
72 define <vscale x 2 x i64> @gldnt1sb_d(<vscale x 2 x i1> %pg, ptr %base, <vscale x 2 x i64> %b) {
73 ; CHECK-LABEL: gldnt1sb_d:
75 ; CHECK-NEXT: ldnt1sb { z0.d }, p0/z, [z0.d, x0]
77 %load = call <vscale x 2 x i8> @llvm.aarch64.sve.ldnt1.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> @gldnt1sh_d(<vscale x 2 x i1> %pg, ptr %base, <vscale x 2 x i64> %b) {
85 ; CHECK-LABEL: gldnt1sh_d:
87 ; CHECK-NEXT: ldnt1sh { z0.d }, p0/z, [z0.d, x0]
89 %load = call <vscale x 2 x i16> @llvm.aarch64.sve.ldnt1.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> @gldnt1sw_d(<vscale x 2 x i1> %pg, ptr %base, <vscale x 2 x i64> %offsets) {
97 ; CHECK-LABEL: gldnt1sw_d:
99 ; CHECK-NEXT: ldnt1sw { z0.d }, p0/z, [z0.d, x0]
101 %load = call <vscale x 2 x i32> @llvm.aarch64.sve.ldnt1.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.ldnt1.gather.nxv2i8(<vscale x 2 x i1>, ptr, <vscale x 2 x i64>)
109 declare <vscale x 2 x i16> @llvm.aarch64.sve.ldnt1.gather.nxv2i16(<vscale x 2 x i1>, ptr, <vscale x 2 x i64>)
110 declare <vscale x 2 x i32> @llvm.aarch64.sve.ldnt1.gather.nxv2i32(<vscale x 2 x i1>, ptr, <vscale x 2 x i64>)
111 declare <vscale x 2 x i64> @llvm.aarch64.sve.ldnt1.gather.nxv2i64(<vscale x 2 x i1>, ptr, <vscale x 2 x i64>)
112 declare <vscale x 2 x double> @llvm.aarch64.sve.ldnt1.gather.nxv2f64(<vscale x 2 x i1>, ptr, <vscale x 2 x i64>)