@@ -794,6 +794,8 @@ define void @zpr_and_ppr_local_stack_probing(<vscale x 16 x i1> %pred, <vscale x
794794}
795795
796796; Only PPR callee-saves + a VLA
797+ ; Expect: No hazard padding. Frame pointer (x29), p4-p6 callee saves allocated
798+ ; with `addvl #-1`, PPR saves restored using frame pointer `addvl sp, x29, #-1`.
797799define aarch64_sve_vector_pcs void @only_ppr_csr_vla (i64 %n ) {
798800; CHECK-LABEL: only_ppr_csr_vla:
799801; CHECK: // %bb.0:
@@ -832,6 +834,8 @@ define aarch64_sve_vector_pcs void @only_ppr_csr_vla(i64 %n) {
832834}
833835
834836; Only ZPR callee-saves + a VLA
837+ ; Expect: Hazard padding, Frame pointer (x29), z8-z10 callee saves allocated
838+ ; with `addvl #-3`. ZPR saves restored from `FP - 1024 + addvl #-3`.
835839define aarch64_sve_vector_pcs void @only_zpr_csr_vla (i64 %n ) {
836840; CHECK-LABEL: only_zpr_csr_vla:
837841; CHECK: // %bb.0:
@@ -879,6 +883,10 @@ define aarch64_sve_vector_pcs void @only_zpr_csr_vla(i64 %n) {
879883}
880884
881885; PPR+ZPR callee-saves + a VLA
886+ ; Expect: Hazard padding, Frame pointer (x29), PPR (p4-p6) and ZPR (z8-z10)
887+ ; callee-saves allocated separately, with hazard padding of 1024 between the
888+ ; areas. ZPR callee saves restored by `FP - 1024 + addvl #-4`, PPR callee saves
889+ ; restored by `FP + addvl #-1`.
882890define aarch64_sve_vector_pcs void @zpr_ppr_csr_vla (i64 %n ) {
883891; CHECK-LABEL: zpr_ppr_csr_vla:
884892; CHECK: // %bb.0:
@@ -931,6 +939,10 @@ define aarch64_sve_vector_pcs void @zpr_ppr_csr_vla(i64 %n) {
931939}
932940
933941; Only PPR callee-saves (and ZPR/PPR locals) + a VLA
942+ ; Expect: Hazard padding, Frame pointer (x29), PPR (p4-p6) callee-saves, with
943+ ; hazard padding after the PPR callee saves (1024) and after the FPR local area
944+ ; (1024) -- coeleased to 2048. Only PPRs restored by moving the SP to
945+ ; `FP + addvl #-1`.
934946define void @sve_locals_only_ppr_csr_vla (i64 %n , <vscale x 16 x i1 > %pred , <vscale x 16 x i8 > %vector ) {
935947; CHECK-LABEL: sve_locals_only_ppr_csr_vla:
936948; CHECK: // %bb.0:
@@ -978,6 +990,9 @@ define void @sve_locals_only_ppr_csr_vla(i64 %n, <vscale x 16 x i1> %pred, <vsca
978990}
979991
980992; Only ZPR callee-saves (and ZPR/PPR locals) + a VLA
993+ ; Expect: Hazard padding, Frame pointer (x29), ZPR (z8-z10) callee-saves, with
994+ ; hazard padding before the ZPR callee saves (1024) and after the ZPR local area
995+ ; (1024). Only ZPRs restored by moving the SP to `FP - 1024 + addvl #-4`.
981996define void @sve_locals_only_zpr_csr_vla (i64 %n , <vscale x 16 x i1 > %pred , <vscale x 16 x i8 > %vector ) {
982997; CHECK-LABEL: sve_locals_only_zpr_csr_vla:
983998; CHECK: // %bb.0:
@@ -1029,6 +1044,10 @@ define void @sve_locals_only_zpr_csr_vla(i64 %n, <vscale x 16 x i1> %pred, <vsca
10291044}
10301045
10311046; PPR+ZPR callee-saves (and ZPR/PPR locals) + a VLA
1047+ ; Expect: Hazard padding, Frame pointer (x29), PPR (p4-p6) and ZPR (z8-z10)
1048+ ; callee-saves, with hazard padding before the ZPR callee saves (1024) and after
1049+ ; the ZPR local area (1024). ZPRs restored by moving the SP to
1050+ ; `FP - 1024 + addvl #-5`, PPRs restored by moving SP to `FP + addvl #-1`.
10321051define void @sve_locals_zpr_ppr_csr_vla (i64 %n , <vscale x 16 x i1 > %pred , <vscale x 16 x i8 > %vector ) {
10331052; CHECK-LABEL: sve_locals_zpr_ppr_csr_vla:
10341053; CHECK: // %bb.0:
0 commit comments