; 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 define @sti64ldi64(* nocapture %P, %v) { ; CHECK-LABEL: sti64ldi64: ; CHECK: // %bb.0: // %entry ; CHECK-NEXT: ptrue p0.d ; CHECK-NEXT: st1d { z0.d }, p0, [x0, #1, mul vl] ; CHECK-NEXT: ret entry: %arrayidx0 = getelementptr inbounds , * %P, i64 1 store %v, * %arrayidx0 %arrayidx1 = getelementptr inbounds , * %P, i64 1 %0 = load , * %arrayidx1 ret %0 } define @stf64ldf64(* nocapture %P, %v) { ; CHECK-LABEL: stf64ldf64: ; CHECK: // %bb.0: // %entry ; CHECK-NEXT: ptrue p0.d ; CHECK-NEXT: st1d { z0.d }, p0, [x0, #1, mul vl] ; CHECK-NEXT: ret entry: %arrayidx0 = getelementptr inbounds , * %P, i64 1 store %v, * %arrayidx0 %arrayidx1 = getelementptr inbounds , * %P, i64 1 %0 = load , * %arrayidx1 ret %0 } define @sti32ldi32ext(* nocapture %P, %v) { ; CHECK-LABEL: sti32ldi32ext: ; CHECK: // %bb.0: // %entry ; CHECK-NEXT: ptrue p0.d ; CHECK-NEXT: sxtw z1.d, p0/m, z0.d ; CHECK-NEXT: st1w { z0.d }, p0, [x0] ; CHECK-NEXT: mov z0.d, z1.d ; CHECK-NEXT: ret entry: %0 = trunc %v to store %0, * %P %1 = load , * %P %2 = sext %1 to ret %2 } define <2 x i64> @sti64ldfixedi64(* nocapture %P, %v) { ; CHECK-LABEL: sti64ldfixedi64: ; CHECK: // %bb.0: // %entry ; CHECK-NEXT: ptrue p0.d ; CHECK-NEXT: rdvl x8, #1 ; CHECK-NEXT: st1d { z0.d }, p0, [x0, #1, mul vl] ; CHECK-NEXT: ldr q0, [x0, x8] ; CHECK-NEXT: ret entry: %arrayidx0 = getelementptr inbounds , * %P, i64 1 store %v, * %arrayidx0 %arrayidx1 = bitcast * %arrayidx0 to <2 x i64>* %0 = load <2 x i64>, <2 x i64>* %arrayidx1 ret <2 x i64> %0 } define @sti64ldi32(* nocapture %P, %v) { ; CHECK-LABEL: sti64ldi32: ; CHECK: // %bb.0: // %entry ; CHECK-NEXT: ptrue p0.d ; CHECK-NEXT: st1d { z0.d }, p0, [x0, #1, mul vl] ; CHECK-NEXT: ptrue p0.s ; CHECK-NEXT: ld1w { z0.s }, p0/z, [x0, #1, mul vl] ; CHECK-NEXT: ret entry: %0 = bitcast * %P to * %arrayidx0 = getelementptr inbounds , * %P, i64 1 store %v, * %arrayidx0 %arrayidx1 = getelementptr inbounds , * %0, i64 1 %1 = load , * %arrayidx1 ret %1 } define @stf64ldi64(* nocapture %P, %v) { ; CHECK-LABEL: stf64ldi64: ; CHECK: // %bb.0: // %entry ; CHECK-NEXT: ptrue p0.d ; CHECK-NEXT: st1d { z0.d }, p0, [x0, #1, mul vl] ; CHECK-NEXT: ld1d { z0.d }, p0/z, [x0, #1, mul vl] ; CHECK-NEXT: ret entry: %0 = bitcast * %P to * %arrayidx0 = getelementptr inbounds , * %P, i64 1 store %v, * %arrayidx0 %arrayidx1 = getelementptr inbounds , * %0, i64 1 %1 = load , * %arrayidx1 ret %1 }