; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve < %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 ; ; LD1B, LD1W, LD1H, LD1D: base + 64-bit unscaled offset ; e.g. ld1h { z0.d }, p0/z, [x0, z0.d] ; define @gld1b_d( %pg, i8* %base, %b) { ; CHECK-LABEL: gld1b_d: ; CHECK: ld1b { z0.d }, p0/z, [x0, z0.d] ; CHECK-NEXT: ret %load = call @llvm.aarch64.sve.ld1.gather.nxv2i8( %pg, i8* %base, %b) %res = zext %load to ret %res } define @gld1h_d( %pg, i16* %base, %b) { ; CHECK-LABEL: gld1h_d: ; CHECK: ld1h { z0.d }, p0/z, [x0, z0.d] ; CHECK-NEXT: ret %load = call @llvm.aarch64.sve.ld1.gather.nxv2i16( %pg, i16* %base, %b) %res = zext %load to ret %res } define @gld1w_d( %pg, i32* %base, %offsets) { ; CHECK-LABEL: gld1w_d: ; CHECK: ld1w { z0.d }, p0/z, [x0, z0.d] ; CHECK-NEXT: ret %load = call @llvm.aarch64.sve.ld1.gather.nxv2i32( %pg, i32* %base, %offsets) %res = zext %load to ret %res } define @gld1d_d( %pg, i64* %base, %b) { ; CHECK-LABEL: gld1d_d: ; CHECK: ld1d { z0.d }, p0/z, [x0, z0.d] ; CHECK-NEXT: ret %load = call @llvm.aarch64.sve.ld1.gather.nxv2i64( %pg, i64* %base, %b) ret %load } define @gld1d_d_double( %pg, double* %base, %b) { ; CHECK-LABEL: gld1d_d_double: ; CHECK: ld1d { z0.d }, p0/z, [x0, z0.d] ; CHECK-NEXT: ret %load = call @llvm.aarch64.sve.ld1.gather.nxv2f64( %pg, double* %base, %b) ret %load } ; ; LD1SB, LD1SW, LD1SH: base + 64-bit unscaled offset ; e.g. ld1sh { z0.d }, p0/z, [x0, z0.d] ; define @gld1sb_d( %pg, i8* %base, %b) { ; CHECK-LABEL: gld1sb_d: ; CHECK: ld1sb { z0.d }, p0/z, [x0, z0.d] ; CHECK-NEXT: ret %load = call @llvm.aarch64.sve.ld1.gather.nxv2i8( %pg, i8* %base, %b) %res = sext %load to ret %res } define @gld1sh_d( %pg, i16* %base, %b) { ; CHECK-LABEL: gld1sh_d: ; CHECK: ld1sh { z0.d }, p0/z, [x0, z0.d] ; CHECK-NEXT: ret %load = call @llvm.aarch64.sve.ld1.gather.nxv2i16( %pg, i16* %base, %b) %res = sext %load to ret %res } define @gld1sw_d( %pg, i32* %base, %offsets) { ; CHECK-LABEL: gld1sw_d: ; CHECK: ld1sw { z0.d }, p0/z, [x0, z0.d] ; CHECK-NEXT: ret %load = call @llvm.aarch64.sve.ld1.gather.nxv2i32( %pg, i32* %base, %offsets) %res = sext %load to ret %res } declare @llvm.aarch64.sve.ld1.gather.nxv2i8(, i8*, ) declare @llvm.aarch64.sve.ld1.gather.nxv2i16(, i16*, ) declare @llvm.aarch64.sve.ld1.gather.nxv2i32(, i32*, ) declare @llvm.aarch64.sve.ld1.gather.nxv2i64(, i64*, ) declare @llvm.aarch64.sve.ld1.gather.nxv2f64(, double*, )