From 468a596bcd22a990a3d19cc3faec95eed29be300 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Wed, 7 Jul 2021 12:27:33 -0700 Subject: [PATCH] [AArch64] Simplify sve-breakdown-scalable-vectortype.ll. Fix the calling convention so we don't spill every SVE register. --- .../sve-breakdown-scalable-vectortype.ll | 1871 ++++------------- 1 file changed, 358 insertions(+), 1513 deletions(-) diff --git a/test/CodeGen/AArch64/sve-breakdown-scalable-vectortype.ll b/test/CodeGen/AArch64/sve-breakdown-scalable-vectortype.ll index b16cad568e0..2813b9d3719 100644 --- a/test/CodeGen/AArch64/sve-breakdown-scalable-vectortype.ll +++ b/test/CodeGen/AArch64/sve-breakdown-scalable-vectortype.ll @@ -4,7 +4,7 @@ ; Test that scalable vectors that are a multiple of the legal vector size ; can be properly broken down into part vectors. -declare void @bar() +declare aarch64_sve_vector_pcs void @bar() ; ; Vectors twice the size @@ -13,82 +13,26 @@ declare void @bar() define @wide_32i8(i1 %b, %legal, %illegal) nounwind { ; CHECK-LABEL: wide_32i8: ; CHECK: // %bb.0: -; CHECK-NEXT: mov z0.d, z1.d +; CHECK-NEXT: stp x29, x30, [sp, #-16]! // 16-byte Folded Spill +; CHECK-NEXT: addvl sp, sp, #-2 +; CHECK-NEXT: str z9, [sp] // 16-byte Folded Spill +; CHECK-NEXT: str z8, [sp, #1, mul vl] // 16-byte Folded Spill +; CHECK-NEXT: mov z8.d, z2.d +; CHECK-NEXT: mov z9.d, z1.d ; CHECK-NEXT: tbz w0, #0, .LBB0_2 ; CHECK-NEXT: // %bb.1: // %L1 -; CHECK-NEXT: stp x29, x30, [sp, #-16]! // 16-byte Folded Spill -; CHECK-NEXT: addvl sp, sp, #-18 -; CHECK-NEXT: str p15, [sp, #4, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p14, [sp, #5, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p13, [sp, #6, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p12, [sp, #7, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p11, [sp, #8, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p10, [sp, #9, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p9, [sp, #10, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p8, [sp, #11, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p7, [sp, #12, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p6, [sp, #13, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p5, [sp, #14, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p4, [sp, #15, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str z23, [sp, #2, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z22, [sp, #3, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z21, [sp, #4, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z20, [sp, #5, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z19, [sp, #6, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z18, [sp, #7, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z17, [sp, #8, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z16, [sp, #9, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z15, [sp, #10, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z14, [sp, #11, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z13, [sp, #12, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z12, [sp, #13, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z11, [sp, #14, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z10, [sp, #15, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z9, [sp, #16, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z8, [sp, #17, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: addvl sp, sp, #-2 -; CHECK-NEXT: str z2, [sp, #1, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z0, [sp] // 16-byte Folded Spill ; CHECK-NEXT: bl bar -; CHECK-NEXT: ldr z0, [sp] // 16-byte Folded Reload -; CHECK-NEXT: ldr z2, [sp, #1, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: addvl sp, sp, #2 -; CHECK-NEXT: ldr p15, [sp, #4, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p14, [sp, #5, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p13, [sp, #6, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p12, [sp, #7, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p11, [sp, #8, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p10, [sp, #9, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p9, [sp, #10, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p8, [sp, #11, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p7, [sp, #12, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p6, [sp, #13, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p5, [sp, #14, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p4, [sp, #15, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr z23, [sp, #2, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z22, [sp, #3, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z21, [sp, #4, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z20, [sp, #5, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z19, [sp, #6, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z18, [sp, #7, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z17, [sp, #8, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z16, [sp, #9, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z15, [sp, #10, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z14, [sp, #11, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z13, [sp, #12, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z12, [sp, #13, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z11, [sp, #14, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z10, [sp, #15, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z9, [sp, #16, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z8, [sp, #17, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: addvl sp, sp, #18 -; CHECK-NEXT: ldp x29, x30, [sp], #16 // 16-byte Folded Reload ; CHECK-NEXT: .LBB0_2: // %common.ret -; CHECK-NEXT: mov z1.d, z2.d +; CHECK-NEXT: mov z0.d, z9.d +; CHECK-NEXT: mov z1.d, z8.d +; CHECK-NEXT: ldr z9, [sp] // 16-byte Folded Reload +; CHECK-NEXT: ldr z8, [sp, #1, mul vl] // 16-byte Folded Reload +; CHECK-NEXT: addvl sp, sp, #2 +; CHECK-NEXT: ldp x29, x30, [sp], #16 // 16-byte Folded Reload ; CHECK-NEXT: ret br i1 %b, label %L1, label %L2 L1: - call void @bar() + call aarch64_sve_vector_pcs void @bar() ret undef L2: ret %illegal @@ -97,82 +41,26 @@ L2: define @wide_16i16(i1 %b, %legal, %illegal) nounwind { ; CHECK-LABEL: wide_16i16: ; CHECK: // %bb.0: -; CHECK-NEXT: mov z0.d, z1.d +; CHECK-NEXT: stp x29, x30, [sp, #-16]! // 16-byte Folded Spill +; CHECK-NEXT: addvl sp, sp, #-2 +; CHECK-NEXT: str z9, [sp] // 16-byte Folded Spill +; CHECK-NEXT: str z8, [sp, #1, mul vl] // 16-byte Folded Spill +; CHECK-NEXT: mov z8.d, z2.d +; CHECK-NEXT: mov z9.d, z1.d ; CHECK-NEXT: tbz w0, #0, .LBB1_2 ; CHECK-NEXT: // %bb.1: // %L1 -; CHECK-NEXT: stp x29, x30, [sp, #-16]! // 16-byte Folded Spill -; CHECK-NEXT: addvl sp, sp, #-18 -; CHECK-NEXT: str p15, [sp, #4, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p14, [sp, #5, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p13, [sp, #6, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p12, [sp, #7, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p11, [sp, #8, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p10, [sp, #9, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p9, [sp, #10, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p8, [sp, #11, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p7, [sp, #12, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p6, [sp, #13, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p5, [sp, #14, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p4, [sp, #15, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str z23, [sp, #2, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z22, [sp, #3, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z21, [sp, #4, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z20, [sp, #5, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z19, [sp, #6, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z18, [sp, #7, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z17, [sp, #8, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z16, [sp, #9, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z15, [sp, #10, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z14, [sp, #11, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z13, [sp, #12, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z12, [sp, #13, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z11, [sp, #14, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z10, [sp, #15, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z9, [sp, #16, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z8, [sp, #17, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: addvl sp, sp, #-2 -; CHECK-NEXT: str z2, [sp, #1, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z0, [sp] // 16-byte Folded Spill ; CHECK-NEXT: bl bar -; CHECK-NEXT: ldr z0, [sp] // 16-byte Folded Reload -; CHECK-NEXT: ldr z2, [sp, #1, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: addvl sp, sp, #2 -; CHECK-NEXT: ldr p15, [sp, #4, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p14, [sp, #5, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p13, [sp, #6, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p12, [sp, #7, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p11, [sp, #8, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p10, [sp, #9, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p9, [sp, #10, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p8, [sp, #11, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p7, [sp, #12, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p6, [sp, #13, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p5, [sp, #14, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p4, [sp, #15, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr z23, [sp, #2, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z22, [sp, #3, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z21, [sp, #4, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z20, [sp, #5, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z19, [sp, #6, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z18, [sp, #7, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z17, [sp, #8, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z16, [sp, #9, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z15, [sp, #10, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z14, [sp, #11, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z13, [sp, #12, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z12, [sp, #13, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z11, [sp, #14, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z10, [sp, #15, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z9, [sp, #16, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z8, [sp, #17, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: addvl sp, sp, #18 -; CHECK-NEXT: ldp x29, x30, [sp], #16 // 16-byte Folded Reload ; CHECK-NEXT: .LBB1_2: // %common.ret -; CHECK-NEXT: mov z1.d, z2.d +; CHECK-NEXT: mov z0.d, z9.d +; CHECK-NEXT: mov z1.d, z8.d +; CHECK-NEXT: ldr z9, [sp] // 16-byte Folded Reload +; CHECK-NEXT: ldr z8, [sp, #1, mul vl] // 16-byte Folded Reload +; CHECK-NEXT: addvl sp, sp, #2 +; CHECK-NEXT: ldp x29, x30, [sp], #16 // 16-byte Folded Reload ; CHECK-NEXT: ret br i1 %b, label %L1, label %L2 L1: - call void @bar() + call aarch64_sve_vector_pcs void @bar() ret undef L2: ret %illegal @@ -181,82 +69,26 @@ L2: define @wide_8i32(i1 %b, %legal, %illegal) nounwind { ; CHECK-LABEL: wide_8i32: ; CHECK: // %bb.0: -; CHECK-NEXT: mov z0.d, z1.d +; CHECK-NEXT: stp x29, x30, [sp, #-16]! // 16-byte Folded Spill +; CHECK-NEXT: addvl sp, sp, #-2 +; CHECK-NEXT: str z9, [sp] // 16-byte Folded Spill +; CHECK-NEXT: str z8, [sp, #1, mul vl] // 16-byte Folded Spill +; CHECK-NEXT: mov z8.d, z2.d +; CHECK-NEXT: mov z9.d, z1.d ; CHECK-NEXT: tbz w0, #0, .LBB2_2 ; CHECK-NEXT: // %bb.1: // %L1 -; CHECK-NEXT: stp x29, x30, [sp, #-16]! // 16-byte Folded Spill -; CHECK-NEXT: addvl sp, sp, #-18 -; CHECK-NEXT: str p15, [sp, #4, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p14, [sp, #5, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p13, [sp, #6, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p12, [sp, #7, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p11, [sp, #8, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p10, [sp, #9, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p9, [sp, #10, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p8, [sp, #11, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p7, [sp, #12, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p6, [sp, #13, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p5, [sp, #14, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p4, [sp, #15, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str z23, [sp, #2, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z22, [sp, #3, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z21, [sp, #4, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z20, [sp, #5, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z19, [sp, #6, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z18, [sp, #7, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z17, [sp, #8, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z16, [sp, #9, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z15, [sp, #10, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z14, [sp, #11, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z13, [sp, #12, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z12, [sp, #13, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z11, [sp, #14, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z10, [sp, #15, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z9, [sp, #16, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z8, [sp, #17, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: addvl sp, sp, #-2 -; CHECK-NEXT: str z2, [sp, #1, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z0, [sp] // 16-byte Folded Spill ; CHECK-NEXT: bl bar -; CHECK-NEXT: ldr z0, [sp] // 16-byte Folded Reload -; CHECK-NEXT: ldr z2, [sp, #1, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: addvl sp, sp, #2 -; CHECK-NEXT: ldr p15, [sp, #4, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p14, [sp, #5, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p13, [sp, #6, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p12, [sp, #7, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p11, [sp, #8, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p10, [sp, #9, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p9, [sp, #10, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p8, [sp, #11, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p7, [sp, #12, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p6, [sp, #13, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p5, [sp, #14, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p4, [sp, #15, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr z23, [sp, #2, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z22, [sp, #3, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z21, [sp, #4, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z20, [sp, #5, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z19, [sp, #6, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z18, [sp, #7, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z17, [sp, #8, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z16, [sp, #9, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z15, [sp, #10, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z14, [sp, #11, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z13, [sp, #12, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z12, [sp, #13, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z11, [sp, #14, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z10, [sp, #15, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z9, [sp, #16, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z8, [sp, #17, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: addvl sp, sp, #18 -; CHECK-NEXT: ldp x29, x30, [sp], #16 // 16-byte Folded Reload ; CHECK-NEXT: .LBB2_2: // %common.ret -; CHECK-NEXT: mov z1.d, z2.d +; CHECK-NEXT: mov z0.d, z9.d +; CHECK-NEXT: mov z1.d, z8.d +; CHECK-NEXT: ldr z9, [sp] // 16-byte Folded Reload +; CHECK-NEXT: ldr z8, [sp, #1, mul vl] // 16-byte Folded Reload +; CHECK-NEXT: addvl sp, sp, #2 +; CHECK-NEXT: ldp x29, x30, [sp], #16 // 16-byte Folded Reload ; CHECK-NEXT: ret br i1 %b, label %L1, label %L2 L1: - call void @bar() + call aarch64_sve_vector_pcs void @bar() ret undef L2: ret %illegal @@ -265,82 +97,26 @@ L2: define @wide_4i64(i1 %b, %legal, %illegal) nounwind { ; CHECK-LABEL: wide_4i64: ; CHECK: // %bb.0: -; CHECK-NEXT: mov z0.d, z1.d +; CHECK-NEXT: stp x29, x30, [sp, #-16]! // 16-byte Folded Spill +; CHECK-NEXT: addvl sp, sp, #-2 +; CHECK-NEXT: str z9, [sp] // 16-byte Folded Spill +; CHECK-NEXT: str z8, [sp, #1, mul vl] // 16-byte Folded Spill +; CHECK-NEXT: mov z8.d, z2.d +; CHECK-NEXT: mov z9.d, z1.d ; CHECK-NEXT: tbz w0, #0, .LBB3_2 ; CHECK-NEXT: // %bb.1: // %L1 -; CHECK-NEXT: stp x29, x30, [sp, #-16]! // 16-byte Folded Spill -; CHECK-NEXT: addvl sp, sp, #-18 -; CHECK-NEXT: str p15, [sp, #4, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p14, [sp, #5, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p13, [sp, #6, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p12, [sp, #7, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p11, [sp, #8, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p10, [sp, #9, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p9, [sp, #10, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p8, [sp, #11, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p7, [sp, #12, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p6, [sp, #13, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p5, [sp, #14, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p4, [sp, #15, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str z23, [sp, #2, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z22, [sp, #3, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z21, [sp, #4, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z20, [sp, #5, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z19, [sp, #6, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z18, [sp, #7, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z17, [sp, #8, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z16, [sp, #9, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z15, [sp, #10, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z14, [sp, #11, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z13, [sp, #12, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z12, [sp, #13, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z11, [sp, #14, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z10, [sp, #15, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z9, [sp, #16, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z8, [sp, #17, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: addvl sp, sp, #-2 -; CHECK-NEXT: str z2, [sp, #1, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z0, [sp] // 16-byte Folded Spill ; CHECK-NEXT: bl bar -; CHECK-NEXT: ldr z0, [sp] // 16-byte Folded Reload -; CHECK-NEXT: ldr z2, [sp, #1, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: addvl sp, sp, #2 -; CHECK-NEXT: ldr p15, [sp, #4, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p14, [sp, #5, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p13, [sp, #6, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p12, [sp, #7, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p11, [sp, #8, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p10, [sp, #9, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p9, [sp, #10, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p8, [sp, #11, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p7, [sp, #12, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p6, [sp, #13, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p5, [sp, #14, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p4, [sp, #15, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr z23, [sp, #2, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z22, [sp, #3, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z21, [sp, #4, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z20, [sp, #5, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z19, [sp, #6, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z18, [sp, #7, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z17, [sp, #8, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z16, [sp, #9, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z15, [sp, #10, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z14, [sp, #11, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z13, [sp, #12, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z12, [sp, #13, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z11, [sp, #14, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z10, [sp, #15, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z9, [sp, #16, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z8, [sp, #17, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: addvl sp, sp, #18 -; CHECK-NEXT: ldp x29, x30, [sp], #16 // 16-byte Folded Reload ; CHECK-NEXT: .LBB3_2: // %common.ret -; CHECK-NEXT: mov z1.d, z2.d +; CHECK-NEXT: mov z0.d, z9.d +; CHECK-NEXT: mov z1.d, z8.d +; CHECK-NEXT: ldr z9, [sp] // 16-byte Folded Reload +; CHECK-NEXT: ldr z8, [sp, #1, mul vl] // 16-byte Folded Reload +; CHECK-NEXT: addvl sp, sp, #2 +; CHECK-NEXT: ldp x29, x30, [sp], #16 // 16-byte Folded Reload ; CHECK-NEXT: ret br i1 %b, label %L1, label %L2 L1: - call void @bar() + call aarch64_sve_vector_pcs void @bar() ret undef L2: ret %illegal @@ -349,82 +125,26 @@ L2: define @wide_16f16(i1 %b, %legal, %illegal) nounwind { ; CHECK-LABEL: wide_16f16: ; CHECK: // %bb.0: -; CHECK-NEXT: mov z0.d, z1.d +; CHECK-NEXT: stp x29, x30, [sp, #-16]! // 16-byte Folded Spill +; CHECK-NEXT: addvl sp, sp, #-2 +; CHECK-NEXT: str z9, [sp] // 16-byte Folded Spill +; CHECK-NEXT: str z8, [sp, #1, mul vl] // 16-byte Folded Spill +; CHECK-NEXT: mov z8.d, z2.d +; CHECK-NEXT: mov z9.d, z1.d ; CHECK-NEXT: tbz w0, #0, .LBB4_2 ; CHECK-NEXT: // %bb.1: // %L1 -; CHECK-NEXT: stp x29, x30, [sp, #-16]! // 16-byte Folded Spill -; CHECK-NEXT: addvl sp, sp, #-18 -; CHECK-NEXT: str p15, [sp, #4, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p14, [sp, #5, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p13, [sp, #6, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p12, [sp, #7, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p11, [sp, #8, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p10, [sp, #9, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p9, [sp, #10, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p8, [sp, #11, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p7, [sp, #12, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p6, [sp, #13, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p5, [sp, #14, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p4, [sp, #15, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str z23, [sp, #2, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z22, [sp, #3, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z21, [sp, #4, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z20, [sp, #5, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z19, [sp, #6, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z18, [sp, #7, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z17, [sp, #8, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z16, [sp, #9, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z15, [sp, #10, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z14, [sp, #11, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z13, [sp, #12, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z12, [sp, #13, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z11, [sp, #14, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z10, [sp, #15, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z9, [sp, #16, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z8, [sp, #17, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: addvl sp, sp, #-2 -; CHECK-NEXT: str z2, [sp, #1, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z0, [sp] // 16-byte Folded Spill ; CHECK-NEXT: bl bar -; CHECK-NEXT: ldr z0, [sp] // 16-byte Folded Reload -; CHECK-NEXT: ldr z2, [sp, #1, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: addvl sp, sp, #2 -; CHECK-NEXT: ldr p15, [sp, #4, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p14, [sp, #5, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p13, [sp, #6, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p12, [sp, #7, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p11, [sp, #8, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p10, [sp, #9, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p9, [sp, #10, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p8, [sp, #11, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p7, [sp, #12, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p6, [sp, #13, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p5, [sp, #14, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p4, [sp, #15, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr z23, [sp, #2, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z22, [sp, #3, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z21, [sp, #4, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z20, [sp, #5, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z19, [sp, #6, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z18, [sp, #7, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z17, [sp, #8, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z16, [sp, #9, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z15, [sp, #10, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z14, [sp, #11, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z13, [sp, #12, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z12, [sp, #13, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z11, [sp, #14, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z10, [sp, #15, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z9, [sp, #16, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z8, [sp, #17, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: addvl sp, sp, #18 -; CHECK-NEXT: ldp x29, x30, [sp], #16 // 16-byte Folded Reload ; CHECK-NEXT: .LBB4_2: // %common.ret -; CHECK-NEXT: mov z1.d, z2.d +; CHECK-NEXT: mov z0.d, z9.d +; CHECK-NEXT: mov z1.d, z8.d +; CHECK-NEXT: ldr z9, [sp] // 16-byte Folded Reload +; CHECK-NEXT: ldr z8, [sp, #1, mul vl] // 16-byte Folded Reload +; CHECK-NEXT: addvl sp, sp, #2 +; CHECK-NEXT: ldp x29, x30, [sp], #16 // 16-byte Folded Reload ; CHECK-NEXT: ret br i1 %b, label %L1, label %L2 L1: - call void @bar() + call aarch64_sve_vector_pcs void @bar() ret undef L2: ret %illegal @@ -433,82 +153,26 @@ L2: define @wide_8f32(i1 %b, %legal, %illegal) nounwind { ; CHECK-LABEL: wide_8f32: ; CHECK: // %bb.0: -; CHECK-NEXT: mov z0.d, z1.d +; CHECK-NEXT: stp x29, x30, [sp, #-16]! // 16-byte Folded Spill +; CHECK-NEXT: addvl sp, sp, #-2 +; CHECK-NEXT: str z9, [sp] // 16-byte Folded Spill +; CHECK-NEXT: str z8, [sp, #1, mul vl] // 16-byte Folded Spill +; CHECK-NEXT: mov z8.d, z2.d +; CHECK-NEXT: mov z9.d, z1.d ; CHECK-NEXT: tbz w0, #0, .LBB5_2 ; CHECK-NEXT: // %bb.1: // %L1 -; CHECK-NEXT: stp x29, x30, [sp, #-16]! // 16-byte Folded Spill -; CHECK-NEXT: addvl sp, sp, #-18 -; CHECK-NEXT: str p15, [sp, #4, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p14, [sp, #5, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p13, [sp, #6, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p12, [sp, #7, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p11, [sp, #8, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p10, [sp, #9, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p9, [sp, #10, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p8, [sp, #11, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p7, [sp, #12, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p6, [sp, #13, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p5, [sp, #14, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p4, [sp, #15, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str z23, [sp, #2, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z22, [sp, #3, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z21, [sp, #4, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z20, [sp, #5, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z19, [sp, #6, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z18, [sp, #7, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z17, [sp, #8, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z16, [sp, #9, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z15, [sp, #10, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z14, [sp, #11, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z13, [sp, #12, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z12, [sp, #13, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z11, [sp, #14, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z10, [sp, #15, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z9, [sp, #16, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z8, [sp, #17, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: addvl sp, sp, #-2 -; CHECK-NEXT: str z2, [sp, #1, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z0, [sp] // 16-byte Folded Spill ; CHECK-NEXT: bl bar -; CHECK-NEXT: ldr z0, [sp] // 16-byte Folded Reload -; CHECK-NEXT: ldr z2, [sp, #1, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: addvl sp, sp, #2 -; CHECK-NEXT: ldr p15, [sp, #4, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p14, [sp, #5, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p13, [sp, #6, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p12, [sp, #7, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p11, [sp, #8, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p10, [sp, #9, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p9, [sp, #10, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p8, [sp, #11, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p7, [sp, #12, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p6, [sp, #13, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p5, [sp, #14, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p4, [sp, #15, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr z23, [sp, #2, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z22, [sp, #3, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z21, [sp, #4, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z20, [sp, #5, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z19, [sp, #6, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z18, [sp, #7, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z17, [sp, #8, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z16, [sp, #9, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z15, [sp, #10, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z14, [sp, #11, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z13, [sp, #12, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z12, [sp, #13, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z11, [sp, #14, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z10, [sp, #15, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z9, [sp, #16, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z8, [sp, #17, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: addvl sp, sp, #18 -; CHECK-NEXT: ldp x29, x30, [sp], #16 // 16-byte Folded Reload ; CHECK-NEXT: .LBB5_2: // %common.ret -; CHECK-NEXT: mov z1.d, z2.d +; CHECK-NEXT: mov z0.d, z9.d +; CHECK-NEXT: mov z1.d, z8.d +; CHECK-NEXT: ldr z9, [sp] // 16-byte Folded Reload +; CHECK-NEXT: ldr z8, [sp, #1, mul vl] // 16-byte Folded Reload +; CHECK-NEXT: addvl sp, sp, #2 +; CHECK-NEXT: ldp x29, x30, [sp], #16 // 16-byte Folded Reload ; CHECK-NEXT: ret br i1 %b, label %L1, label %L2 L1: - call void @bar() + call aarch64_sve_vector_pcs void @bar() ret undef L2: ret %illegal @@ -517,82 +181,26 @@ L2: define @wide_4f64(i1 %b, %legal, %illegal) nounwind { ; CHECK-LABEL: wide_4f64: ; CHECK: // %bb.0: -; CHECK-NEXT: mov z0.d, z1.d +; CHECK-NEXT: stp x29, x30, [sp, #-16]! // 16-byte Folded Spill +; CHECK-NEXT: addvl sp, sp, #-2 +; CHECK-NEXT: str z9, [sp] // 16-byte Folded Spill +; CHECK-NEXT: str z8, [sp, #1, mul vl] // 16-byte Folded Spill +; CHECK-NEXT: mov z8.d, z2.d +; CHECK-NEXT: mov z9.d, z1.d ; CHECK-NEXT: tbz w0, #0, .LBB6_2 ; CHECK-NEXT: // %bb.1: // %L1 -; CHECK-NEXT: stp x29, x30, [sp, #-16]! // 16-byte Folded Spill -; CHECK-NEXT: addvl sp, sp, #-18 -; CHECK-NEXT: str p15, [sp, #4, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p14, [sp, #5, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p13, [sp, #6, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p12, [sp, #7, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p11, [sp, #8, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p10, [sp, #9, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p9, [sp, #10, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p8, [sp, #11, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p7, [sp, #12, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p6, [sp, #13, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p5, [sp, #14, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p4, [sp, #15, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str z23, [sp, #2, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z22, [sp, #3, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z21, [sp, #4, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z20, [sp, #5, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z19, [sp, #6, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z18, [sp, #7, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z17, [sp, #8, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z16, [sp, #9, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z15, [sp, #10, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z14, [sp, #11, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z13, [sp, #12, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z12, [sp, #13, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z11, [sp, #14, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z10, [sp, #15, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z9, [sp, #16, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z8, [sp, #17, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: addvl sp, sp, #-2 -; CHECK-NEXT: str z2, [sp, #1, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z0, [sp] // 16-byte Folded Spill ; CHECK-NEXT: bl bar -; CHECK-NEXT: ldr z0, [sp] // 16-byte Folded Reload -; CHECK-NEXT: ldr z2, [sp, #1, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: addvl sp, sp, #2 -; CHECK-NEXT: ldr p15, [sp, #4, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p14, [sp, #5, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p13, [sp, #6, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p12, [sp, #7, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p11, [sp, #8, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p10, [sp, #9, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p9, [sp, #10, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p8, [sp, #11, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p7, [sp, #12, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p6, [sp, #13, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p5, [sp, #14, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p4, [sp, #15, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr z23, [sp, #2, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z22, [sp, #3, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z21, [sp, #4, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z20, [sp, #5, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z19, [sp, #6, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z18, [sp, #7, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z17, [sp, #8, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z16, [sp, #9, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z15, [sp, #10, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z14, [sp, #11, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z13, [sp, #12, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z12, [sp, #13, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z11, [sp, #14, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z10, [sp, #15, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z9, [sp, #16, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z8, [sp, #17, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: addvl sp, sp, #18 -; CHECK-NEXT: ldp x29, x30, [sp], #16 // 16-byte Folded Reload ; CHECK-NEXT: .LBB6_2: // %common.ret -; CHECK-NEXT: mov z1.d, z2.d +; CHECK-NEXT: mov z0.d, z9.d +; CHECK-NEXT: mov z1.d, z8.d +; CHECK-NEXT: ldr z9, [sp] // 16-byte Folded Reload +; CHECK-NEXT: ldr z8, [sp, #1, mul vl] // 16-byte Folded Reload +; CHECK-NEXT: addvl sp, sp, #2 +; CHECK-NEXT: ldp x29, x30, [sp], #16 // 16-byte Folded Reload ; CHECK-NEXT: ret br i1 %b, label %L1, label %L2 L1: - call void @bar() + call aarch64_sve_vector_pcs void @bar() ret undef L2: ret %illegal @@ -605,85 +213,30 @@ L2: define @wide_48i8(i1 %b, %legal, %illegal) nounwind { ; CHECK-LABEL: wide_48i8: ; CHECK: // %bb.0: -; CHECK-NEXT: mov z0.d, z1.d +; CHECK-NEXT: stp x29, x30, [sp, #-16]! // 16-byte Folded Spill +; CHECK-NEXT: addvl sp, sp, #-3 +; CHECK-NEXT: str z10, [sp] // 16-byte Folded Spill +; CHECK-NEXT: str z9, [sp, #1, mul vl] // 16-byte Folded Spill +; CHECK-NEXT: str z8, [sp, #2, mul vl] // 16-byte Folded Spill +; CHECK-NEXT: mov z8.d, z3.d +; CHECK-NEXT: mov z9.d, z2.d +; CHECK-NEXT: mov z10.d, z1.d ; CHECK-NEXT: tbz w0, #0, .LBB7_2 ; CHECK-NEXT: // %bb.1: // %L1 -; CHECK-NEXT: stp x29, x30, [sp, #-16]! // 16-byte Folded Spill -; CHECK-NEXT: addvl sp, sp, #-18 -; CHECK-NEXT: str p15, [sp, #4, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p14, [sp, #5, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p13, [sp, #6, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p12, [sp, #7, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p11, [sp, #8, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p10, [sp, #9, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p9, [sp, #10, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p8, [sp, #11, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p7, [sp, #12, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p6, [sp, #13, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p5, [sp, #14, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p4, [sp, #15, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str z23, [sp, #2, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z22, [sp, #3, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z21, [sp, #4, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z20, [sp, #5, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z19, [sp, #6, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z18, [sp, #7, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z17, [sp, #8, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z16, [sp, #9, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z15, [sp, #10, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z14, [sp, #11, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z13, [sp, #12, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z12, [sp, #13, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z11, [sp, #14, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z10, [sp, #15, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z9, [sp, #16, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z8, [sp, #17, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: addvl sp, sp, #-3 -; CHECK-NEXT: str z3, [sp, #2, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z2, [sp, #1, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z0, [sp] // 16-byte Folded Spill ; CHECK-NEXT: bl bar -; CHECK-NEXT: ldr z0, [sp] // 16-byte Folded Reload -; CHECK-NEXT: ldr z2, [sp, #1, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z3, [sp, #2, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: addvl sp, sp, #3 -; CHECK-NEXT: ldr p15, [sp, #4, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p14, [sp, #5, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p13, [sp, #6, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p12, [sp, #7, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p11, [sp, #8, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p10, [sp, #9, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p9, [sp, #10, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p8, [sp, #11, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p7, [sp, #12, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p6, [sp, #13, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p5, [sp, #14, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p4, [sp, #15, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr z23, [sp, #2, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z22, [sp, #3, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z21, [sp, #4, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z20, [sp, #5, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z19, [sp, #6, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z18, [sp, #7, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z17, [sp, #8, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z16, [sp, #9, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z15, [sp, #10, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z14, [sp, #11, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z13, [sp, #12, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z12, [sp, #13, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z11, [sp, #14, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z10, [sp, #15, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z9, [sp, #16, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z8, [sp, #17, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: addvl sp, sp, #18 -; CHECK-NEXT: ldp x29, x30, [sp], #16 // 16-byte Folded Reload ; CHECK-NEXT: .LBB7_2: // %common.ret -; CHECK-NEXT: mov z1.d, z2.d -; CHECK-NEXT: mov z2.d, z3.d +; CHECK-NEXT: mov z0.d, z10.d +; CHECK-NEXT: mov z1.d, z9.d +; CHECK-NEXT: mov z2.d, z8.d +; CHECK-NEXT: ldr z10, [sp] // 16-byte Folded Reload +; CHECK-NEXT: ldr z9, [sp, #1, mul vl] // 16-byte Folded Reload +; CHECK-NEXT: ldr z8, [sp, #2, mul vl] // 16-byte Folded Reload +; CHECK-NEXT: addvl sp, sp, #3 +; CHECK-NEXT: ldp x29, x30, [sp], #16 // 16-byte Folded Reload ; CHECK-NEXT: ret br i1 %b, label %L1, label %L2 L1: - call void @bar() + call aarch64_sve_vector_pcs void @bar() ret undef L2: ret %illegal @@ -692,85 +245,30 @@ L2: define @wide_24i16(i1 %b, %legal, %illegal) nounwind { ; CHECK-LABEL: wide_24i16: ; CHECK: // %bb.0: -; CHECK-NEXT: mov z0.d, z1.d +; CHECK-NEXT: stp x29, x30, [sp, #-16]! // 16-byte Folded Spill +; CHECK-NEXT: addvl sp, sp, #-3 +; CHECK-NEXT: str z10, [sp] // 16-byte Folded Spill +; CHECK-NEXT: str z9, [sp, #1, mul vl] // 16-byte Folded Spill +; CHECK-NEXT: str z8, [sp, #2, mul vl] // 16-byte Folded Spill +; CHECK-NEXT: mov z8.d, z3.d +; CHECK-NEXT: mov z9.d, z2.d +; CHECK-NEXT: mov z10.d, z1.d ; CHECK-NEXT: tbz w0, #0, .LBB8_2 ; CHECK-NEXT: // %bb.1: // %L1 -; CHECK-NEXT: stp x29, x30, [sp, #-16]! // 16-byte Folded Spill -; CHECK-NEXT: addvl sp, sp, #-18 -; CHECK-NEXT: str p15, [sp, #4, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p14, [sp, #5, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p13, [sp, #6, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p12, [sp, #7, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p11, [sp, #8, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p10, [sp, #9, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p9, [sp, #10, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p8, [sp, #11, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p7, [sp, #12, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p6, [sp, #13, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p5, [sp, #14, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p4, [sp, #15, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str z23, [sp, #2, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z22, [sp, #3, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z21, [sp, #4, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z20, [sp, #5, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z19, [sp, #6, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z18, [sp, #7, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z17, [sp, #8, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z16, [sp, #9, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z15, [sp, #10, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z14, [sp, #11, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z13, [sp, #12, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z12, [sp, #13, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z11, [sp, #14, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z10, [sp, #15, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z9, [sp, #16, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z8, [sp, #17, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: addvl sp, sp, #-3 -; CHECK-NEXT: str z3, [sp, #2, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z2, [sp, #1, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z0, [sp] // 16-byte Folded Spill ; CHECK-NEXT: bl bar -; CHECK-NEXT: ldr z0, [sp] // 16-byte Folded Reload -; CHECK-NEXT: ldr z2, [sp, #1, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z3, [sp, #2, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: addvl sp, sp, #3 -; CHECK-NEXT: ldr p15, [sp, #4, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p14, [sp, #5, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p13, [sp, #6, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p12, [sp, #7, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p11, [sp, #8, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p10, [sp, #9, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p9, [sp, #10, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p8, [sp, #11, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p7, [sp, #12, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p6, [sp, #13, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p5, [sp, #14, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p4, [sp, #15, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr z23, [sp, #2, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z22, [sp, #3, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z21, [sp, #4, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z20, [sp, #5, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z19, [sp, #6, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z18, [sp, #7, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z17, [sp, #8, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z16, [sp, #9, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z15, [sp, #10, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z14, [sp, #11, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z13, [sp, #12, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z12, [sp, #13, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z11, [sp, #14, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z10, [sp, #15, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z9, [sp, #16, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z8, [sp, #17, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: addvl sp, sp, #18 -; CHECK-NEXT: ldp x29, x30, [sp], #16 // 16-byte Folded Reload ; CHECK-NEXT: .LBB8_2: // %common.ret -; CHECK-NEXT: mov z1.d, z2.d -; CHECK-NEXT: mov z2.d, z3.d +; CHECK-NEXT: mov z0.d, z10.d +; CHECK-NEXT: mov z1.d, z9.d +; CHECK-NEXT: mov z2.d, z8.d +; CHECK-NEXT: ldr z10, [sp] // 16-byte Folded Reload +; CHECK-NEXT: ldr z9, [sp, #1, mul vl] // 16-byte Folded Reload +; CHECK-NEXT: ldr z8, [sp, #2, mul vl] // 16-byte Folded Reload +; CHECK-NEXT: addvl sp, sp, #3 +; CHECK-NEXT: ldp x29, x30, [sp], #16 // 16-byte Folded Reload ; CHECK-NEXT: ret br i1 %b, label %L1, label %L2 L1: - call void @bar() + call aarch64_sve_vector_pcs void @bar() ret undef L2: ret %illegal @@ -779,85 +277,30 @@ L2: define @wide_12i32(i1 %b, %legal, %illegal) nounwind { ; CHECK-LABEL: wide_12i32: ; CHECK: // %bb.0: -; CHECK-NEXT: mov z0.d, z1.d +; CHECK-NEXT: stp x29, x30, [sp, #-16]! // 16-byte Folded Spill +; CHECK-NEXT: addvl sp, sp, #-3 +; CHECK-NEXT: str z10, [sp] // 16-byte Folded Spill +; CHECK-NEXT: str z9, [sp, #1, mul vl] // 16-byte Folded Spill +; CHECK-NEXT: str z8, [sp, #2, mul vl] // 16-byte Folded Spill +; CHECK-NEXT: mov z8.d, z3.d +; CHECK-NEXT: mov z9.d, z2.d +; CHECK-NEXT: mov z10.d, z1.d ; CHECK-NEXT: tbz w0, #0, .LBB9_2 ; CHECK-NEXT: // %bb.1: // %L1 -; CHECK-NEXT: stp x29, x30, [sp, #-16]! // 16-byte Folded Spill -; CHECK-NEXT: addvl sp, sp, #-18 -; CHECK-NEXT: str p15, [sp, #4, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p14, [sp, #5, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p13, [sp, #6, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p12, [sp, #7, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p11, [sp, #8, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p10, [sp, #9, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p9, [sp, #10, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p8, [sp, #11, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p7, [sp, #12, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p6, [sp, #13, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p5, [sp, #14, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p4, [sp, #15, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str z23, [sp, #2, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z22, [sp, #3, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z21, [sp, #4, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z20, [sp, #5, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z19, [sp, #6, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z18, [sp, #7, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z17, [sp, #8, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z16, [sp, #9, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z15, [sp, #10, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z14, [sp, #11, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z13, [sp, #12, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z12, [sp, #13, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z11, [sp, #14, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z10, [sp, #15, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z9, [sp, #16, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z8, [sp, #17, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: addvl sp, sp, #-3 -; CHECK-NEXT: str z3, [sp, #2, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z2, [sp, #1, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z0, [sp] // 16-byte Folded Spill ; CHECK-NEXT: bl bar -; CHECK-NEXT: ldr z0, [sp] // 16-byte Folded Reload -; CHECK-NEXT: ldr z2, [sp, #1, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z3, [sp, #2, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: addvl sp, sp, #3 -; CHECK-NEXT: ldr p15, [sp, #4, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p14, [sp, #5, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p13, [sp, #6, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p12, [sp, #7, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p11, [sp, #8, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p10, [sp, #9, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p9, [sp, #10, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p8, [sp, #11, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p7, [sp, #12, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p6, [sp, #13, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p5, [sp, #14, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p4, [sp, #15, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr z23, [sp, #2, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z22, [sp, #3, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z21, [sp, #4, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z20, [sp, #5, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z19, [sp, #6, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z18, [sp, #7, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z17, [sp, #8, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z16, [sp, #9, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z15, [sp, #10, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z14, [sp, #11, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z13, [sp, #12, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z12, [sp, #13, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z11, [sp, #14, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z10, [sp, #15, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z9, [sp, #16, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z8, [sp, #17, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: addvl sp, sp, #18 -; CHECK-NEXT: ldp x29, x30, [sp], #16 // 16-byte Folded Reload ; CHECK-NEXT: .LBB9_2: // %common.ret -; CHECK-NEXT: mov z1.d, z2.d -; CHECK-NEXT: mov z2.d, z3.d +; CHECK-NEXT: mov z0.d, z10.d +; CHECK-NEXT: mov z1.d, z9.d +; CHECK-NEXT: mov z2.d, z8.d +; CHECK-NEXT: ldr z10, [sp] // 16-byte Folded Reload +; CHECK-NEXT: ldr z9, [sp, #1, mul vl] // 16-byte Folded Reload +; CHECK-NEXT: ldr z8, [sp, #2, mul vl] // 16-byte Folded Reload +; CHECK-NEXT: addvl sp, sp, #3 +; CHECK-NEXT: ldp x29, x30, [sp], #16 // 16-byte Folded Reload ; CHECK-NEXT: ret br i1 %b, label %L1, label %L2 L1: - call void @bar() + call aarch64_sve_vector_pcs void @bar() ret undef L2: ret %illegal @@ -866,85 +309,30 @@ L2: define @wide_6i64(i1 %b, %legal, %illegal) nounwind { ; CHECK-LABEL: wide_6i64: ; CHECK: // %bb.0: -; CHECK-NEXT: mov z0.d, z1.d +; CHECK-NEXT: stp x29, x30, [sp, #-16]! // 16-byte Folded Spill +; CHECK-NEXT: addvl sp, sp, #-3 +; CHECK-NEXT: str z10, [sp] // 16-byte Folded Spill +; CHECK-NEXT: str z9, [sp, #1, mul vl] // 16-byte Folded Spill +; CHECK-NEXT: str z8, [sp, #2, mul vl] // 16-byte Folded Spill +; CHECK-NEXT: mov z8.d, z3.d +; CHECK-NEXT: mov z9.d, z2.d +; CHECK-NEXT: mov z10.d, z1.d ; CHECK-NEXT: tbz w0, #0, .LBB10_2 ; CHECK-NEXT: // %bb.1: // %L1 -; CHECK-NEXT: stp x29, x30, [sp, #-16]! // 16-byte Folded Spill -; CHECK-NEXT: addvl sp, sp, #-18 -; CHECK-NEXT: str p15, [sp, #4, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p14, [sp, #5, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p13, [sp, #6, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p12, [sp, #7, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p11, [sp, #8, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p10, [sp, #9, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p9, [sp, #10, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p8, [sp, #11, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p7, [sp, #12, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p6, [sp, #13, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p5, [sp, #14, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p4, [sp, #15, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str z23, [sp, #2, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z22, [sp, #3, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z21, [sp, #4, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z20, [sp, #5, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z19, [sp, #6, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z18, [sp, #7, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z17, [sp, #8, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z16, [sp, #9, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z15, [sp, #10, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z14, [sp, #11, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z13, [sp, #12, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z12, [sp, #13, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z11, [sp, #14, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z10, [sp, #15, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z9, [sp, #16, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z8, [sp, #17, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: addvl sp, sp, #-3 -; CHECK-NEXT: str z3, [sp, #2, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z2, [sp, #1, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z0, [sp] // 16-byte Folded Spill ; CHECK-NEXT: bl bar -; CHECK-NEXT: ldr z0, [sp] // 16-byte Folded Reload -; CHECK-NEXT: ldr z2, [sp, #1, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z3, [sp, #2, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: addvl sp, sp, #3 -; CHECK-NEXT: ldr p15, [sp, #4, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p14, [sp, #5, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p13, [sp, #6, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p12, [sp, #7, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p11, [sp, #8, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p10, [sp, #9, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p9, [sp, #10, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p8, [sp, #11, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p7, [sp, #12, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p6, [sp, #13, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p5, [sp, #14, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p4, [sp, #15, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr z23, [sp, #2, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z22, [sp, #3, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z21, [sp, #4, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z20, [sp, #5, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z19, [sp, #6, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z18, [sp, #7, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z17, [sp, #8, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z16, [sp, #9, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z15, [sp, #10, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z14, [sp, #11, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z13, [sp, #12, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z12, [sp, #13, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z11, [sp, #14, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z10, [sp, #15, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z9, [sp, #16, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z8, [sp, #17, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: addvl sp, sp, #18 -; CHECK-NEXT: ldp x29, x30, [sp], #16 // 16-byte Folded Reload ; CHECK-NEXT: .LBB10_2: // %common.ret -; CHECK-NEXT: mov z1.d, z2.d -; CHECK-NEXT: mov z2.d, z3.d +; CHECK-NEXT: mov z0.d, z10.d +; CHECK-NEXT: mov z1.d, z9.d +; CHECK-NEXT: mov z2.d, z8.d +; CHECK-NEXT: ldr z10, [sp] // 16-byte Folded Reload +; CHECK-NEXT: ldr z9, [sp, #1, mul vl] // 16-byte Folded Reload +; CHECK-NEXT: ldr z8, [sp, #2, mul vl] // 16-byte Folded Reload +; CHECK-NEXT: addvl sp, sp, #3 +; CHECK-NEXT: ldp x29, x30, [sp], #16 // 16-byte Folded Reload ; CHECK-NEXT: ret br i1 %b, label %L1, label %L2 L1: - call void @bar() + call aarch64_sve_vector_pcs void @bar() ret undef L2: ret %illegal @@ -953,85 +341,30 @@ L2: define @wide_24f16(i1 %b, %legal, %illegal) nounwind { ; CHECK-LABEL: wide_24f16: ; CHECK: // %bb.0: -; CHECK-NEXT: mov z0.d, z1.d +; CHECK-NEXT: stp x29, x30, [sp, #-16]! // 16-byte Folded Spill +; CHECK-NEXT: addvl sp, sp, #-3 +; CHECK-NEXT: str z10, [sp] // 16-byte Folded Spill +; CHECK-NEXT: str z9, [sp, #1, mul vl] // 16-byte Folded Spill +; CHECK-NEXT: str z8, [sp, #2, mul vl] // 16-byte Folded Spill +; CHECK-NEXT: mov z8.d, z3.d +; CHECK-NEXT: mov z9.d, z2.d +; CHECK-NEXT: mov z10.d, z1.d ; CHECK-NEXT: tbz w0, #0, .LBB11_2 ; CHECK-NEXT: // %bb.1: // %L1 -; CHECK-NEXT: stp x29, x30, [sp, #-16]! // 16-byte Folded Spill -; CHECK-NEXT: addvl sp, sp, #-18 -; CHECK-NEXT: str p15, [sp, #4, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p14, [sp, #5, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p13, [sp, #6, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p12, [sp, #7, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p11, [sp, #8, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p10, [sp, #9, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p9, [sp, #10, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p8, [sp, #11, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p7, [sp, #12, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p6, [sp, #13, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p5, [sp, #14, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p4, [sp, #15, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str z23, [sp, #2, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z22, [sp, #3, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z21, [sp, #4, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z20, [sp, #5, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z19, [sp, #6, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z18, [sp, #7, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z17, [sp, #8, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z16, [sp, #9, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z15, [sp, #10, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z14, [sp, #11, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z13, [sp, #12, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z12, [sp, #13, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z11, [sp, #14, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z10, [sp, #15, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z9, [sp, #16, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z8, [sp, #17, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: addvl sp, sp, #-3 -; CHECK-NEXT: str z3, [sp, #2, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z2, [sp, #1, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z0, [sp] // 16-byte Folded Spill ; CHECK-NEXT: bl bar -; CHECK-NEXT: ldr z0, [sp] // 16-byte Folded Reload -; CHECK-NEXT: ldr z2, [sp, #1, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z3, [sp, #2, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: addvl sp, sp, #3 -; CHECK-NEXT: ldr p15, [sp, #4, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p14, [sp, #5, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p13, [sp, #6, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p12, [sp, #7, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p11, [sp, #8, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p10, [sp, #9, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p9, [sp, #10, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p8, [sp, #11, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p7, [sp, #12, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p6, [sp, #13, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p5, [sp, #14, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p4, [sp, #15, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr z23, [sp, #2, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z22, [sp, #3, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z21, [sp, #4, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z20, [sp, #5, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z19, [sp, #6, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z18, [sp, #7, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z17, [sp, #8, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z16, [sp, #9, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z15, [sp, #10, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z14, [sp, #11, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z13, [sp, #12, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z12, [sp, #13, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z11, [sp, #14, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z10, [sp, #15, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z9, [sp, #16, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z8, [sp, #17, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: addvl sp, sp, #18 -; CHECK-NEXT: ldp x29, x30, [sp], #16 // 16-byte Folded Reload ; CHECK-NEXT: .LBB11_2: // %common.ret -; CHECK-NEXT: mov z1.d, z2.d -; CHECK-NEXT: mov z2.d, z3.d +; CHECK-NEXT: mov z0.d, z10.d +; CHECK-NEXT: mov z1.d, z9.d +; CHECK-NEXT: mov z2.d, z8.d +; CHECK-NEXT: ldr z10, [sp] // 16-byte Folded Reload +; CHECK-NEXT: ldr z9, [sp, #1, mul vl] // 16-byte Folded Reload +; CHECK-NEXT: ldr z8, [sp, #2, mul vl] // 16-byte Folded Reload +; CHECK-NEXT: addvl sp, sp, #3 +; CHECK-NEXT: ldp x29, x30, [sp], #16 // 16-byte Folded Reload ; CHECK-NEXT: ret br i1 %b, label %L1, label %L2 L1: - call void @bar() + call aarch64_sve_vector_pcs void @bar() ret undef L2: ret %illegal @@ -1040,85 +373,30 @@ L2: define @wide_12f32(i1 %b, %legal, %illegal) nounwind { ; CHECK-LABEL: wide_12f32: ; CHECK: // %bb.0: -; CHECK-NEXT: mov z0.d, z1.d +; CHECK-NEXT: stp x29, x30, [sp, #-16]! // 16-byte Folded Spill +; CHECK-NEXT: addvl sp, sp, #-3 +; CHECK-NEXT: str z10, [sp] // 16-byte Folded Spill +; CHECK-NEXT: str z9, [sp, #1, mul vl] // 16-byte Folded Spill +; CHECK-NEXT: str z8, [sp, #2, mul vl] // 16-byte Folded Spill +; CHECK-NEXT: mov z8.d, z3.d +; CHECK-NEXT: mov z9.d, z2.d +; CHECK-NEXT: mov z10.d, z1.d ; CHECK-NEXT: tbz w0, #0, .LBB12_2 ; CHECK-NEXT: // %bb.1: // %L1 -; CHECK-NEXT: stp x29, x30, [sp, #-16]! // 16-byte Folded Spill -; CHECK-NEXT: addvl sp, sp, #-18 -; CHECK-NEXT: str p15, [sp, #4, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p14, [sp, #5, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p13, [sp, #6, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p12, [sp, #7, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p11, [sp, #8, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p10, [sp, #9, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p9, [sp, #10, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p8, [sp, #11, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p7, [sp, #12, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p6, [sp, #13, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p5, [sp, #14, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p4, [sp, #15, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str z23, [sp, #2, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z22, [sp, #3, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z21, [sp, #4, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z20, [sp, #5, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z19, [sp, #6, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z18, [sp, #7, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z17, [sp, #8, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z16, [sp, #9, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z15, [sp, #10, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z14, [sp, #11, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z13, [sp, #12, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z12, [sp, #13, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z11, [sp, #14, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z10, [sp, #15, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z9, [sp, #16, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z8, [sp, #17, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: addvl sp, sp, #-3 -; CHECK-NEXT: str z3, [sp, #2, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z2, [sp, #1, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z0, [sp] // 16-byte Folded Spill ; CHECK-NEXT: bl bar -; CHECK-NEXT: ldr z0, [sp] // 16-byte Folded Reload -; CHECK-NEXT: ldr z2, [sp, #1, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z3, [sp, #2, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: addvl sp, sp, #3 -; CHECK-NEXT: ldr p15, [sp, #4, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p14, [sp, #5, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p13, [sp, #6, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p12, [sp, #7, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p11, [sp, #8, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p10, [sp, #9, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p9, [sp, #10, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p8, [sp, #11, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p7, [sp, #12, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p6, [sp, #13, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p5, [sp, #14, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p4, [sp, #15, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr z23, [sp, #2, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z22, [sp, #3, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z21, [sp, #4, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z20, [sp, #5, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z19, [sp, #6, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z18, [sp, #7, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z17, [sp, #8, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z16, [sp, #9, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z15, [sp, #10, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z14, [sp, #11, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z13, [sp, #12, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z12, [sp, #13, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z11, [sp, #14, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z10, [sp, #15, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z9, [sp, #16, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z8, [sp, #17, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: addvl sp, sp, #18 -; CHECK-NEXT: ldp x29, x30, [sp], #16 // 16-byte Folded Reload ; CHECK-NEXT: .LBB12_2: // %common.ret -; CHECK-NEXT: mov z1.d, z2.d -; CHECK-NEXT: mov z2.d, z3.d +; CHECK-NEXT: mov z0.d, z10.d +; CHECK-NEXT: mov z1.d, z9.d +; CHECK-NEXT: mov z2.d, z8.d +; CHECK-NEXT: ldr z10, [sp] // 16-byte Folded Reload +; CHECK-NEXT: ldr z9, [sp, #1, mul vl] // 16-byte Folded Reload +; CHECK-NEXT: ldr z8, [sp, #2, mul vl] // 16-byte Folded Reload +; CHECK-NEXT: addvl sp, sp, #3 +; CHECK-NEXT: ldp x29, x30, [sp], #16 // 16-byte Folded Reload ; CHECK-NEXT: ret br i1 %b, label %L1, label %L2 L1: - call void @bar() + call aarch64_sve_vector_pcs void @bar() ret undef L2: ret %illegal @@ -1127,85 +405,30 @@ L2: define @wide_6f64(i1 %b, %legal, %illegal) nounwind { ; CHECK-LABEL: wide_6f64: ; CHECK: // %bb.0: -; CHECK-NEXT: mov z0.d, z1.d +; CHECK-NEXT: stp x29, x30, [sp, #-16]! // 16-byte Folded Spill +; CHECK-NEXT: addvl sp, sp, #-3 +; CHECK-NEXT: str z10, [sp] // 16-byte Folded Spill +; CHECK-NEXT: str z9, [sp, #1, mul vl] // 16-byte Folded Spill +; CHECK-NEXT: str z8, [sp, #2, mul vl] // 16-byte Folded Spill +; CHECK-NEXT: mov z8.d, z3.d +; CHECK-NEXT: mov z9.d, z2.d +; CHECK-NEXT: mov z10.d, z1.d ; CHECK-NEXT: tbz w0, #0, .LBB13_2 ; CHECK-NEXT: // %bb.1: // %L1 -; CHECK-NEXT: stp x29, x30, [sp, #-16]! // 16-byte Folded Spill -; CHECK-NEXT: addvl sp, sp, #-18 -; CHECK-NEXT: str p15, [sp, #4, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p14, [sp, #5, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p13, [sp, #6, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p12, [sp, #7, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p11, [sp, #8, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p10, [sp, #9, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p9, [sp, #10, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p8, [sp, #11, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p7, [sp, #12, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p6, [sp, #13, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p5, [sp, #14, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p4, [sp, #15, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str z23, [sp, #2, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z22, [sp, #3, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z21, [sp, #4, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z20, [sp, #5, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z19, [sp, #6, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z18, [sp, #7, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z17, [sp, #8, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z16, [sp, #9, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z15, [sp, #10, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z14, [sp, #11, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z13, [sp, #12, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z12, [sp, #13, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z11, [sp, #14, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z10, [sp, #15, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z9, [sp, #16, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z8, [sp, #17, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: addvl sp, sp, #-3 -; CHECK-NEXT: str z3, [sp, #2, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z2, [sp, #1, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z0, [sp] // 16-byte Folded Spill ; CHECK-NEXT: bl bar -; CHECK-NEXT: ldr z0, [sp] // 16-byte Folded Reload -; CHECK-NEXT: ldr z2, [sp, #1, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z3, [sp, #2, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: addvl sp, sp, #3 -; CHECK-NEXT: ldr p15, [sp, #4, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p14, [sp, #5, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p13, [sp, #6, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p12, [sp, #7, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p11, [sp, #8, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p10, [sp, #9, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p9, [sp, #10, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p8, [sp, #11, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p7, [sp, #12, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p6, [sp, #13, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p5, [sp, #14, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p4, [sp, #15, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr z23, [sp, #2, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z22, [sp, #3, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z21, [sp, #4, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z20, [sp, #5, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z19, [sp, #6, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z18, [sp, #7, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z17, [sp, #8, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z16, [sp, #9, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z15, [sp, #10, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z14, [sp, #11, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z13, [sp, #12, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z12, [sp, #13, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z11, [sp, #14, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z10, [sp, #15, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z9, [sp, #16, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z8, [sp, #17, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: addvl sp, sp, #18 -; CHECK-NEXT: ldp x29, x30, [sp], #16 // 16-byte Folded Reload ; CHECK-NEXT: .LBB13_2: // %common.ret -; CHECK-NEXT: mov z1.d, z2.d -; CHECK-NEXT: mov z2.d, z3.d +; CHECK-NEXT: mov z0.d, z10.d +; CHECK-NEXT: mov z1.d, z9.d +; CHECK-NEXT: mov z2.d, z8.d +; CHECK-NEXT: ldr z10, [sp] // 16-byte Folded Reload +; CHECK-NEXT: ldr z9, [sp, #1, mul vl] // 16-byte Folded Reload +; CHECK-NEXT: ldr z8, [sp, #2, mul vl] // 16-byte Folded Reload +; CHECK-NEXT: addvl sp, sp, #3 +; CHECK-NEXT: ldp x29, x30, [sp], #16 // 16-byte Folded Reload ; CHECK-NEXT: ret br i1 %b, label %L1, label %L2 L1: - call void @bar() + call aarch64_sve_vector_pcs void @bar() ret undef L2: ret %illegal @@ -1218,88 +441,34 @@ L2: define @wide_64i8(i1 %b, %legal, %illegal) nounwind { ; CHECK-LABEL: wide_64i8: ; CHECK: // %bb.0: -; CHECK-NEXT: mov z0.d, z1.d +; CHECK-NEXT: stp x29, x30, [sp, #-16]! // 16-byte Folded Spill +; CHECK-NEXT: addvl sp, sp, #-4 +; CHECK-NEXT: str z11, [sp] // 16-byte Folded Spill +; CHECK-NEXT: str z10, [sp, #1, mul vl] // 16-byte Folded Spill +; CHECK-NEXT: str z9, [sp, #2, mul vl] // 16-byte Folded Spill +; CHECK-NEXT: str z8, [sp, #3, mul vl] // 16-byte Folded Spill +; CHECK-NEXT: mov z8.d, z4.d +; CHECK-NEXT: mov z9.d, z3.d +; CHECK-NEXT: mov z10.d, z2.d +; CHECK-NEXT: mov z11.d, z1.d ; CHECK-NEXT: tbz w0, #0, .LBB14_2 ; CHECK-NEXT: // %bb.1: // %L1 -; CHECK-NEXT: stp x29, x30, [sp, #-16]! // 16-byte Folded Spill -; CHECK-NEXT: addvl sp, sp, #-18 -; CHECK-NEXT: str p15, [sp, #4, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p14, [sp, #5, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p13, [sp, #6, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p12, [sp, #7, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p11, [sp, #8, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p10, [sp, #9, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p9, [sp, #10, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p8, [sp, #11, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p7, [sp, #12, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p6, [sp, #13, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p5, [sp, #14, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p4, [sp, #15, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str z23, [sp, #2, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z22, [sp, #3, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z21, [sp, #4, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z20, [sp, #5, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z19, [sp, #6, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z18, [sp, #7, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z17, [sp, #8, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z16, [sp, #9, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z15, [sp, #10, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z14, [sp, #11, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z13, [sp, #12, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z12, [sp, #13, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z11, [sp, #14, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z10, [sp, #15, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z9, [sp, #16, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z8, [sp, #17, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: addvl sp, sp, #-4 -; CHECK-NEXT: str z4, [sp, #3, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z3, [sp, #2, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z2, [sp, #1, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z0, [sp] // 16-byte Folded Spill ; CHECK-NEXT: bl bar -; CHECK-NEXT: ldr z0, [sp] // 16-byte Folded Reload -; CHECK-NEXT: ldr z2, [sp, #1, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z3, [sp, #2, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z4, [sp, #3, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: addvl sp, sp, #4 -; CHECK-NEXT: ldr p15, [sp, #4, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p14, [sp, #5, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p13, [sp, #6, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p12, [sp, #7, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p11, [sp, #8, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p10, [sp, #9, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p9, [sp, #10, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p8, [sp, #11, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p7, [sp, #12, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p6, [sp, #13, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p5, [sp, #14, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p4, [sp, #15, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr z23, [sp, #2, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z22, [sp, #3, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z21, [sp, #4, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z20, [sp, #5, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z19, [sp, #6, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z18, [sp, #7, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z17, [sp, #8, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z16, [sp, #9, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z15, [sp, #10, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z14, [sp, #11, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z13, [sp, #12, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z12, [sp, #13, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z11, [sp, #14, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z10, [sp, #15, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z9, [sp, #16, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z8, [sp, #17, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: addvl sp, sp, #18 -; CHECK-NEXT: ldp x29, x30, [sp], #16 // 16-byte Folded Reload ; CHECK-NEXT: .LBB14_2: // %common.ret -; CHECK-NEXT: mov z1.d, z2.d -; CHECK-NEXT: mov z2.d, z3.d -; CHECK-NEXT: mov z3.d, z4.d +; CHECK-NEXT: mov z0.d, z11.d +; CHECK-NEXT: mov z1.d, z10.d +; CHECK-NEXT: mov z2.d, z9.d +; CHECK-NEXT: mov z3.d, z8.d +; CHECK-NEXT: ldr z11, [sp] // 16-byte Folded Reload +; CHECK-NEXT: ldr z10, [sp, #1, mul vl] // 16-byte Folded Reload +; CHECK-NEXT: ldr z9, [sp, #2, mul vl] // 16-byte Folded Reload +; CHECK-NEXT: ldr z8, [sp, #3, mul vl] // 16-byte Folded Reload +; CHECK-NEXT: addvl sp, sp, #4 +; CHECK-NEXT: ldp x29, x30, [sp], #16 // 16-byte Folded Reload ; CHECK-NEXT: ret br i1 %b, label %L1, label %L2 L1: - call void @bar() + call aarch64_sve_vector_pcs void @bar() ret undef L2: ret %illegal @@ -1308,88 +477,34 @@ L2: define @wide_32i16(i1 %b, %legal, %illegal) nounwind { ; CHECK-LABEL: wide_32i16: ; CHECK: // %bb.0: -; CHECK-NEXT: mov z0.d, z1.d +; CHECK-NEXT: stp x29, x30, [sp, #-16]! // 16-byte Folded Spill +; CHECK-NEXT: addvl sp, sp, #-4 +; CHECK-NEXT: str z11, [sp] // 16-byte Folded Spill +; CHECK-NEXT: str z10, [sp, #1, mul vl] // 16-byte Folded Spill +; CHECK-NEXT: str z9, [sp, #2, mul vl] // 16-byte Folded Spill +; CHECK-NEXT: str z8, [sp, #3, mul vl] // 16-byte Folded Spill +; CHECK-NEXT: mov z8.d, z4.d +; CHECK-NEXT: mov z9.d, z3.d +; CHECK-NEXT: mov z10.d, z2.d +; CHECK-NEXT: mov z11.d, z1.d ; CHECK-NEXT: tbz w0, #0, .LBB15_2 ; CHECK-NEXT: // %bb.1: // %L1 -; CHECK-NEXT: stp x29, x30, [sp, #-16]! // 16-byte Folded Spill -; CHECK-NEXT: addvl sp, sp, #-18 -; CHECK-NEXT: str p15, [sp, #4, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p14, [sp, #5, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p13, [sp, #6, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p12, [sp, #7, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p11, [sp, #8, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p10, [sp, #9, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p9, [sp, #10, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p8, [sp, #11, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p7, [sp, #12, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p6, [sp, #13, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p5, [sp, #14, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p4, [sp, #15, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str z23, [sp, #2, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z22, [sp, #3, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z21, [sp, #4, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z20, [sp, #5, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z19, [sp, #6, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z18, [sp, #7, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z17, [sp, #8, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z16, [sp, #9, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z15, [sp, #10, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z14, [sp, #11, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z13, [sp, #12, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z12, [sp, #13, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z11, [sp, #14, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z10, [sp, #15, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z9, [sp, #16, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z8, [sp, #17, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: addvl sp, sp, #-4 -; CHECK-NEXT: str z4, [sp, #3, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z3, [sp, #2, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z2, [sp, #1, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z0, [sp] // 16-byte Folded Spill ; CHECK-NEXT: bl bar -; CHECK-NEXT: ldr z0, [sp] // 16-byte Folded Reload -; CHECK-NEXT: ldr z2, [sp, #1, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z3, [sp, #2, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z4, [sp, #3, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: addvl sp, sp, #4 -; CHECK-NEXT: ldr p15, [sp, #4, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p14, [sp, #5, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p13, [sp, #6, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p12, [sp, #7, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p11, [sp, #8, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p10, [sp, #9, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p9, [sp, #10, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p8, [sp, #11, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p7, [sp, #12, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p6, [sp, #13, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p5, [sp, #14, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p4, [sp, #15, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr z23, [sp, #2, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z22, [sp, #3, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z21, [sp, #4, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z20, [sp, #5, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z19, [sp, #6, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z18, [sp, #7, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z17, [sp, #8, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z16, [sp, #9, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z15, [sp, #10, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z14, [sp, #11, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z13, [sp, #12, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z12, [sp, #13, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z11, [sp, #14, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z10, [sp, #15, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z9, [sp, #16, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z8, [sp, #17, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: addvl sp, sp, #18 -; CHECK-NEXT: ldp x29, x30, [sp], #16 // 16-byte Folded Reload ; CHECK-NEXT: .LBB15_2: // %common.ret -; CHECK-NEXT: mov z1.d, z2.d -; CHECK-NEXT: mov z2.d, z3.d -; CHECK-NEXT: mov z3.d, z4.d +; CHECK-NEXT: mov z0.d, z11.d +; CHECK-NEXT: mov z1.d, z10.d +; CHECK-NEXT: mov z2.d, z9.d +; CHECK-NEXT: mov z3.d, z8.d +; CHECK-NEXT: ldr z11, [sp] // 16-byte Folded Reload +; CHECK-NEXT: ldr z10, [sp, #1, mul vl] // 16-byte Folded Reload +; CHECK-NEXT: ldr z9, [sp, #2, mul vl] // 16-byte Folded Reload +; CHECK-NEXT: ldr z8, [sp, #3, mul vl] // 16-byte Folded Reload +; CHECK-NEXT: addvl sp, sp, #4 +; CHECK-NEXT: ldp x29, x30, [sp], #16 // 16-byte Folded Reload ; CHECK-NEXT: ret br i1 %b, label %L1, label %L2 L1: - call void @bar() + call aarch64_sve_vector_pcs void @bar() ret undef L2: ret %illegal @@ -1398,88 +513,34 @@ L2: define @wide_16i32(i1 %b, %legal, %illegal) nounwind { ; CHECK-LABEL: wide_16i32: ; CHECK: // %bb.0: -; CHECK-NEXT: mov z0.d, z1.d +; CHECK-NEXT: stp x29, x30, [sp, #-16]! // 16-byte Folded Spill +; CHECK-NEXT: addvl sp, sp, #-4 +; CHECK-NEXT: str z11, [sp] // 16-byte Folded Spill +; CHECK-NEXT: str z10, [sp, #1, mul vl] // 16-byte Folded Spill +; CHECK-NEXT: str z9, [sp, #2, mul vl] // 16-byte Folded Spill +; CHECK-NEXT: str z8, [sp, #3, mul vl] // 16-byte Folded Spill +; CHECK-NEXT: mov z8.d, z4.d +; CHECK-NEXT: mov z9.d, z3.d +; CHECK-NEXT: mov z10.d, z2.d +; CHECK-NEXT: mov z11.d, z1.d ; CHECK-NEXT: tbz w0, #0, .LBB16_2 ; CHECK-NEXT: // %bb.1: // %L1 -; CHECK-NEXT: stp x29, x30, [sp, #-16]! // 16-byte Folded Spill -; CHECK-NEXT: addvl sp, sp, #-18 -; CHECK-NEXT: str p15, [sp, #4, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p14, [sp, #5, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p13, [sp, #6, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p12, [sp, #7, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p11, [sp, #8, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p10, [sp, #9, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p9, [sp, #10, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p8, [sp, #11, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p7, [sp, #12, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p6, [sp, #13, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p5, [sp, #14, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p4, [sp, #15, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str z23, [sp, #2, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z22, [sp, #3, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z21, [sp, #4, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z20, [sp, #5, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z19, [sp, #6, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z18, [sp, #7, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z17, [sp, #8, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z16, [sp, #9, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z15, [sp, #10, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z14, [sp, #11, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z13, [sp, #12, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z12, [sp, #13, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z11, [sp, #14, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z10, [sp, #15, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z9, [sp, #16, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z8, [sp, #17, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: addvl sp, sp, #-4 -; CHECK-NEXT: str z4, [sp, #3, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z3, [sp, #2, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z2, [sp, #1, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z0, [sp] // 16-byte Folded Spill ; CHECK-NEXT: bl bar -; CHECK-NEXT: ldr z0, [sp] // 16-byte Folded Reload -; CHECK-NEXT: ldr z2, [sp, #1, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z3, [sp, #2, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z4, [sp, #3, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: addvl sp, sp, #4 -; CHECK-NEXT: ldr p15, [sp, #4, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p14, [sp, #5, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p13, [sp, #6, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p12, [sp, #7, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p11, [sp, #8, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p10, [sp, #9, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p9, [sp, #10, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p8, [sp, #11, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p7, [sp, #12, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p6, [sp, #13, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p5, [sp, #14, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p4, [sp, #15, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr z23, [sp, #2, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z22, [sp, #3, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z21, [sp, #4, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z20, [sp, #5, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z19, [sp, #6, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z18, [sp, #7, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z17, [sp, #8, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z16, [sp, #9, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z15, [sp, #10, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z14, [sp, #11, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z13, [sp, #12, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z12, [sp, #13, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z11, [sp, #14, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z10, [sp, #15, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z9, [sp, #16, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z8, [sp, #17, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: addvl sp, sp, #18 -; CHECK-NEXT: ldp x29, x30, [sp], #16 // 16-byte Folded Reload ; CHECK-NEXT: .LBB16_2: // %common.ret -; CHECK-NEXT: mov z1.d, z2.d -; CHECK-NEXT: mov z2.d, z3.d -; CHECK-NEXT: mov z3.d, z4.d +; CHECK-NEXT: mov z0.d, z11.d +; CHECK-NEXT: mov z1.d, z10.d +; CHECK-NEXT: mov z2.d, z9.d +; CHECK-NEXT: mov z3.d, z8.d +; CHECK-NEXT: ldr z11, [sp] // 16-byte Folded Reload +; CHECK-NEXT: ldr z10, [sp, #1, mul vl] // 16-byte Folded Reload +; CHECK-NEXT: ldr z9, [sp, #2, mul vl] // 16-byte Folded Reload +; CHECK-NEXT: ldr z8, [sp, #3, mul vl] // 16-byte Folded Reload +; CHECK-NEXT: addvl sp, sp, #4 +; CHECK-NEXT: ldp x29, x30, [sp], #16 // 16-byte Folded Reload ; CHECK-NEXT: ret br i1 %b, label %L1, label %L2 L1: - call void @bar() + call aarch64_sve_vector_pcs void @bar() ret undef L2: ret %illegal @@ -1488,88 +549,34 @@ L2: define @wide_8i64(i1 %b, %legal, %illegal) nounwind { ; CHECK-LABEL: wide_8i64: ; CHECK: // %bb.0: -; CHECK-NEXT: mov z0.d, z1.d +; CHECK-NEXT: stp x29, x30, [sp, #-16]! // 16-byte Folded Spill +; CHECK-NEXT: addvl sp, sp, #-4 +; CHECK-NEXT: str z11, [sp] // 16-byte Folded Spill +; CHECK-NEXT: str z10, [sp, #1, mul vl] // 16-byte Folded Spill +; CHECK-NEXT: str z9, [sp, #2, mul vl] // 16-byte Folded Spill +; CHECK-NEXT: str z8, [sp, #3, mul vl] // 16-byte Folded Spill +; CHECK-NEXT: mov z8.d, z4.d +; CHECK-NEXT: mov z9.d, z3.d +; CHECK-NEXT: mov z10.d, z2.d +; CHECK-NEXT: mov z11.d, z1.d ; CHECK-NEXT: tbz w0, #0, .LBB17_2 ; CHECK-NEXT: // %bb.1: // %L1 -; CHECK-NEXT: stp x29, x30, [sp, #-16]! // 16-byte Folded Spill -; CHECK-NEXT: addvl sp, sp, #-18 -; CHECK-NEXT: str p15, [sp, #4, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p14, [sp, #5, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p13, [sp, #6, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p12, [sp, #7, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p11, [sp, #8, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p10, [sp, #9, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p9, [sp, #10, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p8, [sp, #11, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p7, [sp, #12, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p6, [sp, #13, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p5, [sp, #14, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p4, [sp, #15, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str z23, [sp, #2, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z22, [sp, #3, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z21, [sp, #4, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z20, [sp, #5, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z19, [sp, #6, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z18, [sp, #7, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z17, [sp, #8, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z16, [sp, #9, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z15, [sp, #10, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z14, [sp, #11, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z13, [sp, #12, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z12, [sp, #13, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z11, [sp, #14, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z10, [sp, #15, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z9, [sp, #16, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z8, [sp, #17, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: addvl sp, sp, #-4 -; CHECK-NEXT: str z4, [sp, #3, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z3, [sp, #2, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z2, [sp, #1, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z0, [sp] // 16-byte Folded Spill ; CHECK-NEXT: bl bar -; CHECK-NEXT: ldr z0, [sp] // 16-byte Folded Reload -; CHECK-NEXT: ldr z2, [sp, #1, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z3, [sp, #2, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z4, [sp, #3, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: addvl sp, sp, #4 -; CHECK-NEXT: ldr p15, [sp, #4, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p14, [sp, #5, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p13, [sp, #6, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p12, [sp, #7, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p11, [sp, #8, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p10, [sp, #9, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p9, [sp, #10, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p8, [sp, #11, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p7, [sp, #12, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p6, [sp, #13, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p5, [sp, #14, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p4, [sp, #15, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr z23, [sp, #2, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z22, [sp, #3, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z21, [sp, #4, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z20, [sp, #5, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z19, [sp, #6, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z18, [sp, #7, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z17, [sp, #8, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z16, [sp, #9, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z15, [sp, #10, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z14, [sp, #11, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z13, [sp, #12, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z12, [sp, #13, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z11, [sp, #14, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z10, [sp, #15, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z9, [sp, #16, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z8, [sp, #17, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: addvl sp, sp, #18 -; CHECK-NEXT: ldp x29, x30, [sp], #16 // 16-byte Folded Reload ; CHECK-NEXT: .LBB17_2: // %common.ret -; CHECK-NEXT: mov z1.d, z2.d -; CHECK-NEXT: mov z2.d, z3.d -; CHECK-NEXT: mov z3.d, z4.d +; CHECK-NEXT: mov z0.d, z11.d +; CHECK-NEXT: mov z1.d, z10.d +; CHECK-NEXT: mov z2.d, z9.d +; CHECK-NEXT: mov z3.d, z8.d +; CHECK-NEXT: ldr z11, [sp] // 16-byte Folded Reload +; CHECK-NEXT: ldr z10, [sp, #1, mul vl] // 16-byte Folded Reload +; CHECK-NEXT: ldr z9, [sp, #2, mul vl] // 16-byte Folded Reload +; CHECK-NEXT: ldr z8, [sp, #3, mul vl] // 16-byte Folded Reload +; CHECK-NEXT: addvl sp, sp, #4 +; CHECK-NEXT: ldp x29, x30, [sp], #16 // 16-byte Folded Reload ; CHECK-NEXT: ret br i1 %b, label %L1, label %L2 L1: - call void @bar() + call aarch64_sve_vector_pcs void @bar() ret undef L2: ret %illegal @@ -1578,88 +585,34 @@ L2: define @wide_32f16(i1 %b, %legal, %illegal) nounwind { ; CHECK-LABEL: wide_32f16: ; CHECK: // %bb.0: -; CHECK-NEXT: mov z0.d, z1.d +; CHECK-NEXT: stp x29, x30, [sp, #-16]! // 16-byte Folded Spill +; CHECK-NEXT: addvl sp, sp, #-4 +; CHECK-NEXT: str z11, [sp] // 16-byte Folded Spill +; CHECK-NEXT: str z10, [sp, #1, mul vl] // 16-byte Folded Spill +; CHECK-NEXT: str z9, [sp, #2, mul vl] // 16-byte Folded Spill +; CHECK-NEXT: str z8, [sp, #3, mul vl] // 16-byte Folded Spill +; CHECK-NEXT: mov z8.d, z4.d +; CHECK-NEXT: mov z9.d, z3.d +; CHECK-NEXT: mov z10.d, z2.d +; CHECK-NEXT: mov z11.d, z1.d ; CHECK-NEXT: tbz w0, #0, .LBB18_2 ; CHECK-NEXT: // %bb.1: // %L1 -; CHECK-NEXT: stp x29, x30, [sp, #-16]! // 16-byte Folded Spill -; CHECK-NEXT: addvl sp, sp, #-18 -; CHECK-NEXT: str p15, [sp, #4, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p14, [sp, #5, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p13, [sp, #6, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p12, [sp, #7, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p11, [sp, #8, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p10, [sp, #9, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p9, [sp, #10, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p8, [sp, #11, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p7, [sp, #12, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p6, [sp, #13, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p5, [sp, #14, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p4, [sp, #15, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str z23, [sp, #2, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z22, [sp, #3, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z21, [sp, #4, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z20, [sp, #5, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z19, [sp, #6, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z18, [sp, #7, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z17, [sp, #8, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z16, [sp, #9, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z15, [sp, #10, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z14, [sp, #11, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z13, [sp, #12, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z12, [sp, #13, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z11, [sp, #14, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z10, [sp, #15, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z9, [sp, #16, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z8, [sp, #17, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: addvl sp, sp, #-4 -; CHECK-NEXT: str z4, [sp, #3, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z3, [sp, #2, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z2, [sp, #1, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z0, [sp] // 16-byte Folded Spill ; CHECK-NEXT: bl bar -; CHECK-NEXT: ldr z0, [sp] // 16-byte Folded Reload -; CHECK-NEXT: ldr z2, [sp, #1, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z3, [sp, #2, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z4, [sp, #3, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: addvl sp, sp, #4 -; CHECK-NEXT: ldr p15, [sp, #4, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p14, [sp, #5, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p13, [sp, #6, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p12, [sp, #7, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p11, [sp, #8, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p10, [sp, #9, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p9, [sp, #10, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p8, [sp, #11, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p7, [sp, #12, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p6, [sp, #13, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p5, [sp, #14, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p4, [sp, #15, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr z23, [sp, #2, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z22, [sp, #3, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z21, [sp, #4, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z20, [sp, #5, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z19, [sp, #6, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z18, [sp, #7, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z17, [sp, #8, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z16, [sp, #9, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z15, [sp, #10, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z14, [sp, #11, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z13, [sp, #12, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z12, [sp, #13, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z11, [sp, #14, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z10, [sp, #15, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z9, [sp, #16, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z8, [sp, #17, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: addvl sp, sp, #18 -; CHECK-NEXT: ldp x29, x30, [sp], #16 // 16-byte Folded Reload ; CHECK-NEXT: .LBB18_2: // %common.ret -; CHECK-NEXT: mov z1.d, z2.d -; CHECK-NEXT: mov z2.d, z3.d -; CHECK-NEXT: mov z3.d, z4.d +; CHECK-NEXT: mov z0.d, z11.d +; CHECK-NEXT: mov z1.d, z10.d +; CHECK-NEXT: mov z2.d, z9.d +; CHECK-NEXT: mov z3.d, z8.d +; CHECK-NEXT: ldr z11, [sp] // 16-byte Folded Reload +; CHECK-NEXT: ldr z10, [sp, #1, mul vl] // 16-byte Folded Reload +; CHECK-NEXT: ldr z9, [sp, #2, mul vl] // 16-byte Folded Reload +; CHECK-NEXT: ldr z8, [sp, #3, mul vl] // 16-byte Folded Reload +; CHECK-NEXT: addvl sp, sp, #4 +; CHECK-NEXT: ldp x29, x30, [sp], #16 // 16-byte Folded Reload ; CHECK-NEXT: ret br i1 %b, label %L1, label %L2 L1: - call void @bar() + call aarch64_sve_vector_pcs void @bar() ret undef L2: ret %illegal @@ -1668,88 +621,34 @@ L2: define @wide_16f32(i1 %b, %legal, %illegal) nounwind { ; CHECK-LABEL: wide_16f32: ; CHECK: // %bb.0: -; CHECK-NEXT: mov z0.d, z1.d +; CHECK-NEXT: stp x29, x30, [sp, #-16]! // 16-byte Folded Spill +; CHECK-NEXT: addvl sp, sp, #-4 +; CHECK-NEXT: str z11, [sp] // 16-byte Folded Spill +; CHECK-NEXT: str z10, [sp, #1, mul vl] // 16-byte Folded Spill +; CHECK-NEXT: str z9, [sp, #2, mul vl] // 16-byte Folded Spill +; CHECK-NEXT: str z8, [sp, #3, mul vl] // 16-byte Folded Spill +; CHECK-NEXT: mov z8.d, z4.d +; CHECK-NEXT: mov z9.d, z3.d +; CHECK-NEXT: mov z10.d, z2.d +; CHECK-NEXT: mov z11.d, z1.d ; CHECK-NEXT: tbz w0, #0, .LBB19_2 ; CHECK-NEXT: // %bb.1: // %L1 -; CHECK-NEXT: stp x29, x30, [sp, #-16]! // 16-byte Folded Spill -; CHECK-NEXT: addvl sp, sp, #-18 -; CHECK-NEXT: str p15, [sp, #4, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p14, [sp, #5, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p13, [sp, #6, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p12, [sp, #7, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p11, [sp, #8, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p10, [sp, #9, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p9, [sp, #10, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p8, [sp, #11, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p7, [sp, #12, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p6, [sp, #13, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p5, [sp, #14, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p4, [sp, #15, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str z23, [sp, #2, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z22, [sp, #3, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z21, [sp, #4, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z20, [sp, #5, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z19, [sp, #6, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z18, [sp, #7, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z17, [sp, #8, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z16, [sp, #9, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z15, [sp, #10, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z14, [sp, #11, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z13, [sp, #12, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z12, [sp, #13, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z11, [sp, #14, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z10, [sp, #15, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z9, [sp, #16, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z8, [sp, #17, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: addvl sp, sp, #-4 -; CHECK-NEXT: str z4, [sp, #3, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z3, [sp, #2, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z2, [sp, #1, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z0, [sp] // 16-byte Folded Spill ; CHECK-NEXT: bl bar -; CHECK-NEXT: ldr z0, [sp] // 16-byte Folded Reload -; CHECK-NEXT: ldr z2, [sp, #1, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z3, [sp, #2, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z4, [sp, #3, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: addvl sp, sp, #4 -; CHECK-NEXT: ldr p15, [sp, #4, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p14, [sp, #5, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p13, [sp, #6, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p12, [sp, #7, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p11, [sp, #8, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p10, [sp, #9, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p9, [sp, #10, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p8, [sp, #11, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p7, [sp, #12, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p6, [sp, #13, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p5, [sp, #14, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p4, [sp, #15, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr z23, [sp, #2, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z22, [sp, #3, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z21, [sp, #4, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z20, [sp, #5, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z19, [sp, #6, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z18, [sp, #7, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z17, [sp, #8, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z16, [sp, #9, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z15, [sp, #10, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z14, [sp, #11, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z13, [sp, #12, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z12, [sp, #13, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z11, [sp, #14, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z10, [sp, #15, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z9, [sp, #16, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z8, [sp, #17, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: addvl sp, sp, #18 -; CHECK-NEXT: ldp x29, x30, [sp], #16 // 16-byte Folded Reload ; CHECK-NEXT: .LBB19_2: // %common.ret -; CHECK-NEXT: mov z1.d, z2.d -; CHECK-NEXT: mov z2.d, z3.d -; CHECK-NEXT: mov z3.d, z4.d +; CHECK-NEXT: mov z0.d, z11.d +; CHECK-NEXT: mov z1.d, z10.d +; CHECK-NEXT: mov z2.d, z9.d +; CHECK-NEXT: mov z3.d, z8.d +; CHECK-NEXT: ldr z11, [sp] // 16-byte Folded Reload +; CHECK-NEXT: ldr z10, [sp, #1, mul vl] // 16-byte Folded Reload +; CHECK-NEXT: ldr z9, [sp, #2, mul vl] // 16-byte Folded Reload +; CHECK-NEXT: ldr z8, [sp, #3, mul vl] // 16-byte Folded Reload +; CHECK-NEXT: addvl sp, sp, #4 +; CHECK-NEXT: ldp x29, x30, [sp], #16 // 16-byte Folded Reload ; CHECK-NEXT: ret br i1 %b, label %L1, label %L2 L1: - call void @bar() + call aarch64_sve_vector_pcs void @bar() ret undef L2: ret %illegal @@ -1758,88 +657,34 @@ L2: define @wide_8f64(i1 %b, %legal, %illegal) nounwind { ; CHECK-LABEL: wide_8f64: ; CHECK: // %bb.0: -; CHECK-NEXT: mov z0.d, z1.d +; CHECK-NEXT: stp x29, x30, [sp, #-16]! // 16-byte Folded Spill +; CHECK-NEXT: addvl sp, sp, #-4 +; CHECK-NEXT: str z11, [sp] // 16-byte Folded Spill +; CHECK-NEXT: str z10, [sp, #1, mul vl] // 16-byte Folded Spill +; CHECK-NEXT: str z9, [sp, #2, mul vl] // 16-byte Folded Spill +; CHECK-NEXT: str z8, [sp, #3, mul vl] // 16-byte Folded Spill +; CHECK-NEXT: mov z8.d, z4.d +; CHECK-NEXT: mov z9.d, z3.d +; CHECK-NEXT: mov z10.d, z2.d +; CHECK-NEXT: mov z11.d, z1.d ; CHECK-NEXT: tbz w0, #0, .LBB20_2 ; CHECK-NEXT: // %bb.1: // %L1 -; CHECK-NEXT: stp x29, x30, [sp, #-16]! // 16-byte Folded Spill -; CHECK-NEXT: addvl sp, sp, #-18 -; CHECK-NEXT: str p15, [sp, #4, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p14, [sp, #5, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p13, [sp, #6, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p12, [sp, #7, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p11, [sp, #8, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p10, [sp, #9, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p9, [sp, #10, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p8, [sp, #11, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p7, [sp, #12, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p6, [sp, #13, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p5, [sp, #14, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str p4, [sp, #15, mul vl] // 2-byte Folded Spill -; CHECK-NEXT: str z23, [sp, #2, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z22, [sp, #3, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z21, [sp, #4, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z20, [sp, #5, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z19, [sp, #6, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z18, [sp, #7, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z17, [sp, #8, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z16, [sp, #9, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z15, [sp, #10, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z14, [sp, #11, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z13, [sp, #12, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z12, [sp, #13, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z11, [sp, #14, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z10, [sp, #15, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z9, [sp, #16, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z8, [sp, #17, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: addvl sp, sp, #-4 -; CHECK-NEXT: str z4, [sp, #3, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z3, [sp, #2, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z2, [sp, #1, mul vl] // 16-byte Folded Spill -; CHECK-NEXT: str z0, [sp] // 16-byte Folded Spill ; CHECK-NEXT: bl bar -; CHECK-NEXT: ldr z0, [sp] // 16-byte Folded Reload -; CHECK-NEXT: ldr z2, [sp, #1, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z3, [sp, #2, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z4, [sp, #3, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: addvl sp, sp, #4 -; CHECK-NEXT: ldr p15, [sp, #4, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p14, [sp, #5, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p13, [sp, #6, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p12, [sp, #7, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p11, [sp, #8, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p10, [sp, #9, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p9, [sp, #10, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p8, [sp, #11, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p7, [sp, #12, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p6, [sp, #13, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p5, [sp, #14, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr p4, [sp, #15, mul vl] // 2-byte Folded Reload -; CHECK-NEXT: ldr z23, [sp, #2, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z22, [sp, #3, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z21, [sp, #4, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z20, [sp, #5, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z19, [sp, #6, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z18, [sp, #7, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z17, [sp, #8, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z16, [sp, #9, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z15, [sp, #10, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z14, [sp, #11, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z13, [sp, #12, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z12, [sp, #13, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z11, [sp, #14, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z10, [sp, #15, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z9, [sp, #16, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: ldr z8, [sp, #17, mul vl] // 16-byte Folded Reload -; CHECK-NEXT: addvl sp, sp, #18 -; CHECK-NEXT: ldp x29, x30, [sp], #16 // 16-byte Folded Reload ; CHECK-NEXT: .LBB20_2: // %common.ret -; CHECK-NEXT: mov z1.d, z2.d -; CHECK-NEXT: mov z2.d, z3.d -; CHECK-NEXT: mov z3.d, z4.d +; CHECK-NEXT: mov z0.d, z11.d +; CHECK-NEXT: mov z1.d, z10.d +; CHECK-NEXT: mov z2.d, z9.d +; CHECK-NEXT: mov z3.d, z8.d +; CHECK-NEXT: ldr z11, [sp] // 16-byte Folded Reload +; CHECK-NEXT: ldr z10, [sp, #1, mul vl] // 16-byte Folded Reload +; CHECK-NEXT: ldr z9, [sp, #2, mul vl] // 16-byte Folded Reload +; CHECK-NEXT: ldr z8, [sp, #3, mul vl] // 16-byte Folded Reload +; CHECK-NEXT: addvl sp, sp, #4 +; CHECK-NEXT: ldp x29, x30, [sp], #16 // 16-byte Folded Reload ; CHECK-NEXT: ret br i1 %b, label %L1, label %L2 L1: - call void @bar() + call aarch64_sve_vector_pcs void @bar() ret undef L2: ret %illegal