; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py ; 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 define @ld1b_lower_bound(* %a) { ; CHECK-LABEL: ld1b_lower_bound: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.b ; CHECK-NEXT: ld1b { z0.b }, p0/z, [x0, #-8, mul vl] ; CHECK-NEXT: ret %base = getelementptr , * %a, i64 -8 %load = load , * %base ret %load } define @ld1b_inbound(* %a) { ; CHECK-LABEL: ld1b_inbound: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.b ; CHECK-NEXT: ld1b { z0.b }, p0/z, [x0, #2, mul vl] ; CHECK-NEXT: ret %base = getelementptr , * %a, i64 2 %load = load , * %base ret %load } define @ld1b_upper_bound(* %a) { ; CHECK-LABEL: ld1b_upper_bound: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.b ; CHECK-NEXT: ld1b { z0.b }, p0/z, [x0, #7, mul vl] ; CHECK-NEXT: ret %base = getelementptr , * %a, i64 7 %load = load , * %base ret %load } define @ld1b_out_of_upper_bound(* %a) { ; CHECK-LABEL: ld1b_out_of_upper_bound: ; CHECK: // %bb.0: ; CHECK-NEXT: addvl x8, x0, #8 ; CHECK-NEXT: ptrue p0.b ; CHECK-NEXT: ld1b { z0.b }, p0/z, [x8] ; CHECK-NEXT: ret %base = getelementptr , * %a, i64 8 %load = load , * %base ret %load } define @ld1b_out_of_lower_bound(* %a) { ; CHECK-LABEL: ld1b_out_of_lower_bound: ; CHECK: // %bb.0: ; CHECK-NEXT: addvl x8, x0, #-9 ; CHECK-NEXT: ptrue p0.b ; CHECK-NEXT: ld1b { z0.b }, p0/z, [x8] ; CHECK-NEXT: ret %base = getelementptr , * %a, i64 -9 %load = load , * %base ret %load } ; LD1H define @ld1h_inbound(* %a) { ; CHECK-LABEL: ld1h_inbound: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.h ; CHECK-NEXT: ld1h { z0.h }, p0/z, [x0, #-2, mul vl] ; CHECK-NEXT: ret %base = getelementptr , * %a, i64 -2 %load = load , * %base ret %load } ; LD1W define @ld1s_inbound(* %a) { ; CHECK-LABEL: ld1s_inbound: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.s ; CHECK-NEXT: ld1w { z0.s }, p0/z, [x0, #4, mul vl] ; CHECK-NEXT: ret %base = getelementptr , * %a, i64 4 %load = load , * %base ret %load } ; LD1D define @ld1d_inbound(* %a) { ; CHECK-LABEL: ld1d_inbound: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.d ; CHECK-NEXT: ld1d { z0.d }, p0/z, [x0, #6, mul vl] ; CHECK-NEXT: ret %base = getelementptr , * %a, i64 6 %load = load , * %base ret %load } define void @load_nxv6f16(* %a) { ; CHECK-LABEL: load_nxv6f16: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.d ; CHECK-NEXT: ptrue p1.s ; CHECK-NEXT: ld1h { z0.d }, p0/z, [x0, #2, mul vl] ; CHECK-NEXT: ld1h { z0.s }, p1/z, [x0] ; CHECK-NEXT: ret %val = load volatile , * %a ret void } define void @load_nxv6f32(* %a) { ; CHECK-LABEL: load_nxv6f32: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.d ; CHECK-NEXT: ptrue p1.s ; CHECK-NEXT: ld1w { z0.d }, p0/z, [x0, #2, mul vl] ; CHECK-NEXT: ld1w { z0.s }, p1/z, [x0] ; CHECK-NEXT: ret %val = load volatile , * %a ret void } define void @load_nxv12f16(* %a) { ; CHECK-LABEL: load_nxv12f16: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.s ; CHECK-NEXT: ptrue p1.h ; CHECK-NEXT: ld1h { z0.s }, p0/z, [x0, #2, mul vl] ; CHECK-NEXT: ld1h { z0.h }, p1/z, [x0] ; CHECK-NEXT: ret %val = load volatile , * %a ret void }