; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve2 < %s 2>%t | FileCheck %s ; RUN: FileCheck --check-prefix=WARN --allow-empty %s <%t ; If this check fails please read test/CodeGen/AArch64/README for instructions on how to resolve it. ; WARN-NOT: warning ; ; LDNT1B, LDNT1W, LDNT1H, LDNT1D: vector base + scalar offset ; ldnt1b { z0.s }, p0/z, [z0.s, x0] ; ; LDNT1B define @gldnt1b_s( %pg, %base, i64 %offset) { ; CHECK-LABEL: gldnt1b_s: ; CHECK: ldnt1b { z0.s }, p0/z, [z0.s, x0] ; CHECK-NEXT: ret %load = call @llvm.aarch64.sve.ldnt1.gather.scalar.offset.nxv4i8.nxv4i32( %pg, %base, i64 %offset) %res = zext %load to ret %res } define @gldnt1b_d( %pg, %base, i64 %offset) { ; CHECK-LABEL: gldnt1b_d: ; CHECK: ldnt1b { z0.d }, p0/z, [z0.d, x0] ; CHECK-NEXT: ret %load = call @llvm.aarch64.sve.ldnt1.gather.scalar.offset.nxv2i8.nxv2i64( %pg, %base, i64 %offset) %res = zext %load to ret %res } ; LDNT1H define @gldnt1h_s( %pg, %base, i64 %offset) { ; CHECK-LABEL: gldnt1h_s: ; CHECK: ldnt1h { z0.s }, p0/z, [z0.s, x0] ; CHECK-NEXT: ret %load = call @llvm.aarch64.sve.ldnt1.gather.scalar.offset.nxv416.nxv4i32( %pg, %base, i64 %offset) %res = zext %load to ret %res } define @gldnt1h_d( %pg, %base, i64 %offset) { ; CHECK-LABEL: gldnt1h_d: ; CHECK: ldnt1h { z0.d }, p0/z, [z0.d, x0] ; CHECK-NEXT: ret %load = call @llvm.aarch64.sve.ldnt1.gather.scalar.offset.nxv2i16.nxv2i64( %pg, %base, i64 %offset) %res = zext %load to ret %res } ; LDNT1W define @gldnt1w_s( %pg, %base, i64 %offset) { ; CHECK-LABEL: gldnt1w_s: ; CHECK: ldnt1w { z0.s }, p0/z, [z0.s, x0] ; CHECK-NEXT: ret %load = call @llvm.aarch64.sve.ldnt1.gather.scalar.offset.nxv4i32.nxv4i32( %pg, %base, i64 %offset) ret %load } define @gldnt1w_s_float( %pg, %base, i64 %offset) { ; CHECK-LABEL: gldnt1w_s_float: ; CHECK: ldnt1w { z0.s }, p0/z, [z0.s, x0] ; CHECK-NEXT: ret %load = call @llvm.aarch64.sve.ldnt1.gather.scalar.offset.nxv4f32.nxv4i32( %pg, %base, i64 %offset) ret %load } define @gldnt1w_d( %pg, %base, i64 %offset) { ; CHECK-LABEL: gldnt1w_d: ; CHECK: ldnt1w { z0.d }, p0/z, [z0.d, x0] ; CHECK-NEXT: ret %load = call @llvm.aarch64.sve.ldnt1.gather.scalar.offset.nxv2i32.nxv2i64( %pg, %base, i64 %offset) %res = zext %load to ret %res } ; LDNT1D define @gldnt1d_d( %pg, %base, i64 %offset) { ; CHECK-LABEL: gldnt1d_d: ; CHECK: ldnt1d { z0.d }, p0/z, [z0.d, x0] ; CHECK-NEXT: ret %load = call @llvm.aarch64.sve.ldnt1.gather.scalar.offset.nxv2i64.nxv2i64( %pg, %base, i64 %offset) ret %load } ; LDNT1D define @gldnt1d_d_double( %pg, %base, i64 %offset) { ; CHECK-LABEL: gldnt1d_d_double: ; CHECK: ldnt1d { z0.d }, p0/z, [z0.d, x0] ; CHECK-NEXT: ret %load = call @llvm.aarch64.sve.ldnt1.gather.scalar.offset.nxv2f64.nxv2i64( %pg, %base, i64 %offset) ret %load } ; ; LDNT1SB, LDNT1SW, LDNT1SH, LDNT1SD: vector base + scalar offset ; ldnt1sb { z0.s }, p0/z, [z0.s, x0] ; ; LDNT1SB define @gldnt1sb_s( %pg, %base, i64 %offset) { ; CHECK-LABEL: gldnt1sb_s: ; CHECK: ldnt1sb { z0.s }, p0/z, [z0.s, x0] ; CHECK-NEXT: ret %load = call @llvm.aarch64.sve.ldnt1.gather.scalar.offset.nxv4i8.nxv4i32( %pg, %base, i64 %offset) %res = sext %load to ret %res } define @gldnt1sb_d( %pg, %base, i64 %offset) { ; CHECK-LABEL: gldnt1sb_d: ; CHECK: ldnt1sb { z0.d }, p0/z, [z0.d, x0] ; CHECK-NEXT: ret %load = call @llvm.aarch64.sve.ldnt1.gather.scalar.offset.nxv2i8.nxv2i64( %pg, %base, i64 %offset) %res = sext %load to ret %res } ; LDNT1SH define @gldnt1sh_s( %pg, %base, i64 %offset) { ; CHECK-LABEL: gldnt1sh_s: ; CHECK: ldnt1sh { z0.s }, p0/z, [z0.s, x0] ; CHECK-NEXT: ret %load = call @llvm.aarch64.sve.ldnt1.gather.scalar.offset.nxv416.nxv4i32( %pg, %base, i64 %offset) %res = sext %load to ret %res } define @gldnt1sh_d( %pg, %base, i64 %offset) { ; CHECK-LABEL: gldnt1sh_d: ; CHECK: ldnt1sh { z0.d }, p0/z, [z0.d, x0] ; CHECK-NEXT: ret %load = call @llvm.aarch64.sve.ldnt1.gather.scalar.offset.nxv2i16.nxv2i64( %pg, %base, i64 %offset) %res = sext %load to ret %res } ; LDNT1SW define @gldnt1sw_d( %pg, %base, i64 %offset) { ; CHECK-LABEL: gldnt1sw_d: ; CHECK: ldnt1sw { z0.d }, p0/z, [z0.d, x0] ; CHECK-NEXT: ret %load = call @llvm.aarch64.sve.ldnt1.gather.scalar.offset.nxv2i32.nxv2i64( %pg, %base, i64 %offset) %res = sext %load to ret %res } ; LDNT1B/LDNT1SB declare @llvm.aarch64.sve.ldnt1.gather.scalar.offset.nxv4i8.nxv4i32(, , i64) declare @llvm.aarch64.sve.ldnt1.gather.scalar.offset.nxv2i8.nxv2i64(, , i64) ; LDNT1H/LDNT1SH declare @llvm.aarch64.sve.ldnt1.gather.scalar.offset.nxv416.nxv4i32(, , i64) declare @llvm.aarch64.sve.ldnt1.gather.scalar.offset.nxv2i16.nxv2i64(, , i64) ; LDNT1W/LDNT1SW declare @llvm.aarch64.sve.ldnt1.gather.scalar.offset.nxv4i32.nxv4i32(, , i64) declare @llvm.aarch64.sve.ldnt1.gather.scalar.offset.nxv2i32.nxv2i64(, , i64) declare @llvm.aarch64.sve.ldnt1.gather.scalar.offset.nxv4f32.nxv4i32(, , i64) ; LDNT1D declare @llvm.aarch64.sve.ldnt1.gather.scalar.offset.nxv2i64.nxv2i64(, , i64) declare @llvm.aarch64.sve.ldnt1.gather.scalar.offset.nxv2f64.nxv2i64(, , i64)