From 8f4c6aa9fd46638af67e0936cc3c27e86f4a0fa4 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 17 Jun 2025 15:08:02 +0200 Subject: [PATCH] [PowerPC][AIX] Specify pointer info and alignment for stack store When lowering call arguments to stack, specify a stack MPI, as well as the stack alignment, instead of using the defaults (which would be an unknown location with ABI alignment). --- llvm/lib/Target/PowerPC/PPCISelLowering.cpp | 4 +- llvm/test/CodeGen/PowerPC/aix-cc-abi-mir.ll | 366 +++++++++--------- llvm/test/CodeGen/PowerPC/aix-cc-abi.ll | 176 +++++---- llvm/test/CodeGen/PowerPC/aix-cc-byval-mir.ll | 4 +- .../CodeGen/PowerPC/aix-vec-arg-spills-mir.ll | 34 +- .../CodeGen/PowerPC/aix-vec-arg-spills.ll | 38 +- .../PowerPC/aix-vector-vararg-caller.ll | 26 +- .../PowerPC/aix-vector-vararg-fixed-caller.ll | 8 +- 8 files changed, 341 insertions(+), 315 deletions(-) diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp index 0f8e5e57c58b7..f502d8570425a 100644 --- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp +++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp @@ -7767,7 +7767,9 @@ SDValue PPCTargetLowering::LowerCall_AIX( DAG.getConstant(VA.getLocMemOffset(), dl, StackPtr.getValueType()); PtrOff = DAG.getNode(ISD::ADD, dl, PtrVT, StackPtr, PtrOff); MemOpChains.push_back( - DAG.getStore(Chain, dl, Arg, PtrOff, MachinePointerInfo())); + DAG.getStore(Chain, dl, Arg, PtrOff, + MachinePointerInfo::getStack(MF, VA.getLocMemOffset()), + Subtarget.getFrameLowering()->getStackAlign())); continue; } diff --git a/llvm/test/CodeGen/PowerPC/aix-cc-abi-mir.ll b/llvm/test/CodeGen/PowerPC/aix-cc-abi-mir.ll index aead5762d0921..9ffb4fd5eae45 100644 --- a/llvm/test/CodeGen/PowerPC/aix-cc-abi-mir.ll +++ b/llvm/test/CodeGen/PowerPC/aix-cc-abi-mir.ll @@ -474,14 +474,14 @@ define void @call_test_fpr_max() { ; 32BIT-NEXT: renamable $r3 = LWZtoc @d1, $r2 :: (load (s32) from got) ; 32BIT-NEXT: renamable $f1 = LFD 0, killed renamable $r3 :: (dereferenceable load (s64) from @d1) ; 32BIT-NEXT: ADJCALLSTACKDOWN 128, 0, implicit-def dead $r1, implicit $r1 - ; 32BIT-NEXT: STFD renamable $f1, 120, $r1 :: (store (s64)) - ; 32BIT-NEXT: STFD renamable $f1, 112, $r1 :: (store (s64)) - ; 32BIT-NEXT: STFD renamable $f1, 104, $r1 :: (store (s64)) - ; 32BIT-NEXT: STFD renamable $f1, 96, $r1 :: (store (s64)) - ; 32BIT-NEXT: STFD renamable $f1, 88, $r1 :: (store (s64)) - ; 32BIT-NEXT: STFD renamable $f1, 80, $r1 :: (store (s64)) - ; 32BIT-NEXT: STFD renamable $f1, 72, $r1 :: (store (s64)) - ; 32BIT-NEXT: STFD renamable $f1, 64, $r1 :: (store (s64)) + ; 32BIT-NEXT: STFD renamable $f1, 120, $r1 :: (store (s64) into stack + 120, basealign 16) + ; 32BIT-NEXT: STFD renamable $f1, 112, $r1 :: (store (s64) into stack + 112, align 16) + ; 32BIT-NEXT: STFD renamable $f1, 104, $r1 :: (store (s64) into stack + 104, basealign 16) + ; 32BIT-NEXT: STFD renamable $f1, 96, $r1 :: (store (s64) into stack + 96, align 16) + ; 32BIT-NEXT: STFD renamable $f1, 88, $r1 :: (store (s64) into stack + 88, basealign 16) + ; 32BIT-NEXT: STFD renamable $f1, 80, $r1 :: (store (s64) into stack + 80, align 16) + ; 32BIT-NEXT: STFD renamable $f1, 72, $r1 :: (store (s64) into stack + 72, basealign 16) + ; 32BIT-NEXT: STFD renamable $f1, 64, $r1 :: (store (s64) into stack + 64, align 16) ; 32BIT-NEXT: $f2 = COPY renamable $f1 ; 32BIT-NEXT: $f3 = COPY renamable $f1 ; 32BIT-NEXT: $f4 = COPY renamable $f1 @@ -494,7 +494,7 @@ define void @call_test_fpr_max() { ; 32BIT-NEXT: $f11 = COPY renamable $f1 ; 32BIT-NEXT: $f12 = COPY renamable $f1 ; 32BIT-NEXT: $f13 = COPY renamable $f1 - ; 32BIT-NEXT: STFD renamable $f1, 56, $r1 :: (store (s64)) + ; 32BIT-NEXT: STFD renamable $f1, 56, $r1 :: (store (s64) into stack + 56, basealign 16) ; 32BIT-NEXT: BL_NOP , csr_aix32, implicit-def dead $lr, implicit $rm, implicit $f1, implicit killed $f2, implicit killed $f3, implicit killed $f4, implicit killed $f5, implicit killed $f6, implicit killed $f7, implicit killed $f8, implicit killed $f9, implicit killed $f10, implicit killed $f11, implicit killed $f12, implicit killed $f13, implicit $r2, implicit-def $r1, implicit-def dead $f1 ; 32BIT-NEXT: ADJCALLSTACKUP 128, 0, implicit-def dead $r1, implicit $r1 ; 32BIT-NEXT: BLR implicit $lr, implicit $rm @@ -504,10 +504,10 @@ define void @call_test_fpr_max() { ; 64BIT-NEXT: renamable $x3 = LDtoc @d1, $x2 :: (load (s64) from got) ; 64BIT-NEXT: renamable $f1 = LFD 0, killed renamable $x3 :: (dereferenceable load (s64) from @d1) ; 64BIT-NEXT: ADJCALLSTACKDOWN 152, 0, implicit-def dead $r1, implicit $r1 - ; 64BIT-NEXT: STFD renamable $f1, 144, $x1 :: (store (s64)) - ; 64BIT-NEXT: STFD renamable $f1, 136, $x1 :: (store (s64)) - ; 64BIT-NEXT: STFD renamable $f1, 128, $x1 :: (store (s64)) - ; 64BIT-NEXT: STFD renamable $f1, 120, $x1 :: (store (s64)) + ; 64BIT-NEXT: STFD renamable $f1, 144, $x1 :: (store (s64) into stack + 144, align 16) + ; 64BIT-NEXT: STFD renamable $f1, 136, $x1 :: (store (s64) into stack + 136, basealign 16) + ; 64BIT-NEXT: STFD renamable $f1, 128, $x1 :: (store (s64) into stack + 128, align 16) + ; 64BIT-NEXT: STFD renamable $f1, 120, $x1 :: (store (s64) into stack + 120, basealign 16) ; 64BIT-NEXT: $f2 = COPY renamable $f1 ; 64BIT-NEXT: $f3 = COPY renamable $f1 ; 64BIT-NEXT: $f4 = COPY renamable $f1 @@ -520,7 +520,7 @@ define void @call_test_fpr_max() { ; 64BIT-NEXT: $f11 = COPY renamable $f1 ; 64BIT-NEXT: $f12 = COPY renamable $f1 ; 64BIT-NEXT: $f13 = COPY renamable $f1 - ; 64BIT-NEXT: STFD renamable $f1, 112, $x1 :: (store (s64)) + ; 64BIT-NEXT: STFD renamable $f1, 112, $x1 :: (store (s64) into stack + 112, align 16) ; 64BIT-NEXT: BL8_NOP , csr_ppc64, implicit-def dead $lr8, implicit $rm, implicit $f1, implicit killed $f2, implicit killed $f3, implicit killed $f4, implicit killed $f5, implicit killed $f6, implicit killed $f7, implicit killed $f8, implicit killed $f9, implicit killed $f10, implicit killed $f11, implicit killed $f12, implicit killed $f13, implicit $x2, implicit-def $r1, implicit-def dead $f1 ; 64BIT-NEXT: ADJCALLSTACKUP 152, 0, implicit-def dead $r1, implicit $r1 ; 64BIT-NEXT: BLR8 implicit $lr8, implicit $rm @@ -889,11 +889,11 @@ define void @call_test_stackarg_int() { ; 32BIT-NEXT: renamable $r6 = LWZ 0, renamable $r3 :: (dereferenceable load (s32) from @lli, align 8) ; 32BIT-NEXT: renamable $r3 = LWZ 4, killed renamable $r3 :: (dereferenceable load (s32) from @lli + 4, basealign 8) ; 32BIT-NEXT: ADJCALLSTACKDOWN 80, 0, implicit-def dead $r1, implicit $r1 - ; 32BIT-NEXT: STW renamable $r5, 76, $r1 :: (store (s32)) - ; 32BIT-NEXT: STW killed renamable $r3, 72, $r1 :: (store (s32)) - ; 32BIT-NEXT: STW killed renamable $r6, 68, $r1 :: (store (s32)) - ; 32BIT-NEXT: STW killed renamable $r5, 64, $r1 :: (store (s32)) - ; 32BIT-NEXT: STW killed renamable $r4, 60, $r1 :: (store (s32)) + ; 32BIT-NEXT: STW renamable $r5, 76, $r1 :: (store (s32) into stack + 76, basealign 16) + ; 32BIT-NEXT: STW killed renamable $r3, 72, $r1 :: (store (s32) into stack + 72, align 8, basealign 16) + ; 32BIT-NEXT: STW killed renamable $r6, 68, $r1 :: (store (s32) into stack + 68, basealign 16) + ; 32BIT-NEXT: STW killed renamable $r5, 64, $r1 :: (store (s32) into stack + 64, align 16) + ; 32BIT-NEXT: STW killed renamable $r4, 60, $r1 :: (store (s32) into stack + 60, basealign 16) ; 32BIT-NEXT: $r3 = LI 1 ; 32BIT-NEXT: $r4 = LI 2 ; 32BIT-NEXT: $r5 = LI 3 @@ -902,7 +902,7 @@ define void @call_test_stackarg_int() { ; 32BIT-NEXT: $r8 = LI 6 ; 32BIT-NEXT: $r9 = LI 7 ; 32BIT-NEXT: $r10 = LI 8 - ; 32BIT-NEXT: STW killed renamable $r11, 56, $r1 :: (store (s32)) + ; 32BIT-NEXT: STW killed renamable $r11, 56, $r1 :: (store (s32) into stack + 56, align 8, basealign 16) ; 32BIT-NEXT: BL_NOP , csr_aix32, implicit-def dead $lr, implicit $rm, implicit $r3, implicit $r4, implicit $r5, implicit $r6, implicit $r7, implicit $r8, implicit $r9, implicit $r10, implicit $r2, implicit-def $r1 ; 32BIT-NEXT: ADJCALLSTACKUP 80, 0, implicit-def dead $r1, implicit $r1 ; 32BIT-NEXT: BLR implicit $lr, implicit $rm @@ -926,11 +926,11 @@ define void @call_test_stackarg_int() { ; 64BIT-NEXT: $x8 = LI8 6 ; 64BIT-NEXT: $x9 = LI8 7 ; 64BIT-NEXT: $x10 = LI8 8 - ; 64BIT-NEXT: STD killed renamable $x31, 136, $x1 :: (store (s64)) - ; 64BIT-NEXT: STD renamable $x0, 144, $x1 :: (store (s64)) - ; 64BIT-NEXT: STD killed renamable $x0, 128, $x1 :: (store (s64)) - ; 64BIT-NEXT: STD killed renamable $x12, 120, $x1 :: (store (s64)) - ; 64BIT-NEXT: STD killed renamable $x11, 112, $x1 :: (store (s64)) + ; 64BIT-NEXT: STD killed renamable $x31, 136, $x1 :: (store (s64) into stack + 136, basealign 16) + ; 64BIT-NEXT: STD renamable $x0, 144, $x1 :: (store (s64) into stack + 144, align 16) + ; 64BIT-NEXT: STD killed renamable $x0, 128, $x1 :: (store (s64) into stack + 128, align 16) + ; 64BIT-NEXT: STD killed renamable $x12, 120, $x1 :: (store (s64) into stack + 120, basealign 16) + ; 64BIT-NEXT: STD killed renamable $x11, 112, $x1 :: (store (s64) into stack + 112, align 16) ; 64BIT-NEXT: BL8_NOP , csr_ppc64, implicit-def dead $lr8, implicit $rm, implicit $x3, implicit $x4, implicit $x5, implicit $x6, implicit $x7, implicit $x8, implicit $x9, implicit $x10, implicit $x2, implicit-def $r1 ; 64BIT-NEXT: ADJCALLSTACKUP 152, 0, implicit-def dead $r1, implicit $r1 ; 64BIT-NEXT: BLR8 implicit $lr8, implicit $rm @@ -956,7 +956,11 @@ define void @call_test_stackarg_float() { ; 32BIT-NEXT: renamable $f1 = LFS 0, killed renamable $r3 :: (dereferenceable load (s32) from @f) ; 32BIT-NEXT: renamable $f2 = LFD 0, killed renamable $r4 :: (dereferenceable load (s64) from @d) ; 32BIT-NEXT: ADJCALLSTACKDOWN 68, 0, implicit-def dead $r1, implicit $r1 - ; 32BIT-NEXT: STFD renamable $f2, 60, $r1 :: (store (s64)) + ; 32BIT-NEXT: STFD renamable $f2, 0, %stack.0 :: (store (s64) into %stack.0) + ; 32BIT-NEXT: STFS renamable $f1, 56, $r1 :: (store (s32) into stack + 56, align 8, basealign 16) + ; 32BIT-NEXT: renamable $r3 = LWZ 4, %stack.0 :: (load (s32) from %stack.0 + 4) + ; 32BIT-NEXT: STW killed renamable $r3, 64, $r1 :: (store (s32) into stack + 64, align 16) + ; 32BIT-NEXT: renamable $r11 = LWZ 0, %stack.0 :: (load (s32) from %stack.0, align 8) ; 32BIT-NEXT: $r3 = LI 1 ; 32BIT-NEXT: $r4 = LI 2 ; 32BIT-NEXT: $r5 = LI 3 @@ -965,8 +969,8 @@ define void @call_test_stackarg_float() { ; 32BIT-NEXT: $r8 = LI 6 ; 32BIT-NEXT: $r9 = LI 7 ; 32BIT-NEXT: $r10 = LI 8 - ; 32BIT-NEXT: STFS renamable $f1, 56, $r1 :: (store (s32)) - ; 32BIT-NEXT: BL_NOP , csr_aix32, implicit-def dead $lr, implicit $rm, implicit $r3, implicit $r4, implicit killed $r5, implicit killed $r6, implicit killed $r7, implicit killed $r8, implicit killed $r9, implicit killed $r10, implicit $f1, implicit $f2, implicit $r2, implicit-def $r1 + ; 32BIT-NEXT: STW killed renamable $r11, 60, $r1 :: (store (s32) into stack + 60, basealign 16) + ; 32BIT-NEXT: BL_NOP , csr_aix32, implicit-def dead $lr, implicit $rm, implicit $r3, implicit $r4, implicit $r5, implicit $r6, implicit $r7, implicit $r8, implicit $r9, implicit $r10, implicit $f1, implicit $f2, implicit $r2, implicit-def $r1 ; 32BIT-NEXT: ADJCALLSTACKUP 68, 0, implicit-def dead $r1, implicit $r1 ; 32BIT-NEXT: BLR implicit $lr, implicit $rm ; @@ -977,7 +981,7 @@ define void @call_test_stackarg_float() { ; 64BIT-NEXT: renamable $f1 = LFS 0, killed renamable $x3 :: (dereferenceable load (s32) from @f) ; 64BIT-NEXT: renamable $f2 = LFD 0, killed renamable $x4 :: (dereferenceable load (s64) from @d) ; 64BIT-NEXT: ADJCALLSTACKDOWN 128, 0, implicit-def dead $r1, implicit $r1 - ; 64BIT-NEXT: STFD renamable $f2, 120, $x1 :: (store (s64)) + ; 64BIT-NEXT: STFD renamable $f2, 120, $x1 :: (store (s64) into stack + 120, basealign 16) ; 64BIT-NEXT: $x3 = LI8 1 ; 64BIT-NEXT: $x4 = LI8 2 ; 64BIT-NEXT: $x5 = LI8 3 @@ -986,7 +990,7 @@ define void @call_test_stackarg_float() { ; 64BIT-NEXT: $x8 = LI8 6 ; 64BIT-NEXT: $x9 = LI8 7 ; 64BIT-NEXT: $x10 = LI8 8 - ; 64BIT-NEXT: STFS renamable $f1, 112, $x1 :: (store (s32)) + ; 64BIT-NEXT: STFS renamable $f1, 112, $x1 :: (store (s32) into stack + 112, align 16) ; 64BIT-NEXT: BL8_NOP , csr_ppc64, implicit-def dead $lr8, implicit $rm, implicit $x3, implicit $x4, implicit killed $x5, implicit killed $x6, implicit killed $x7, implicit killed $x8, implicit killed $x9, implicit killed $x10, implicit $f1, implicit $f2, implicit $x2, implicit-def $r1 ; 64BIT-NEXT: ADJCALLSTACKUP 128, 0, implicit-def dead $r1, implicit $r1 ; 64BIT-NEXT: BLR8 implicit $lr8, implicit $rm @@ -1053,7 +1057,11 @@ define void @call_test_stackarg_float3() { ; 32BIT-NEXT: renamable $r10 = LWZ 0, %stack.0 :: (load (s32) from %stack.0, align 8) ; 32BIT-NEXT: renamable $f2 = LFS 0, killed renamable $r3 :: (dereferenceable load (s32) from @f) ; 32BIT-NEXT: ADJCALLSTACKDOWN 64, 0, implicit-def dead $r1, implicit $r1 - ; 32BIT-NEXT: STFS renamable $f2, 60, $r1 :: (store (s32)) + ; 32BIT-NEXT: STFD renamable $f1, 0, %stack.1 :: (store (s64) into %stack.1) + ; 32BIT-NEXT: STFS renamable $f2, 60, $r1 :: (store (s32) into stack + 60, basealign 16) + ; 32BIT-NEXT: renamable $r3 = LWZ 4, %stack.1 :: (load (s32) from %stack.1 + 4) + ; 32BIT-NEXT: STW killed renamable $r3, 56, $r1 :: (store (s32) into stack + 56, align 8, basealign 16) + ; 32BIT-NEXT: renamable $r11 = LWZ 0, %stack.1 :: (load (s32) from %stack.1, align 8) ; 32BIT-NEXT: $r3 = LI 1 ; 32BIT-NEXT: $r4 = LI 2 ; 32BIT-NEXT: $r5 = LI 3 @@ -1061,8 +1069,8 @@ define void @call_test_stackarg_float3() { ; 32BIT-NEXT: $r7 = LI 5 ; 32BIT-NEXT: $r8 = LI 6 ; 32BIT-NEXT: $r9 = LI 7 - ; 32BIT-NEXT: STFD renamable $f1, 52, $r1 :: (store (s64)) - ; 32BIT-NEXT: BL_NOP , csr_aix32, implicit-def dead $lr, implicit $rm, implicit $r3, implicit killed $r4, implicit killed $r5, implicit killed $r6, implicit killed $r7, implicit killed $r8, implicit killed $r9, implicit $f1, implicit $r10, implicit $f2, implicit $r2, implicit-def $r1 + ; 32BIT-NEXT: STW killed renamable $r11, 52, $r1 :: (store (s32) into stack + 52, basealign 16) + ; 32BIT-NEXT: BL_NOP , csr_aix32, implicit-def dead $lr, implicit $rm, implicit $r3, implicit $r4, implicit $r5, implicit $r6, implicit $r7, implicit $r8, implicit $r9, implicit $f1, implicit $r10, implicit $f2, implicit $r2, implicit-def $r1 ; 32BIT-NEXT: ADJCALLSTACKUP 64, 0, implicit-def dead $r1, implicit $r1 ; 32BIT-NEXT: BLR implicit $lr, implicit $rm ; @@ -1082,7 +1090,7 @@ define void @call_test_stackarg_float3() { ; 64BIT-NEXT: $x7 = LI8 5 ; 64BIT-NEXT: $x8 = LI8 6 ; 64BIT-NEXT: $x9 = LI8 7 - ; 64BIT-NEXT: STFS renamable $f2, 112, $x1 :: (store (s32)) + ; 64BIT-NEXT: STFS renamable $f2, 112, $x1 :: (store (s32) into stack + 112, align 16) ; 64BIT-NEXT: BL8_NOP , csr_ppc64, implicit-def dead $lr8, implicit $rm, implicit $x3, implicit killed $x4, implicit killed $x5, implicit killed $x6, implicit killed $x7, implicit killed $x8, implicit killed $x9, implicit $f1, implicit $x10, implicit $f2, implicit $x2, implicit-def $r1 ; 64BIT-NEXT: ADJCALLSTACKUP 120, 0, implicit-def dead $r1, implicit $r1 ; 64BIT-NEXT: BLR8 implicit $lr8, implicit $rm @@ -1225,15 +1233,15 @@ define void @caller_ints_stack() { ; 32BIT-NEXT: renamable $r9 = LBZ 0, killed renamable $r9 :: (dereferenceable load (s8) from @uc1) ; 32BIT-NEXT: renamable $r12 = LWZ 0, killed renamable $r12 :: (dereferenceable load (s32) from @i1) ; 32BIT-NEXT: ADJCALLSTACKDOWN 96, 0, implicit-def dead $r1, implicit $r1 - ; 32BIT-NEXT: STW killed renamable $r12, 92, $r1 :: (store (s32)) - ; 32BIT-NEXT: STW killed renamable $r9, 88, $r1 :: (store (s32)) - ; 32BIT-NEXT: STW killed renamable $r8, 84, $r1 :: (store (s32)) - ; 32BIT-NEXT: STW killed renamable $r10, 80, $r1 :: (store (s32)) - ; 32BIT-NEXT: STW killed renamable $r7, 76, $r1 :: (store (s32)) - ; 32BIT-NEXT: STW killed renamable $r6, 72, $r1 :: (store (s32)) - ; 32BIT-NEXT: STW killed renamable $r5, 68, $r1 :: (store (s32)) - ; 32BIT-NEXT: STW killed renamable $r4, 64, $r1 :: (store (s32)) - ; 32BIT-NEXT: STW killed renamable $r3, 60, $r1 :: (store (s32)) + ; 32BIT-NEXT: STW killed renamable $r12, 92, $r1 :: (store (s32) into stack + 92, basealign 16) + ; 32BIT-NEXT: STW killed renamable $r9, 88, $r1 :: (store (s32) into stack + 88, align 8, basealign 16) + ; 32BIT-NEXT: STW killed renamable $r8, 84, $r1 :: (store (s32) into stack + 84, basealign 16) + ; 32BIT-NEXT: STW killed renamable $r10, 80, $r1 :: (store (s32) into stack + 80, align 16) + ; 32BIT-NEXT: STW killed renamable $r7, 76, $r1 :: (store (s32) into stack + 76, basealign 16) + ; 32BIT-NEXT: STW killed renamable $r6, 72, $r1 :: (store (s32) into stack + 72, align 8, basealign 16) + ; 32BIT-NEXT: STW killed renamable $r5, 68, $r1 :: (store (s32) into stack + 68, basealign 16) + ; 32BIT-NEXT: STW killed renamable $r4, 64, $r1 :: (store (s32) into stack + 64, align 16) + ; 32BIT-NEXT: STW killed renamable $r3, 60, $r1 :: (store (s32) into stack + 60, basealign 16) ; 32BIT-NEXT: $r3 = LI 1 ; 32BIT-NEXT: $r4 = LI 2 ; 32BIT-NEXT: $r5 = LI 3 @@ -1242,7 +1250,7 @@ define void @caller_ints_stack() { ; 32BIT-NEXT: $r8 = LI 6 ; 32BIT-NEXT: $r9 = LI 7 ; 32BIT-NEXT: $r10 = LI 8 - ; 32BIT-NEXT: STW killed renamable $r11, 56, $r1 :: (store (s32)) + ; 32BIT-NEXT: STW killed renamable $r11, 56, $r1 :: (store (s32) into stack + 56, align 8, basealign 16) ; 32BIT-NEXT: BL_NOP , csr_aix32, implicit-def dead $lr, implicit $rm, implicit $r3, implicit $r4, implicit $r5, implicit $r6, implicit $r7, implicit $r8, implicit $r9, implicit $r10, implicit $r2, implicit-def $r1, implicit-def dead $r3, implicit-def dead $r4 ; 32BIT-NEXT: ADJCALLSTACKUP 96, 0, implicit-def dead $r1, implicit $r1 ; 32BIT-NEXT: BLR implicit $lr, implicit $rm @@ -1274,14 +1282,14 @@ define void @caller_ints_stack() { ; 64BIT-NEXT: $x8 = LI8 6 ; 64BIT-NEXT: $x9 = LI8 7 ; 64BIT-NEXT: $x10 = LI8 8 - ; 64BIT-NEXT: STD killed renamable $x27, 168, $x1 :: (store (s64)) - ; 64BIT-NEXT: STD killed renamable $x30, 160, $x1 :: (store (s64)) - ; 64BIT-NEXT: STD killed renamable $x28, 152, $x1 :: (store (s64)) - ; 64BIT-NEXT: STD killed renamable $x31, 144, $x1 :: (store (s64)) - ; 64BIT-NEXT: STD killed renamable $x0, 136, $x1 :: (store (s64)) - ; 64BIT-NEXT: STD killed renamable $x12, 128, $x1 :: (store (s64)) - ; 64BIT-NEXT: STD killed renamable $x11, 120, $x1 :: (store (s64)) - ; 64BIT-NEXT: STD killed renamable $x29, 112, $x1 :: (store (s64)) + ; 64BIT-NEXT: STD killed renamable $x27, 168, $x1 :: (store (s64) into stack + 168, basealign 16) + ; 64BIT-NEXT: STD killed renamable $x30, 160, $x1 :: (store (s64) into stack + 160, align 16) + ; 64BIT-NEXT: STD killed renamable $x28, 152, $x1 :: (store (s64) into stack + 152, basealign 16) + ; 64BIT-NEXT: STD killed renamable $x31, 144, $x1 :: (store (s64) into stack + 144, align 16) + ; 64BIT-NEXT: STD killed renamable $x0, 136, $x1 :: (store (s64) into stack + 136, basealign 16) + ; 64BIT-NEXT: STD killed renamable $x12, 128, $x1 :: (store (s64) into stack + 128, align 16) + ; 64BIT-NEXT: STD killed renamable $x11, 120, $x1 :: (store (s64) into stack + 120, basealign 16) + ; 64BIT-NEXT: STD killed renamable $x29, 112, $x1 :: (store (s64) into stack + 112, align 16) ; 64BIT-NEXT: BL8_NOP , csr_ppc64, implicit-def dead $lr8, implicit $rm, implicit $x3, implicit $x4, implicit $x5, implicit $x6, implicit $x7, implicit $x8, implicit $x9, implicit $x10, implicit $x2, implicit-def $r1, implicit-def dead $x3 ; 64BIT-NEXT: ADJCALLSTACKUP 176, 0, implicit-def dead $r1, implicit $r1 ; 64BIT-NEXT: BLR8 implicit $lr8, implicit $rm @@ -1333,7 +1341,7 @@ define void @call_test_i1_stack() { ; 32BIT-NEXT: $r8 = LI 6 ; 32BIT-NEXT: $r9 = LI 7 ; 32BIT-NEXT: $r10 = LI 8 - ; 32BIT-NEXT: STW killed renamable $r11, 56, $r1 :: (store (s32)) + ; 32BIT-NEXT: STW killed renamable $r11, 56, $r1 :: (store (s32) into stack + 56, align 8, basealign 16) ; 32BIT-NEXT: BL_NOP , csr_aix32, implicit-def dead $lr, implicit $rm, implicit $r3, implicit $r4, implicit $r5, implicit $r6, implicit $r7, implicit $r8, implicit $r9, implicit $r10, implicit $r2, implicit-def $r1 ; 32BIT-NEXT: ADJCALLSTACKUP 60, 0, implicit-def dead $r1, implicit $r1 ; 32BIT-NEXT: BLR implicit $lr, implicit $rm @@ -1350,7 +1358,7 @@ define void @call_test_i1_stack() { ; 64BIT-NEXT: $x8 = LI8 6 ; 64BIT-NEXT: $x9 = LI8 7 ; 64BIT-NEXT: $x10 = LI8 8 - ; 64BIT-NEXT: STD killed renamable $x11, 112, $x1 :: (store (s64)) + ; 64BIT-NEXT: STD killed renamable $x11, 112, $x1 :: (store (s64) into stack + 112, align 16) ; 64BIT-NEXT: BL8_NOP , csr_ppc64, implicit-def dead $lr8, implicit $rm, implicit $x3, implicit $x4, implicit $x5, implicit $x6, implicit $x7, implicit $x8, implicit $x9, implicit $x10, implicit $x2, implicit-def $r1 ; 64BIT-NEXT: ADJCALLSTACKUP 120, 0, implicit-def dead $r1, implicit $r1 ; 64BIT-NEXT: BLR8 implicit $lr8, implicit $rm @@ -1441,88 +1449,92 @@ define void @caller_fpr_stack() { ; 32BIT-NEXT: renamable $r3 = LWZtoc @d15, $r2 :: (load (s32) from got) ; 32BIT-NEXT: renamable $r4 = LWZtoc @f14, $r2 :: (load (s32) from got) ; 32BIT-NEXT: renamable $f0 = LFD 0, killed renamable $r3 :: (dereferenceable load (s64) from @d15) - ; 32BIT-NEXT: renamable $r5 = LWZtoc @f16, $r2 :: (load (s32) from got) - ; 32BIT-NEXT: renamable $r3 = LWZ 0, killed renamable $r4 :: (dereferenceable load (s32) from @f14) - ; 32BIT-NEXT: renamable $r4 = LWZ 0, killed renamable $r5 :: (dereferenceable load (s32) from @f16) + ; 32BIT-NEXT: renamable $r3 = LWZtoc @f16, $r2 :: (load (s32) from got) + ; 32BIT-NEXT: renamable $r4 = LWZ 0, killed renamable $r4 :: (dereferenceable load (s32) from @f14) + ; 32BIT-NEXT: renamable $r3 = LWZ 0, killed renamable $r3 :: (dereferenceable load (s32) from @f16) ; 32BIT-NEXT: ADJCALLSTACKDOWN 144, 0, implicit-def dead $r1, implicit $r1 + ; 32BIT-NEXT: STFD killed renamable $f0, 0, %stack.0 :: (store (s64) into %stack.0) ; 32BIT-NEXT: renamable $r5 = LI 0 ; 32BIT-NEXT: renamable $r6 = LIS 16352 - ; 32BIT-NEXT: STW killed renamable $r5, 60, $r1 :: (store (s32) into unknown-address + 4, basealign 8) - ; 32BIT-NEXT: renamable $r5 = LIS 13107 - ; 32BIT-NEXT: STW killed renamable $r6, 56, $r1 :: (store (s32), align 8) - ; 32BIT-NEXT: renamable $r6 = LIS 16355 - ; 32BIT-NEXT: renamable $r5 = ORI killed renamable $r5, 13107 - ; 32BIT-NEXT: STW killed renamable $r5, 68, $r1 :: (store (s32) into unknown-address + 4, basealign 8) + ; 32BIT-NEXT: STW killed renamable $r3, 140, $r1 :: (store (s32) into stack + 140, basealign 16) + ; 32BIT-NEXT: renamable $r3 = LIS 13107 + ; 32BIT-NEXT: STW killed renamable $r4, 128, $r1 :: (store (s32) into stack + 128, align 16) + ; 32BIT-NEXT: renamable $r4 = LIS 16355 + ; 32BIT-NEXT: STW killed renamable $r5, 60, $r1 :: (store (s32) into stack + 60, basealign 16) ; 32BIT-NEXT: renamable $r5 = LIS 26214 - ; 32BIT-NEXT: renamable $r6 = ORI killed renamable $r6, 13107 - ; 32BIT-NEXT: STW killed renamable $r6, 64, $r1 :: (store (s32), align 8) + ; 32BIT-NEXT: STW killed renamable $r6, 56, $r1 :: (store (s32) into stack + 56, align 8, basealign 16) ; 32BIT-NEXT: renamable $r6 = LIS 16358 + ; 32BIT-NEXT: renamable $r3 = ORI killed renamable $r3, 13107 + ; 32BIT-NEXT: STW killed renamable $r3, 68, $r1 :: (store (s32) into stack + 68, basealign 16) + ; 32BIT-NEXT: renamable $r3 = LIS 39321 + ; 32BIT-NEXT: renamable $r4 = ORI killed renamable $r4, 13107 + ; 32BIT-NEXT: STW killed renamable $r4, 64, $r1 :: (store (s32) into stack + 64, align 16) + ; 32BIT-NEXT: renamable $r4 = LIS 16361 ; 32BIT-NEXT: renamable $r5 = ORI killed renamable $r5, 26214 - ; 32BIT-NEXT: STW killed renamable $r5, 76, $r1 :: (store (s32) into unknown-address + 4, basealign 8) - ; 32BIT-NEXT: renamable $r5 = LIS 39321 + ; 32BIT-NEXT: STW killed renamable $r5, 76, $r1 :: (store (s32) into stack + 76, basealign 16) + ; 32BIT-NEXT: renamable $r5 = LIS 52428 ; 32BIT-NEXT: renamable $r6 = ORI killed renamable $r6, 26214 - ; 32BIT-NEXT: STW killed renamable $r6, 72, $r1 :: (store (s32), align 8) - ; 32BIT-NEXT: renamable $r6 = LIS 16361 - ; 32BIT-NEXT: renamable $r6 = ORI killed renamable $r6, 39321 - ; 32BIT-NEXT: STW killed renamable $r6, 80, $r1 :: (store (s32), align 8) - ; 32BIT-NEXT: renamable $r6 = LIS 52428 - ; 32BIT-NEXT: renamable $r6 = ORI killed renamable $r6, 52429 - ; 32BIT-NEXT: STW killed renamable $r6, 92, $r1 :: (store (s32) into unknown-address + 4, basealign 8) + ; 32BIT-NEXT: STW killed renamable $r6, 72, $r1 :: (store (s32) into stack + 72, align 8, basealign 16) ; 32BIT-NEXT: renamable $r6 = LIS 16364 - ; 32BIT-NEXT: renamable $r5 = ORI killed renamable $r5, 39322 - ; 32BIT-NEXT: STW renamable $r5, 84, $r1 :: (store (s32) into unknown-address + 4, basealign 8) - ; 32BIT-NEXT: renamable $r6 = ORI killed renamable $r6, 52428 - ; 32BIT-NEXT: STW killed renamable $r6, 88, $r1 :: (store (s32), align 8) - ; 32BIT-NEXT: renamable $r6 = LIS 16313 - ; 32BIT-NEXT: STW killed renamable $r5, 100, $r1 :: (store (s32) into unknown-address + 4, basealign 8) + ; 32BIT-NEXT: renamable $r4 = ORI killed renamable $r4, 39321 + ; 32BIT-NEXT: STW killed renamable $r4, 80, $r1 :: (store (s32) into stack + 80, align 16) + ; 32BIT-NEXT: renamable $r4 = LIS 16313 + ; 32BIT-NEXT: renamable $r5 = ORI killed renamable $r5, 52429 + ; 32BIT-NEXT: STW killed renamable $r5, 92, $r1 :: (store (s32) into stack + 92, basealign 16) ; 32BIT-NEXT: renamable $r5 = LIS 49807 - ; 32BIT-NEXT: renamable $r6 = ORI killed renamable $r6, 39321 - ; 32BIT-NEXT: STW killed renamable $r6, 96, $r1 :: (store (s32), align 8) + ; 32BIT-NEXT: renamable $r3 = ORI killed renamable $r3, 39322 + ; 32BIT-NEXT: STW renamable $r3, 84, $r1 :: (store (s32) into stack + 84, basealign 16) + ; 32BIT-NEXT: renamable $r6 = ORI killed renamable $r6, 52428 + ; 32BIT-NEXT: STW killed renamable $r6, 88, $r1 :: (store (s32) into stack + 88, align 8, basealign 16) ; 32BIT-NEXT: renamable $r6 = LIS 16316 + ; 32BIT-NEXT: STW killed renamable $r3, 100, $r1 :: (store (s32) into stack + 100, basealign 16) + ; 32BIT-NEXT: renamable $r3 = LIS 60293 + ; 32BIT-NEXT: renamable $r4 = ORI killed renamable $r4, 39321 + ; 32BIT-NEXT: STW killed renamable $r4, 96, $r1 :: (store (s32) into stack + 96, align 16) + ; 32BIT-NEXT: renamable $r4 = LIS 16318 ; 32BIT-NEXT: renamable $r5 = ORI killed renamable $r5, 23593 - ; 32BIT-NEXT: STW killed renamable $r5, 108, $r1 :: (store (s32) into unknown-address + 4, basealign 8) - ; 32BIT-NEXT: renamable $r5 = LIS 60293 - ; 32BIT-NEXT: renamable $r6 = ORI killed renamable $r6, 10485 - ; 32BIT-NEXT: STW killed renamable $r6, 104, $r1 :: (store (s32), align 8) - ; 32BIT-NEXT: renamable $r6 = LIS 16318 - ; 32BIT-NEXT: renamable $r5 = ORI killed renamable $r5, 7864 - ; 32BIT-NEXT: STW killed renamable $r5, 116, $r1 :: (store (s32) into unknown-address + 4, basealign 8) + ; 32BIT-NEXT: STW killed renamable $r5, 108, $r1 :: (store (s32) into stack + 108, basealign 16) ; 32BIT-NEXT: renamable $r5 = LIS 2621 - ; 32BIT-NEXT: renamable $r6 = ORI killed renamable $r6, 47185 - ; 32BIT-NEXT: STW killed renamable $r6, 112, $r1 :: (store (s32), align 8) + ; 32BIT-NEXT: renamable $r6 = ORI killed renamable $r6, 10485 + ; 32BIT-NEXT: STW killed renamable $r6, 104, $r1 :: (store (s32) into stack + 104, align 8, basealign 16) ; 32BIT-NEXT: renamable $r6 = LIS 16320 - ; 32BIT-NEXT: renamable $r5 = ORI killed renamable $r5, 28836 - ; 32BIT-NEXT: STW killed renamable $r5, 124, $r1 :: (store (s32) into unknown-address + 4, basealign 8) - ; 32BIT-NEXT: renamable $r5 = LWZtoc %const.0, $r2 :: (load (s32) from got) - ; 32BIT-NEXT: renamable $r6 = ORI killed renamable $r6, 41943 - ; 32BIT-NEXT: STW killed renamable $r6, 120, $r1 :: (store (s32), align 8) - ; 32BIT-NEXT: renamable $r6 = LWZtoc %const.1, $r2 :: (load (s32) from got) - ; 32BIT-NEXT: renamable $f2 = LFD 0, killed renamable $r5 :: (load (s64) from constant-pool) - ; 32BIT-NEXT: renamable $r5 = LWZtoc %const.2, $r2 :: (load (s32) from got) - ; 32BIT-NEXT: renamable $f3 = LFD 0, killed renamable $r6 :: (load (s64) from constant-pool) - ; 32BIT-NEXT: renamable $r6 = LWZtoc %const.3, $r2 :: (load (s32) from got) - ; 32BIT-NEXT: renamable $f4 = LFD 0, killed renamable $r5 :: (load (s64) from constant-pool) - ; 32BIT-NEXT: renamable $r5 = LWZtoc %const.4, $r2 :: (load (s32) from got) - ; 32BIT-NEXT: renamable $f6 = LFD 0, killed renamable $r6 :: (load (s64) from constant-pool) + ; 32BIT-NEXT: renamable $r3 = ORI killed renamable $r3, 7864 + ; 32BIT-NEXT: STW killed renamable $r3, 116, $r1 :: (store (s32) into stack + 116, basealign 16) + ; 32BIT-NEXT: renamable $r3 = LWZtoc %const.0, $r2 :: (load (s32) from got) + ; 32BIT-NEXT: renamable $r4 = ORI killed renamable $r4, 47185 + ; 32BIT-NEXT: STW killed renamable $r4, 112, $r1 :: (store (s32) into stack + 112, align 16) + ; 32BIT-NEXT: renamable $r4 = ORI killed renamable $r5, 28836 + ; 32BIT-NEXT: STW killed renamable $r4, 124, $r1 :: (store (s32) into stack + 124, basealign 16) + ; 32BIT-NEXT: renamable $r4 = ORI killed renamable $r6, 41943 + ; 32BIT-NEXT: STW killed renamable $r4, 120, $r1 :: (store (s32) into stack + 120, align 8, basealign 16) + ; 32BIT-NEXT: renamable $r4 = LWZtoc %const.1, $r2 :: (load (s32) from got) + ; 32BIT-NEXT: renamable $r5 = LWZ 4, %stack.0 :: (load (s32) from %stack.0 + 4) + ; 32BIT-NEXT: renamable $r6 = LWZtoc %const.2, $r2 :: (load (s32) from got) + ; 32BIT-NEXT: renamable $f2 = LFD 0, killed renamable $r3 :: (load (s64) from constant-pool) + ; 32BIT-NEXT: renamable $r3 = LWZtoc %const.3, $r2 :: (load (s32) from got) + ; 32BIT-NEXT: renamable $f3 = LFD 0, killed renamable $r4 :: (load (s64) from constant-pool) + ; 32BIT-NEXT: renamable $r4 = LWZtoc %const.4, $r2 :: (load (s32) from got) + ; 32BIT-NEXT: renamable $f4 = LFD 0, killed renamable $r6 :: (load (s64) from constant-pool) ; 32BIT-NEXT: renamable $r6 = LWZtoc %const.5, $r2 :: (load (s32) from got) - ; 32BIT-NEXT: renamable $f7 = LFD 0, killed renamable $r5 :: (load (s64) from constant-pool) - ; 32BIT-NEXT: renamable $r5 = LWZtoc %const.6, $r2 :: (load (s32) from got) + ; 32BIT-NEXT: renamable $f6 = LFD 0, killed renamable $r3 :: (load (s64) from constant-pool) + ; 32BIT-NEXT: renamable $r3 = LWZtoc %const.6, $r2 :: (load (s32) from got) + ; 32BIT-NEXT: renamable $f7 = LFD 0, killed renamable $r4 :: (load (s64) from constant-pool) + ; 32BIT-NEXT: renamable $r4 = LWZtoc %const.7, $r2 :: (load (s32) from got) ; 32BIT-NEXT: renamable $f8 = LFD 0, killed renamable $r6 :: (load (s64) from constant-pool) - ; 32BIT-NEXT: renamable $r6 = LWZtoc %const.7, $r2 :: (load (s32) from got) - ; 32BIT-NEXT: renamable $f9 = LFD 0, killed renamable $r5 :: (load (s64) from constant-pool) - ; 32BIT-NEXT: renamable $r5 = LWZtoc %const.8, $r2 :: (load (s32) from got) - ; 32BIT-NEXT: renamable $f1 = LFD 0, killed renamable $r6 :: (load (s64) from constant-pool) - ; 32BIT-NEXT: renamable $r6 = LWZtoc %const.9, $r2 :: (load (s32) from got) - ; 32BIT-NEXT: renamable $f11 = LFD 0, killed renamable $r5 :: (load (s64) from constant-pool) - ; 32BIT-NEXT: renamable $r5 = LWZtoc %const.10, $r2 :: (load (s32) from got) - ; 32BIT-NEXT: renamable $f12 = LFD 0, killed renamable $r6 :: (load (s64) from constant-pool) + ; 32BIT-NEXT: renamable $r6 = LWZtoc %const.8, $r2 :: (load (s32) from got) + ; 32BIT-NEXT: renamable $f9 = LFD 0, killed renamable $r3 :: (load (s64) from constant-pool) + ; 32BIT-NEXT: renamable $r3 = LWZtoc %const.9, $r2 :: (load (s32) from got) + ; 32BIT-NEXT: renamable $f1 = LFD 0, killed renamable $r4 :: (load (s64) from constant-pool) + ; 32BIT-NEXT: renamable $r4 = LWZtoc %const.10, $r2 :: (load (s32) from got) + ; 32BIT-NEXT: renamable $f11 = LFD 0, killed renamable $r6 :: (load (s64) from constant-pool) ; 32BIT-NEXT: renamable $r6 = LWZtoc %const.11, $r2 :: (load (s32) from got) - ; 32BIT-NEXT: renamable $f13 = LFD 0, killed renamable $r5 :: (load (s64) from constant-pool) + ; 32BIT-NEXT: renamable $f12 = LFD 0, killed renamable $r3 :: (load (s64) from constant-pool) + ; 32BIT-NEXT: renamable $f13 = LFD 0, killed renamable $r4 :: (load (s64) from constant-pool) ; 32BIT-NEXT: renamable $f5 = LFS 0, killed renamable $r6 :: (load (s32) from constant-pool) - ; 32BIT-NEXT: STW killed renamable $r4, 140, $r1 :: (store (s32)) - ; 32BIT-NEXT: STFD killed renamable $f0, 132, $r1 :: (store (s64)) + ; 32BIT-NEXT: STW killed renamable $r5, 136, $r1 :: (store (s32) into stack + 136, align 8, basealign 16) + ; 32BIT-NEXT: renamable $r3 = LWZ 0, %stack.0 :: (load (s32) from %stack.0, align 8) ; 32BIT-NEXT: $f10 = COPY renamable $f1 - ; 32BIT-NEXT: STW killed renamable $r3, 128, $r1 :: (store (s32)) + ; 32BIT-NEXT: STW killed renamable $r3, 132, $r1 :: (store (s32) into stack + 132, basealign 16) ; 32BIT-NEXT: BL_NOP , csr_aix32, implicit-def dead $lr, implicit $rm, implicit $f1, implicit $f2, implicit $f3, implicit $f4, implicit $f5, implicit $f6, implicit $f7, implicit $f8, implicit $f9, implicit killed $f10, implicit $f11, implicit $f12, implicit $f13, implicit $r2, implicit-def $r1, implicit-def dead $f1 ; 32BIT-NEXT: ADJCALLSTACKUP 144, 0, implicit-def dead $r1, implicit $r1 ; 32BIT-NEXT: BLR implicit $lr, implicit $rm @@ -1537,7 +1549,7 @@ define void @caller_fpr_stack() { ; 64BIT-NEXT: renamable $r5 = LWZ 0, killed renamable $x5 :: (dereferenceable load (s32) from @f16) ; 64BIT-NEXT: ADJCALLSTACKDOWN 176, 0, implicit-def dead $r1, implicit $r1 ; 64BIT-NEXT: renamable $x6 = LDtocCPT %const.0, $x2 :: (load (s64) from got) - ; 64BIT-NEXT: STW killed renamable $r5, 168, $x1 :: (store (s32)) + ; 64BIT-NEXT: STW killed renamable $r5, 168, $x1 :: (store (s32) into stack + 168, align 8, basealign 16) ; 64BIT-NEXT: renamable $x5 = LDtocCPT %const.1, $x2 :: (load (s64) from got) ; 64BIT-NEXT: renamable $x7 = LDtocCPT %const.2, $x2 :: (load (s64) from got) ; 64BIT-NEXT: renamable $f2 = LFD 0, killed renamable $x6 :: (load (s64) from constant-pool) @@ -1549,7 +1561,7 @@ define void @caller_fpr_stack() { ; 64BIT-NEXT: renamable $f6 = LFD 0, killed renamable $x6 :: (load (s64) from constant-pool) ; 64BIT-NEXT: renamable $x6 = LDtocCPT %const.6, $x2 :: (load (s64) from got) ; 64BIT-NEXT: renamable $f7 = LFD 0, killed renamable $x5 :: (load (s64) from constant-pool) - ; 64BIT-NEXT: STD killed renamable $x4, 160, $x1 :: (store (s64)) + ; 64BIT-NEXT: STD killed renamable $x4, 160, $x1 :: (store (s64) into stack + 160, align 16) ; 64BIT-NEXT: renamable $x4 = LDtocCPT %const.7, $x2 :: (load (s64) from got) ; 64BIT-NEXT: renamable $f8 = LFD 0, killed renamable $x7 :: (load (s64) from constant-pool) ; 64BIT-NEXT: renamable $x5 = LIS8 16320 @@ -1588,12 +1600,12 @@ define void @caller_fpr_stack() { ; 64BIT-NEXT: renamable $x8 = ORIS8 killed renamable $x8, 52428 ; 64BIT-NEXT: renamable $x8 = ORI8 killed renamable $x8, 52429 ; 64BIT-NEXT: $f10 = COPY renamable $f1 - ; 64BIT-NEXT: STW killed renamable $r3, 152, $x1 :: (store (s32)) - ; 64BIT-NEXT: STD killed renamable $x5, 144, $x1 :: (store (s64)) - ; 64BIT-NEXT: STD killed renamable $x6, 136, $x1 :: (store (s64)) - ; 64BIT-NEXT: STD killed renamable $x4, 128, $x1 :: (store (s64)) - ; 64BIT-NEXT: STD killed renamable $x7, 120, $x1 :: (store (s64)) - ; 64BIT-NEXT: STD killed renamable $x8, 112, $x1 :: (store (s64)) + ; 64BIT-NEXT: STW killed renamable $r3, 152, $x1 :: (store (s32) into stack + 152, align 8, basealign 16) + ; 64BIT-NEXT: STD killed renamable $x5, 144, $x1 :: (store (s64) into stack + 144, align 16) + ; 64BIT-NEXT: STD killed renamable $x6, 136, $x1 :: (store (s64) into stack + 136, basealign 16) + ; 64BIT-NEXT: STD killed renamable $x4, 128, $x1 :: (store (s64) into stack + 128, align 16) + ; 64BIT-NEXT: STD killed renamable $x7, 120, $x1 :: (store (s64) into stack + 120, basealign 16) + ; 64BIT-NEXT: STD killed renamable $x8, 112, $x1 :: (store (s64) into stack + 112, align 16) ; 64BIT-NEXT: BL8_NOP , csr_ppc64, implicit-def dead $lr8, implicit $rm, implicit $f1, implicit $f2, implicit $f3, implicit $f4, implicit $f5, implicit $f6, implicit $f7, implicit $f8, implicit $f9, implicit killed $f10, implicit $f11, implicit $f12, implicit $f13, implicit $x2, implicit-def $r1, implicit-def dead $f1 ; 64BIT-NEXT: ADJCALLSTACKUP 176, 0, implicit-def dead $r1, implicit $r1 ; 64BIT-NEXT: BLR8 implicit $lr8, implicit $rm @@ -1688,16 +1700,16 @@ define void @caller_mix() { ; 32BIT: bb.0.entry: ; 32BIT-NEXT: ADJCALLSTACKDOWN 84, 0, implicit-def dead $r1, implicit $r1 ; 32BIT-NEXT: renamable $r3 = LI 60 - ; 32BIT-NEXT: STW killed renamable $r3, 80, $r1 :: (store (s32)) + ; 32BIT-NEXT: STW killed renamable $r3, 80, $r1 :: (store (s32) into stack + 80, align 16) ; 32BIT-NEXT: renamable $r3 = LI 50 - ; 32BIT-NEXT: STW killed renamable $r3, 76, $r1 :: (store (s32)) + ; 32BIT-NEXT: STW killed renamable $r3, 76, $r1 :: (store (s32) into stack + 76, basealign 16) ; 32BIT-NEXT: renamable $r3 = LI 40 - ; 32BIT-NEXT: STW killed renamable $r3, 72, $r1 :: (store (s32)) + ; 32BIT-NEXT: STW killed renamable $r3, 72, $r1 :: (store (s32) into stack + 72, align 8, basealign 16) ; 32BIT-NEXT: renamable $r3 = LI 0 ; 32BIT-NEXT: renamable $r4 = LWZtoc %const.0, $r2 :: (load (s32) from got) - ; 32BIT-NEXT: STW killed renamable $r3, 64, $r1 :: (store (s32)) + ; 32BIT-NEXT: STW killed renamable $r3, 64, $r1 :: (store (s32) into stack + 64, align 16) ; 32BIT-NEXT: renamable $r3 = LI 2 - ; 32BIT-NEXT: STW killed renamable $r3, 60, $r1 :: (store (s32)) + ; 32BIT-NEXT: STW killed renamable $r3, 60, $r1 :: (store (s32) into stack + 60, basealign 16) ; 32BIT-NEXT: renamable $r3 = LWZtoc %const.1, $r2 :: (load (s32) from got) ; 32BIT-NEXT: renamable $f1 = LFD 0, killed renamable $r4 :: (load (s64) from constant-pool) ; 32BIT-NEXT: renamable $r4 = LWZtoc %const.2, $r2 :: (load (s32) from got) @@ -1706,10 +1718,10 @@ define void @caller_mix() { ; 32BIT-NEXT: renamable $f3 = LFD 0, killed renamable $r4 :: (load (s64) from constant-pool) ; 32BIT-NEXT: renamable $f4 = LFD 0, killed renamable $r3 :: (load (s64) from constant-pool) ; 32BIT-NEXT: renamable $r3 = LI 1 - ; 32BIT-NEXT: STW killed renamable $r3, 56, $r1 :: (store (s32)) + ; 32BIT-NEXT: STW killed renamable $r3, 56, $r1 :: (store (s32) into stack + 56, align 8, basealign 16) ; 32BIT-NEXT: renamable $r3 = LIS 457 ; 32BIT-NEXT: renamable $r3 = ORI killed renamable $r3, 50048 - ; 32BIT-NEXT: STW killed renamable $r3, 68, $r1 :: (store (s32)) + ; 32BIT-NEXT: STW killed renamable $r3, 68, $r1 :: (store (s32) into stack + 68, basealign 16) ; 32BIT-NEXT: BL_NOP , csr_aix32, implicit-def dead $lr, implicit $rm, implicit $f1, implicit $f2, implicit $f3, implicit $f4, implicit $r2, implicit-def $r1, implicit-def dead $r3 ; 32BIT-NEXT: ADJCALLSTACKUP 84, 0, implicit-def dead $r1, implicit $r1 ; 32BIT-NEXT: BLR implicit $lr, implicit $rm @@ -1732,8 +1744,8 @@ define void @caller_mix() { ; 64BIT-NEXT: $x7 = LI8 1 ; 64BIT-NEXT: $x8 = LI8 2 ; 64BIT-NEXT: $x10 = LI8 40 - ; 64BIT-NEXT: STD killed renamable $x4, 120, $x1 :: (store (s64)) - ; 64BIT-NEXT: STD killed renamable $x5, 112, $x1 :: (store (s64)) + ; 64BIT-NEXT: STD killed renamable $x4, 120, $x1 :: (store (s64) into stack + 120, basealign 16) + ; 64BIT-NEXT: STD killed renamable $x5, 112, $x1 :: (store (s64) into stack + 112, align 16) ; 64BIT-NEXT: BL8_NOP , csr_ppc64, implicit-def dead $lr8, implicit $rm, implicit $f1, implicit $f2, implicit $f3, implicit $f4, implicit killed $x7, implicit killed $x8, implicit $x9, implicit killed $x10, implicit $x2, implicit-def $r1, implicit-def dead $x3 ; 64BIT-NEXT: ADJCALLSTACKUP 128, 0, implicit-def dead $r1, implicit $r1 ; 64BIT-NEXT: BLR8 implicit $lr8, implicit $rm @@ -1855,60 +1867,60 @@ define void @caller_mix() { ; 32BIT-NEXT: renamable $r8 = LIS 16329 ; 32BIT-NEXT: renamable $r9 = LIS 13107 ; 32BIT-NEXT: renamable $r10 = LIS 16339 - ; 32BIT-NEXT: STW renamable $r3, 92, $r1 :: (store (s32) into unknown-address + 4, basealign 8) + ; 32BIT-NEXT: STW renamable $r3, 92, $r1 :: (store (s32) into stack + 92, basealign 16) ; 32BIT-NEXT: renamable $r11 = LIS 16345 - ; 32BIT-NEXT: STW killed renamable $r4, 88, $r1 :: (store (s32), align 8) + ; 32BIT-NEXT: STW killed renamable $r4, 88, $r1 :: (store (s32) into stack + 88, align 8, basealign 16) ; 32BIT-NEXT: renamable $r4 = LIS 16355 - ; 32BIT-NEXT: STW killed renamable $r3, 132, $r1 :: (store (s32) into unknown-address + 4, basealign 8) + ; 32BIT-NEXT: STW killed renamable $r3, 132, $r1 :: (store (s32) into stack + 132, basealign 16) ; 32BIT-NEXT: renamable $r3 = LIS 26214 - ; 32BIT-NEXT: STW killed renamable $r5, 128, $r1 :: (store (s32), align 8) + ; 32BIT-NEXT: STW killed renamable $r5, 128, $r1 :: (store (s32) into stack + 128, align 16) ; 32BIT-NEXT: renamable $r5 = ORI killed renamable $r6, 39322 - ; 32BIT-NEXT: STW renamable $r5, 60, $r1 :: (store (s32) into unknown-address + 4, basealign 8) + ; 32BIT-NEXT: STW renamable $r5, 60, $r1 :: (store (s32) into stack + 60, basealign 16) ; 32BIT-NEXT: renamable $r6 = ORI killed renamable $r7, 39321 - ; 32BIT-NEXT: STW killed renamable $r6, 56, $r1 :: (store (s32), align 8) + ; 32BIT-NEXT: STW killed renamable $r6, 56, $r1 :: (store (s32) into stack + 56, align 8, basealign 16) ; 32BIT-NEXT: renamable $r6 = LIS 16358 - ; 32BIT-NEXT: STW renamable $r5, 68, $r1 :: (store (s32) into unknown-address + 4, basealign 8) + ; 32BIT-NEXT: STW renamable $r5, 68, $r1 :: (store (s32) into stack + 68, basealign 16) ; 32BIT-NEXT: renamable $r7 = ORI killed renamable $r8, 39321 - ; 32BIT-NEXT: STW killed renamable $r7, 64, $r1 :: (store (s32), align 8) + ; 32BIT-NEXT: STW killed renamable $r7, 64, $r1 :: (store (s32) into stack + 64, align 16) ; 32BIT-NEXT: renamable $r7 = ORI killed renamable $r9, 13107 - ; 32BIT-NEXT: STW renamable $r7, 76, $r1 :: (store (s32) into unknown-address + 4, basealign 8) + ; 32BIT-NEXT: STW renamable $r7, 76, $r1 :: (store (s32) into stack + 76, basealign 16) ; 32BIT-NEXT: renamable $r8 = ORI killed renamable $r10, 13107 - ; 32BIT-NEXT: STW killed renamable $r8, 72, $r1 :: (store (s32), align 8) + ; 32BIT-NEXT: STW killed renamable $r8, 72, $r1 :: (store (s32) into stack + 72, align 8, basealign 16) ; 32BIT-NEXT: renamable $r8 = LIS 16361 - ; 32BIT-NEXT: STW renamable $r5, 84, $r1 :: (store (s32) into unknown-address + 4, basealign 8) + ; 32BIT-NEXT: STW renamable $r5, 84, $r1 :: (store (s32) into stack + 84, basealign 16) ; 32BIT-NEXT: renamable $r9 = ORI killed renamable $r11, 39321 - ; 32BIT-NEXT: STW killed renamable $r9, 80, $r1 :: (store (s32), align 8) + ; 32BIT-NEXT: STW killed renamable $r9, 80, $r1 :: (store (s32) into stack + 80, align 16) ; 32BIT-NEXT: renamable $r9 = LIS 52428 - ; 32BIT-NEXT: STW renamable $r7, 100, $r1 :: (store (s32) into unknown-address + 4, basealign 8) + ; 32BIT-NEXT: STW renamable $r7, 100, $r1 :: (store (s32) into stack + 100, basealign 16) ; 32BIT-NEXT: renamable $r4 = ORI killed renamable $r4, 13107 - ; 32BIT-NEXT: STW killed renamable $r4, 96, $r1 :: (store (s32), align 8) + ; 32BIT-NEXT: STW killed renamable $r4, 96, $r1 :: (store (s32) into stack + 96, align 16) ; 32BIT-NEXT: renamable $r3 = ORI killed renamable $r3, 26214 - ; 32BIT-NEXT: STW renamable $r3, 108, $r1 :: (store (s32) into unknown-address + 4, basealign 8) + ; 32BIT-NEXT: STW renamable $r3, 108, $r1 :: (store (s32) into stack + 108, basealign 16) ; 32BIT-NEXT: renamable $r4 = ORI killed renamable $r6, 26214 - ; 32BIT-NEXT: STW killed renamable $r4, 104, $r1 :: (store (s32), align 8) + ; 32BIT-NEXT: STW killed renamable $r4, 104, $r1 :: (store (s32) into stack + 104, align 8, basealign 16) ; 32BIT-NEXT: renamable $r4 = LIS 16364 - ; 32BIT-NEXT: STW renamable $r5, 116, $r1 :: (store (s32) into unknown-address + 4, basealign 8) + ; 32BIT-NEXT: STW renamable $r5, 116, $r1 :: (store (s32) into stack + 116, basealign 16) ; 32BIT-NEXT: renamable $r6 = ORI killed renamable $r8, 39321 - ; 32BIT-NEXT: STW killed renamable $r6, 112, $r1 :: (store (s32), align 8) + ; 32BIT-NEXT: STW killed renamable $r6, 112, $r1 :: (store (s32) into stack + 112, align 16) ; 32BIT-NEXT: renamable $r6 = ORI killed renamable $r9, 52429 - ; 32BIT-NEXT: STW renamable $r6, 124, $r1 :: (store (s32) into unknown-address + 4, basealign 8) + ; 32BIT-NEXT: STW renamable $r6, 124, $r1 :: (store (s32) into stack + 124, basealign 16) ; 32BIT-NEXT: renamable $r4 = ORI killed renamable $r4, 52428 - ; 32BIT-NEXT: STW killed renamable $r4, 120, $r1 :: (store (s32), align 8) + ; 32BIT-NEXT: STW killed renamable $r4, 120, $r1 :: (store (s32) into stack + 120, align 8, basealign 16) ; 32BIT-NEXT: renamable $r4 = LIS 16369 - ; 32BIT-NEXT: STW killed renamable $r5, 140, $r1 :: (store (s32) into unknown-address + 4, basealign 8) + ; 32BIT-NEXT: STW killed renamable $r5, 140, $r1 :: (store (s32) into stack + 140, basealign 16) ; 32BIT-NEXT: renamable $r4 = ORI killed renamable $r4, 39321 - ; 32BIT-NEXT: STW killed renamable $r4, 136, $r1 :: (store (s32), align 8) + ; 32BIT-NEXT: STW killed renamable $r4, 136, $r1 :: (store (s32) into stack + 136, align 8, basealign 16) ; 32BIT-NEXT: renamable $r4 = LIS 16371 - ; 32BIT-NEXT: STW killed renamable $r7, 148, $r1 :: (store (s32) into unknown-address + 4, basealign 8) + ; 32BIT-NEXT: STW killed renamable $r7, 148, $r1 :: (store (s32) into stack + 148, basealign 16) ; 32BIT-NEXT: renamable $r4 = ORI killed renamable $r4, 13107 - ; 32BIT-NEXT: STW killed renamable $r4, 144, $r1 :: (store (s32), align 8) + ; 32BIT-NEXT: STW killed renamable $r4, 144, $r1 :: (store (s32) into stack + 144, align 16) ; 32BIT-NEXT: renamable $r4 = LIS 16372 ; 32BIT-NEXT: renamable $r5 = LWZtoc %const.0, $r2 :: (load (s32) from got) - ; 32BIT-NEXT: STW killed renamable $r6, 156, $r1 :: (store (s32) into unknown-address + 4, basealign 8) + ; 32BIT-NEXT: STW killed renamable $r6, 156, $r1 :: (store (s32) into stack + 156, basealign 16) ; 32BIT-NEXT: renamable $r4 = ORI killed renamable $r4, 52428 - ; 32BIT-NEXT: STW killed renamable $r4, 152, $r1 :: (store (s32), align 8) + ; 32BIT-NEXT: STW killed renamable $r4, 152, $r1 :: (store (s32) into stack + 152, align 8, basealign 16) ; 32BIT-NEXT: renamable $r4 = LWZtoc %const.1, $r2 :: (load (s32) from got) - ; 32BIT-NEXT: STW killed renamable $r3, 164, $r1 :: (store (s32) into unknown-address + 4, basealign 8) + ; 32BIT-NEXT: STW killed renamable $r3, 164, $r1 :: (store (s32) into stack + 164, basealign 16) ; 32BIT-NEXT: renamable $r3 = LWZtoc %const.2, $r2 :: (load (s32) from got) ; 32BIT-NEXT: renamable $f1 = LFD 0, killed renamable $r5 :: (load (s64) from constant-pool) ; 32BIT-NEXT: renamable $r5 = LWZtoc %const.3, $r2 :: (load (s32) from got) @@ -1943,7 +1955,7 @@ define void @caller_mix() { ; 32BIT-NEXT: $r8 = LI 6 ; 32BIT-NEXT: $r9 = LI 7 ; 32BIT-NEXT: $r10 = LI 8 - ; 32BIT-NEXT: STW killed renamable $r11, 160, $r1 :: (store (s32), align 8) + ; 32BIT-NEXT: STW killed renamable $r11, 160, $r1 :: (store (s32) into stack + 160, align 16) ; 32BIT-NEXT: BL_NOP , csr_aix32, implicit-def dead $lr, implicit $rm, implicit $r3, implicit $r4, implicit $r5, implicit $r6, implicit $r7, implicit $r8, implicit $r9, implicit $r10, implicit $f1, implicit $f2, implicit $f3, implicit $f4, implicit $f5, implicit $f6, implicit $f7, implicit $f8, implicit $f9, implicit $f10, implicit $f11, implicit $f12, implicit $f13, implicit $r2, implicit-def $r1, implicit-def dead $r3 ; 32BIT-NEXT: ADJCALLSTACKUP 168, 0, implicit-def dead $r1, implicit $r1 ; 32BIT-NEXT: BLR implicit $lr, implicit $rm @@ -2044,20 +2056,20 @@ define void @caller_mix() { ; 64BIT-NEXT: $x8 = LI8 6 ; 64BIT-NEXT: $x9 = LI8 7 ; 64BIT-NEXT: $x10 = LI8 8 - ; 64BIT-NEXT: STD killed renamable $x29, 184, $x1 :: (store (s64)) - ; 64BIT-NEXT: STD killed renamable $x28, 144, $x1 :: (store (s64)) - ; 64BIT-NEXT: STD killed renamable $x11, 216, $x1 :: (store (s64)) - ; 64BIT-NEXT: STD killed renamable $x12, 200, $x1 :: (store (s64)) - ; 64BIT-NEXT: STD killed renamable $x0, 160, $x1 :: (store (s64)) - ; 64BIT-NEXT: STD killed renamable $x31, 152, $x1 :: (store (s64)) - ; 64BIT-NEXT: STD killed renamable $x30, 128, $x1 :: (store (s64)) - ; 64BIT-NEXT: STD killed renamable $x27, 208, $x1 :: (store (s64)) - ; 64BIT-NEXT: STD killed renamable $x25, 192, $x1 :: (store (s64)) - ; 64BIT-NEXT: STD killed renamable $x24, 176, $x1 :: (store (s64)) - ; 64BIT-NEXT: STD killed renamable $x23, 168, $x1 :: (store (s64)) - ; 64BIT-NEXT: STD killed renamable $x22, 136, $x1 :: (store (s64)) - ; 64BIT-NEXT: STD killed renamable $x21, 120, $x1 :: (store (s64)) - ; 64BIT-NEXT: STD killed renamable $x20, 112, $x1 :: (store (s64)) + ; 64BIT-NEXT: STD killed renamable $x29, 184, $x1 :: (store (s64) into stack + 184, basealign 16) + ; 64BIT-NEXT: STD killed renamable $x28, 144, $x1 :: (store (s64) into stack + 144, align 16) + ; 64BIT-NEXT: STD killed renamable $x11, 216, $x1 :: (store (s64) into stack + 216, basealign 16) + ; 64BIT-NEXT: STD killed renamable $x12, 200, $x1 :: (store (s64) into stack + 200, basealign 16) + ; 64BIT-NEXT: STD killed renamable $x0, 160, $x1 :: (store (s64) into stack + 160, align 16) + ; 64BIT-NEXT: STD killed renamable $x31, 152, $x1 :: (store (s64) into stack + 152, basealign 16) + ; 64BIT-NEXT: STD killed renamable $x30, 128, $x1 :: (store (s64) into stack + 128, align 16) + ; 64BIT-NEXT: STD killed renamable $x27, 208, $x1 :: (store (s64) into stack + 208, align 16) + ; 64BIT-NEXT: STD killed renamable $x25, 192, $x1 :: (store (s64) into stack + 192, align 16) + ; 64BIT-NEXT: STD killed renamable $x24, 176, $x1 :: (store (s64) into stack + 176, align 16) + ; 64BIT-NEXT: STD killed renamable $x23, 168, $x1 :: (store (s64) into stack + 168, basealign 16) + ; 64BIT-NEXT: STD killed renamable $x22, 136, $x1 :: (store (s64) into stack + 136, basealign 16) + ; 64BIT-NEXT: STD killed renamable $x21, 120, $x1 :: (store (s64) into stack + 120, basealign 16) + ; 64BIT-NEXT: STD killed renamable $x20, 112, $x1 :: (store (s64) into stack + 112, align 16) ; 64BIT-NEXT: BL8_NOP , csr_ppc64, implicit-def dead $lr8, implicit $rm, implicit $x3, implicit $x4, implicit $x5, implicit $x6, implicit $x7, implicit $x8, implicit $x9, implicit $x10, implicit $f1, implicit $f2, implicit $f3, implicit $f4, implicit $f5, implicit $f6, implicit $f7, implicit $f8, implicit $f9, implicit $f10, implicit $f11, implicit $f12, implicit $f13, implicit $x2, implicit-def $r1, implicit-def dead $x3 ; 64BIT-NEXT: ADJCALLSTACKUP 224, 0, implicit-def dead $r1, implicit $r1 ; 64BIT-NEXT: BLR8 implicit $lr8, implicit $rm diff --git a/llvm/test/CodeGen/PowerPC/aix-cc-abi.ll b/llvm/test/CodeGen/PowerPC/aix-cc-abi.ll index 8f33f5ef863e6..03770d22d9f4f 100644 --- a/llvm/test/CodeGen/PowerPC/aix-cc-abi.ll +++ b/llvm/test/CodeGen/PowerPC/aix-cc-abi.ll @@ -1012,18 +1012,22 @@ define void @call_test_stackarg_float() { ; ASM32PWR4-NEXT: lwz 3, L..C8(2) # @f ; ASM32PWR4-NEXT: stw 0, 88(1) ; ASM32PWR4-NEXT: li 4, 2 -; ASM32PWR4-NEXT: li 5, 3 ; ASM32PWR4-NEXT: li 6, 4 ; ASM32PWR4-NEXT: li 7, 5 +; ASM32PWR4-NEXT: li 8, 6 ; ASM32PWR4-NEXT: lfs 1, 0(3) ; ASM32PWR4-NEXT: lwz 3, L..C9(2) # @d -; ASM32PWR4-NEXT: li 8, 6 ; ASM32PWR4-NEXT: li 9, 7 +; ASM32PWR4-NEXT: li 10, 8 ; ASM32PWR4-NEXT: lfd 2, 0(3) ; ASM32PWR4-NEXT: li 3, 1 -; ASM32PWR4-NEXT: li 10, 8 -; ASM32PWR4-NEXT: stfd 2, 60(1) +; ASM32PWR4-NEXT: stfd 2, 72(1) +; ASM32PWR4-NEXT: lwz 5, 76(1) +; ASM32PWR4-NEXT: lwz 11, 72(1) +; ASM32PWR4-NEXT: stw 5, 64(1) +; ASM32PWR4-NEXT: li 5, 3 ; ASM32PWR4-NEXT: stfs 1, 56(1) +; ASM32PWR4-NEXT: stw 11, 60(1) ; ASM32PWR4-NEXT: bl .test_stackarg_float[PR] ; ASM32PWR4-NEXT: nop ; ASM32PWR4-NEXT: addi 1, 1, 80 @@ -1126,20 +1130,24 @@ define void @call_test_stackarg_float3() { ; ASM32PWR4-NEXT: stwu 1, -80(1) ; ASM32PWR4-NEXT: lwz 3, L..C9(2) # @d ; ASM32PWR4-NEXT: stw 0, 88(1) -; ASM32PWR4-NEXT: li 4, 2 ; ASM32PWR4-NEXT: li 5, 3 ; ASM32PWR4-NEXT: li 6, 4 ; ASM32PWR4-NEXT: li 7, 5 +; ASM32PWR4-NEXT: li 8, 6 ; ASM32PWR4-NEXT: lfd 1, 0(3) ; ASM32PWR4-NEXT: lwz 3, L..C8(2) # @f -; ASM32PWR4-NEXT: li 8, 6 ; ASM32PWR4-NEXT: li 9, 7 ; ASM32PWR4-NEXT: stfd 1, 72(1) -; ASM32PWR4-NEXT: lwz 10, 72(1) ; ASM32PWR4-NEXT: lfs 2, 0(3) ; ASM32PWR4-NEXT: li 3, 1 +; ASM32PWR4-NEXT: stfd 1, 64(1) +; ASM32PWR4-NEXT: lwz 4, 68(1) +; ASM32PWR4-NEXT: lwz 10, 72(1) +; ASM32PWR4-NEXT: lwz 11, 64(1) +; ASM32PWR4-NEXT: stw 4, 56(1) +; ASM32PWR4-NEXT: li 4, 2 ; ASM32PWR4-NEXT: stfs 2, 60(1) -; ASM32PWR4-NEXT: stfd 1, 52(1) +; ASM32PWR4-NEXT: stw 11, 52(1) ; ASM32PWR4-NEXT: bl .test_stackarg_float3[PR] ; ASM32PWR4-NEXT: nop ; ASM32PWR4-NEXT: addi 1, 1, 80 @@ -1562,95 +1570,99 @@ define void @caller_fpr_stack() { ; ASM32PWR4-LABEL: caller_fpr_stack: ; ASM32PWR4: # %bb.0: # %entry ; ASM32PWR4-NEXT: mflr 0 -; ASM32PWR4-NEXT: stwu 1, -144(1) +; ASM32PWR4-NEXT: stwu 1, -160(1) ; ASM32PWR4-NEXT: lwz 3, L..C19(2) # @d15 -; ASM32PWR4-NEXT: lwz 4, L..C20(2) # @f14 -; ASM32PWR4-NEXT: lwz 5, L..C21(2) # @f16 -; ASM32PWR4-NEXT: stw 0, 152(1) -; ASM32PWR4-NEXT: lis 6, 16361 -; ASM32PWR4-NEXT: ori 6, 6, 39321 +; ASM32PWR4-NEXT: stw 0, 168(1) +; ASM32PWR4-NEXT: lwz 5, L..C20(2) # %const.1 +; ASM32PWR4-NEXT: lwz 4, L..C21(2) # @f14 ; ASM32PWR4-NEXT: lfd 0, 0(3) -; ASM32PWR4-NEXT: lwz 3, 0(4) -; ASM32PWR4-NEXT: lwz 4, 0(5) -; ASM32PWR4-NEXT: li 5, 0 -; ASM32PWR4-NEXT: stw 5, 60(1) -; ASM32PWR4-NEXT: lis 5, 16352 -; ASM32PWR4-NEXT: stw 5, 56(1) -; ASM32PWR4-NEXT: lis 5, 13107 -; ASM32PWR4-NEXT: ori 5, 5, 13107 -; ASM32PWR4-NEXT: stw 5, 68(1) -; ASM32PWR4-NEXT: lis 5, 16355 -; ASM32PWR4-NEXT: ori 5, 5, 13107 -; ASM32PWR4-NEXT: stw 5, 64(1) -; ASM32PWR4-NEXT: lis 5, 26214 -; ASM32PWR4-NEXT: ori 5, 5, 26214 -; ASM32PWR4-NEXT: stw 5, 76(1) -; ASM32PWR4-NEXT: lis 5, 16358 -; ASM32PWR4-NEXT: ori 5, 5, 26214 -; ASM32PWR4-NEXT: stw 5, 72(1) -; ASM32PWR4-NEXT: lis 5, -26215 -; ASM32PWR4-NEXT: ori 5, 5, 39322 -; ASM32PWR4-NEXT: stw 5, 84(1) -; ASM32PWR4-NEXT: stw 5, 100(1) -; ASM32PWR4-NEXT: lis 5, 16313 -; ASM32PWR4-NEXT: ori 5, 5, 39321 -; ASM32PWR4-NEXT: stw 5, 96(1) -; ASM32PWR4-NEXT: lis 5, -15729 -; ASM32PWR4-NEXT: ori 5, 5, 23593 -; ASM32PWR4-NEXT: stw 5, 108(1) -; ASM32PWR4-NEXT: lis 5, 16316 -; ASM32PWR4-NEXT: ori 5, 5, 10485 -; ASM32PWR4-NEXT: stw 5, 104(1) -; ASM32PWR4-NEXT: lis 5, -5243 -; ASM32PWR4-NEXT: ori 5, 5, 7864 -; ASM32PWR4-NEXT: stw 5, 116(1) -; ASM32PWR4-NEXT: lis 5, 16318 -; ASM32PWR4-NEXT: ori 5, 5, 47185 -; ASM32PWR4-NEXT: stw 6, 80(1) -; ASM32PWR4-NEXT: lis 6, -13108 -; ASM32PWR4-NEXT: ori 6, 6, 52429 -; ASM32PWR4-NEXT: stw 5, 112(1) -; ASM32PWR4-NEXT: lis 5, 2621 -; ASM32PWR4-NEXT: ori 5, 5, 28836 -; ASM32PWR4-NEXT: stw 6, 92(1) -; ASM32PWR4-NEXT: lis 6, 16364 -; ASM32PWR4-NEXT: ori 6, 6, 52428 -; ASM32PWR4-NEXT: stw 5, 124(1) -; ASM32PWR4-NEXT: lis 5, 16320 -; ASM32PWR4-NEXT: ori 5, 5, 41943 -; ASM32PWR4-NEXT: stw 6, 88(1) -; ASM32PWR4-NEXT: lwz 6, L..C22(2) # %const.0 -; ASM32PWR4-NEXT: stw 5, 120(1) -; ASM32PWR4-NEXT: lwz 5, L..C23(2) # %const.1 -; ASM32PWR4-NEXT: lfd 2, 0(6) -; ASM32PWR4-NEXT: lwz 6, L..C24(2) # %const.2 +; ASM32PWR4-NEXT: lwz 3, L..C22(2) # @f16 +; ASM32PWR4-NEXT: lwz 3, 0(3) +; ASM32PWR4-NEXT: stw 3, 140(1) +; ASM32PWR4-NEXT: li 3, 0 +; ASM32PWR4-NEXT: stw 3, 60(1) +; ASM32PWR4-NEXT: lis 3, 16352 +; ASM32PWR4-NEXT: stw 3, 56(1) +; ASM32PWR4-NEXT: lis 3, 13107 +; ASM32PWR4-NEXT: ori 3, 3, 13107 +; ASM32PWR4-NEXT: stw 3, 68(1) +; ASM32PWR4-NEXT: lis 3, 16355 +; ASM32PWR4-NEXT: ori 3, 3, 13107 +; ASM32PWR4-NEXT: stw 3, 64(1) +; ASM32PWR4-NEXT: lis 3, 26214 +; ASM32PWR4-NEXT: ori 3, 3, 26214 +; ASM32PWR4-NEXT: stw 3, 76(1) +; ASM32PWR4-NEXT: lis 3, 16358 +; ASM32PWR4-NEXT: ori 3, 3, 26214 +; ASM32PWR4-NEXT: stw 3, 72(1) +; ASM32PWR4-NEXT: lis 3, -26215 +; ASM32PWR4-NEXT: ori 3, 3, 39322 +; ASM32PWR4-NEXT: stw 3, 84(1) +; ASM32PWR4-NEXT: stw 3, 100(1) +; ASM32PWR4-NEXT: lis 3, 16313 +; ASM32PWR4-NEXT: ori 3, 3, 39321 +; ASM32PWR4-NEXT: stw 3, 96(1) +; ASM32PWR4-NEXT: lis 3, -15729 +; ASM32PWR4-NEXT: ori 3, 3, 23593 +; ASM32PWR4-NEXT: stw 3, 108(1) +; ASM32PWR4-NEXT: lis 3, 16316 +; ASM32PWR4-NEXT: ori 3, 3, 10485 +; ASM32PWR4-NEXT: stw 3, 104(1) +; ASM32PWR4-NEXT: lis 3, -5243 +; ASM32PWR4-NEXT: ori 3, 3, 7864 +; ASM32PWR4-NEXT: stw 3, 116(1) +; ASM32PWR4-NEXT: lis 3, 16318 +; ASM32PWR4-NEXT: ori 3, 3, 47185 +; ASM32PWR4-NEXT: stw 3, 112(1) +; ASM32PWR4-NEXT: lis 3, 2621 +; ASM32PWR4-NEXT: ori 3, 3, 28836 +; ASM32PWR4-NEXT: stw 3, 124(1) +; ASM32PWR4-NEXT: lis 3, 16320 +; ASM32PWR4-NEXT: ori 3, 3, 41943 +; ASM32PWR4-NEXT: stw 3, 120(1) +; ASM32PWR4-NEXT: lwz 3, L..C23(2) # %const.0 +; ASM32PWR4-NEXT: lfd 2, 0(3) +; ASM32PWR4-NEXT: lwz 3, L..C24(2) # %const.2 ; ASM32PWR4-NEXT: lfd 3, 0(5) ; ASM32PWR4-NEXT: lwz 5, L..C25(2) # %const.3 -; ASM32PWR4-NEXT: lfd 4, 0(6) -; ASM32PWR4-NEXT: lwz 6, L..C26(2) # %const.4 +; ASM32PWR4-NEXT: lfd 4, 0(3) +; ASM32PWR4-NEXT: lwz 3, L..C26(2) # %const.4 ; ASM32PWR4-NEXT: lfd 6, 0(5) ; ASM32PWR4-NEXT: lwz 5, L..C27(2) # %const.5 -; ASM32PWR4-NEXT: lfd 7, 0(6) -; ASM32PWR4-NEXT: lwz 6, L..C28(2) # %const.6 +; ASM32PWR4-NEXT: lwz 4, 0(4) +; ASM32PWR4-NEXT: lfd 7, 0(3) +; ASM32PWR4-NEXT: lwz 3, L..C28(2) # %const.6 ; ASM32PWR4-NEXT: lfd 8, 0(5) ; ASM32PWR4-NEXT: lwz 5, L..C29(2) # %const.7 -; ASM32PWR4-NEXT: lfd 9, 0(6) -; ASM32PWR4-NEXT: lwz 6, L..C30(2) # %const.8 +; ASM32PWR4-NEXT: stw 4, 128(1) +; ASM32PWR4-NEXT: lis 4, 16361 +; ASM32PWR4-NEXT: ori 4, 4, 39321 +; ASM32PWR4-NEXT: lfd 9, 0(3) +; ASM32PWR4-NEXT: lwz 3, L..C30(2) # %const.8 ; ASM32PWR4-NEXT: lfd 1, 0(5) ; ASM32PWR4-NEXT: lwz 5, L..C31(2) # %const.9 -; ASM32PWR4-NEXT: lfd 11, 0(6) -; ASM32PWR4-NEXT: lwz 6, L..C32(2) # %const.10 +; ASM32PWR4-NEXT: stw 4, 80(1) +; ASM32PWR4-NEXT: lis 4, -13108 ; ASM32PWR4-NEXT: fmr 10, 1 +; ASM32PWR4-NEXT: ori 4, 4, 52429 +; ASM32PWR4-NEXT: lfd 11, 0(3) +; ASM32PWR4-NEXT: lwz 3, L..C32(2) # %const.10 ; ASM32PWR4-NEXT: lfd 12, 0(5) ; ASM32PWR4-NEXT: lwz 5, L..C33(2) # %const.11 -; ASM32PWR4-NEXT: lfd 13, 0(6) +; ASM32PWR4-NEXT: stw 4, 92(1) +; ASM32PWR4-NEXT: lis 4, 16364 +; ASM32PWR4-NEXT: ori 4, 4, 52428 +; ASM32PWR4-NEXT: stfd 0, 152(1) +; ASM32PWR4-NEXT: stw 4, 88(1) +; ASM32PWR4-NEXT: lwz 4, 156(1) +; ASM32PWR4-NEXT: lfd 13, 0(3) ; ASM32PWR4-NEXT: lfs 5, 0(5) -; ASM32PWR4-NEXT: stfd 0, 132(1) -; ASM32PWR4-NEXT: stw 4, 140(1) -; ASM32PWR4-NEXT: stw 3, 128(1) +; ASM32PWR4-NEXT: lwz 3, 152(1) +; ASM32PWR4-NEXT: stw 4, 136(1) +; ASM32PWR4-NEXT: stw 3, 132(1) ; ASM32PWR4-NEXT: bl .test_fpr_stack ; ASM32PWR4-NEXT: nop -; ASM32PWR4-NEXT: addi 1, 1, 144 +; ASM32PWR4-NEXT: addi 1, 1, 160 ; ASM32PWR4-NEXT: lwz 0, 8(1) ; ASM32PWR4-NEXT: mtlr 0 ; ASM32PWR4-NEXT: blr @@ -1667,7 +1679,6 @@ define void @caller_fpr_stack() { ; ASM64PWR4-NEXT: lis 7, 16313 ; ASM64PWR4-NEXT: lwz 3, 0(3) ; ASM64PWR4-NEXT: ld 4, 0(4) -; ASM64PWR4-NEXT: lwz 5, 0(5) ; ASM64PWR4-NEXT: stw 3, 152(1) ; ASM64PWR4-NEXT: ld 3, L..C22(2) # %const.0 ; ASM64PWR4-NEXT: std 4, 160(1) @@ -1686,6 +1697,7 @@ define void @caller_fpr_stack() { ; ASM64PWR4-NEXT: ld 4, L..C29(2) # %const.7 ; ASM64PWR4-NEXT: lfd 9, 0(3) ; ASM64PWR4-NEXT: ld 3, L..C30(2) # %const.8 +; ASM64PWR4-NEXT: lwz 5, 0(5) ; ASM64PWR4-NEXT: lfd 1, 0(4) ; ASM64PWR4-NEXT: lis 4, 16320 ; ASM64PWR4-NEXT: ori 4, 4, 41943 diff --git a/llvm/test/CodeGen/PowerPC/aix-cc-byval-mir.ll b/llvm/test/CodeGen/PowerPC/aix-cc-byval-mir.ll index 67800df6ed4b5..95fed680e6964 100644 --- a/llvm/test/CodeGen/PowerPC/aix-cc-byval-mir.ll +++ b/llvm/test/CodeGen/PowerPC/aix-cc-byval-mir.ll @@ -134,7 +134,7 @@ define void @call_test_byval_3Byte() { ; 32BIT-NEXT: ADJCALLSTACKDOWN 60, 0, implicit-def dead $r1, implicit $r1 ; 32BIT-NEXT: renamable $r3 = LI 42 ; 32BIT-NEXT: renamable $r4 = LWZtoc @gS3, $r2 :: (load (s32) from got) - ; 32BIT-NEXT: STW killed renamable $r3, 56, $r1 :: (store (s32)) + ; 32BIT-NEXT: STW killed renamable $r3, 56, $r1 :: (store (s32) into stack + 56, align 8, basealign 16) ; 32BIT-NEXT: renamable $r3 = LBZ 2, renamable $r4 :: (load (s8)) ; 32BIT-NEXT: renamable $r4 = LHZ 0, killed renamable $r4 :: (load (s16)) ; 32BIT-NEXT: renamable $r10 = RLWINM killed renamable $r3, 8, 16, 23 @@ -155,7 +155,7 @@ define void @call_test_byval_3Byte() { ; 64BIT-NEXT: ADJCALLSTACKDOWN 120, 0, implicit-def dead $r1, implicit $r1 ; 64BIT-NEXT: renamable $x3 = LI8 42 ; 64BIT-NEXT: renamable $x4 = LDtoc @gS3, $x2 :: (load (s64) from got) - ; 64BIT-NEXT: STD killed renamable $x3, 112, $x1 :: (store (s64)) + ; 64BIT-NEXT: STD killed renamable $x3, 112, $x1 :: (store (s64) into stack + 112, align 16) ; 64BIT-NEXT: renamable $x3 = LBZ8 2, renamable $x4 :: (load (s8)) ; 64BIT-NEXT: renamable $x4 = LHZ8 0, killed renamable $x4 :: (load (s16)) ; 64BIT-NEXT: renamable $x10 = RLDIC killed renamable $x3, 40, 16 diff --git a/llvm/test/CodeGen/PowerPC/aix-vec-arg-spills-mir.ll b/llvm/test/CodeGen/PowerPC/aix-vec-arg-spills-mir.ll index 7c45958a1c2ff..7ee854c2ae221 100644 --- a/llvm/test/CodeGen/PowerPC/aix-vec-arg-spills-mir.ll +++ b/llvm/test/CodeGen/PowerPC/aix-vec-arg-spills-mir.ll @@ -34,17 +34,17 @@ define double @caller() { ; MIR32-NEXT: STXVW4X renamable $vsl0, $r1, killed renamable $r3 :: (store (s128), align 8) ; MIR32-NEXT: renamable $r3 = LI 104 ; MIR32-NEXT: STXVW4X renamable $vsl0, $r1, killed renamable $r4 :: (store (s128), align 8) - ; MIR32-NEXT: renamable $r4 = LI 88 ; MIR32-NEXT: STXVW4X renamable $vsl0, $r1, killed renamable $r3 :: (store (s128), align 8) - ; MIR32-NEXT: STXVW4X renamable $vsl0, $r1, killed renamable $r4 :: (store (s128), align 8) - ; MIR32-NEXT: renamable $r3 = LI 72 - ; MIR32-NEXT: renamable $r4 = LWZtoc %const.0, $r2 :: (load (s32) from got) - ; MIR32-NEXT: STXVW4X killed renamable $vsl0, $r1, killed renamable $r3 :: (store (s128), align 8) + ; MIR32-NEXT: renamable $r3 = LI 88 + ; MIR32-NEXT: renamable $r4 = LI 72 + ; MIR32-NEXT: STXVW4X renamable $vsl0, $r1, killed renamable $r3 :: (store (s128), align 8) ; MIR32-NEXT: renamable $r3 = LI 48 - ; MIR32-NEXT: renamable $vsl0 = LXVD2X $zero, killed renamable $r4 :: (load (s128) from constant-pool) + ; MIR32-NEXT: STXVW4X killed renamable $vsl0, $r1, killed renamable $r4 :: (store (s128), align 8) ; MIR32-NEXT: renamable $r4 = LI 512 - ; MIR32-NEXT: STXVD2X killed renamable $vsl0, $r1, killed renamable $r3 :: (store (s128)) - ; MIR32-NEXT: STW killed renamable $r4, 152, $r1 :: (store (s32)) + ; MIR32-NEXT: STW killed renamable $r4, 152, $r1 :: (store (s32) into stack + 152, align 8, basealign 16) + ; MIR32-NEXT: renamable $r4 = LWZtoc %const.0, $r2 :: (load (s32) from got) + ; MIR32-NEXT: renamable $vsl0 = LXVD2X $zero, killed renamable $r4 :: (load (s128) from constant-pool) + ; MIR32-NEXT: STXVD2X killed renamable $vsl0, $r1, killed renamable $r3 :: (store (s128) into stack + 48) ; MIR32-NEXT: $f1 = XXLXORdpz ; MIR32-NEXT: $f2 = XXLXORdpz ; MIR32-NEXT: $v2 = XXLXORz @@ -92,18 +92,18 @@ define double @caller() { ; MIR64-NEXT: ADJCALLSTACKDOWN 224, 0, implicit-def dead $r1, implicit $r1 ; MIR64-NEXT: renamable $vsl0 = XXLXORz ; MIR64-NEXT: renamable $x3 = LI8 160 - ; MIR64-NEXT: STXVW4X renamable $vsl0, $x1, killed renamable $x3 :: (store (s128), align 8) + ; MIR64-NEXT: STXVW4X renamable $vsl0, $x1, killed renamable $x3 :: (store (s128)) ; MIR64-NEXT: renamable $x3 = LI8 144 - ; MIR64-NEXT: STXVW4X renamable $vsl0, $x1, killed renamable $x3 :: (store (s128), align 8) + ; MIR64-NEXT: STXVW4X renamable $vsl0, $x1, killed renamable $x3 :: (store (s128)) ; MIR64-NEXT: renamable $x3 = LI8 128 - ; MIR64-NEXT: STXVW4X killed renamable $vsl0, $x1, killed renamable $x3 :: (store (s128), align 8) - ; MIR64-NEXT: renamable $x3 = LDtocCPT %const.0, $x2 :: (load (s64) from got) - ; MIR64-NEXT: renamable $vsl0 = LXVD2X $zero8, killed renamable $x3 :: (load (s128) from constant-pool) - ; MIR64-NEXT: renamable $x3 = LI8 80 - ; MIR64-NEXT: STXVD2X killed renamable $vsl0, $x1, killed renamable $x3 :: (store (s128)) + ; MIR64-NEXT: STXVW4X killed renamable $vsl0, $x1, killed renamable $x3 :: (store (s128)) ; MIR64-NEXT: renamable $x3 = LI8 512 - ; MIR64-NEXT: STD killed renamable $x3, 184, $x1 :: (store (s64)) - ; MIR64-NEXT: STD killed renamable $x4, 176, $x1 :: (store (s64)) + ; MIR64-NEXT: STD killed renamable $x3, 184, $x1 :: (store (s64) into stack + 184, basealign 16) + ; MIR64-NEXT: renamable $x3 = LI8 80 + ; MIR64-NEXT: STD killed renamable $x4, 176, $x1 :: (store (s64) into stack + 176, align 16) + ; MIR64-NEXT: renamable $x4 = LDtocCPT %const.0, $x2 :: (load (s64) from got) + ; MIR64-NEXT: renamable $vsl0 = LXVD2X $zero8, killed renamable $x4 :: (load (s128) from constant-pool) + ; MIR64-NEXT: STXVD2X killed renamable $vsl0, $x1, killed renamable $x3 :: (store (s128) into stack + 80) ; MIR64-NEXT: $f1 = XXLXORdpz ; MIR64-NEXT: $f2 = XXLXORdpz ; MIR64-NEXT: $v2 = XXLXORz diff --git a/llvm/test/CodeGen/PowerPC/aix-vec-arg-spills.ll b/llvm/test/CodeGen/PowerPC/aix-vec-arg-spills.ll index 66f88b4e3d5ab..294f074807f1f 100644 --- a/llvm/test/CodeGen/PowerPC/aix-vec-arg-spills.ll +++ b/llvm/test/CodeGen/PowerPC/aix-vec-arg-spills.ll @@ -25,42 +25,42 @@ define double @caller() { ; 32BIT-NEXT: stw 3, 184(1) ; 32BIT-NEXT: stw 3, 176(1) ; 32BIT-NEXT: stw 4, 172(1) -; 32BIT-NEXT: lis 4, 16368 ; 32BIT-NEXT: stw 3, 168(1) +; 32BIT-NEXT: lis 4, 16368 ; 32BIT-NEXT: stw 3, 160(1) -; 32BIT-NEXT: stw 4, 164(1) ; 32BIT-NEXT: stw 3, 156(1) ; 32BIT-NEXT: li 3, 136 +; 32BIT-NEXT: stw 4, 164(1) ; 32BIT-NEXT: li 4, 120 -; 32BIT-NEXT: xxlxor 2, 2, 2 ; 32BIT-NEXT: stxvw4x 0, 1, 3 ; 32BIT-NEXT: li 3, 104 ; 32BIT-NEXT: stxvw4x 0, 1, 4 -; 32BIT-NEXT: li 4, 88 +; 32BIT-NEXT: stxvw4x 0, 1, 3 +; 32BIT-NEXT: li 3, 88 +; 32BIT-NEXT: li 4, 72 +; 32BIT-NEXT: xxlxor 2, 2, 2 ; 32BIT-NEXT: stxvw4x 0, 1, 3 ; 32BIT-NEXT: stxvw4x 0, 1, 4 +; 32BIT-NEXT: li 4, 512 +; 32BIT-NEXT: stw 4, 152(1) ; 32BIT-NEXT: lwz 4, L..C0(2) # %const.0 -; 32BIT-NEXT: li 3, 72 -; 32BIT-NEXT: stxvw4x 0, 1, 3 ; 32BIT-NEXT: li 3, 48 ; 32BIT-NEXT: xxlxor 34, 34, 34 ; 32BIT-NEXT: xxlxor 35, 35, 35 -; 32BIT-NEXT: lxvd2x 0, 0, 4 -; 32BIT-NEXT: li 4, 512 ; 32BIT-NEXT: xxlxor 36, 36, 36 ; 32BIT-NEXT: xxlxor 37, 37, 37 ; 32BIT-NEXT: xxlxor 38, 38, 38 +; 32BIT-NEXT: lxvd2x 0, 0, 4 ; 32BIT-NEXT: xxlxor 39, 39, 39 ; 32BIT-NEXT: xxlxor 40, 40, 40 +; 32BIT-NEXT: li 4, 256 ; 32BIT-NEXT: xxlxor 41, 41, 41 ; 32BIT-NEXT: xxlxor 42, 42, 42 -; 32BIT-NEXT: stxvd2x 0, 1, 3 -; 32BIT-NEXT: stw 4, 152(1) -; 32BIT-NEXT: li 3, 128 -; 32BIT-NEXT: li 4, 256 ; 32BIT-NEXT: xxlxor 43, 43, 43 ; 32BIT-NEXT: xxlxor 44, 44, 44 ; 32BIT-NEXT: xxlxor 45, 45, 45 +; 32BIT-NEXT: stxvd2x 0, 1, 3 +; 32BIT-NEXT: li 3, 128 ; 32BIT-NEXT: xxlxor 3, 3, 3 ; 32BIT-NEXT: xxlxor 4, 4, 4 ; 32BIT-NEXT: xxlxor 5, 5, 5 @@ -114,23 +114,23 @@ define double @caller() { ; 64BIT-NEXT: li 3, 128 ; 64BIT-NEXT: xxlxor 43, 43, 43 ; 64BIT-NEXT: stxvw4x 0, 1, 3 -; 64BIT-NEXT: ld 3, L..C0(2) # %const.0 +; 64BIT-NEXT: std 4, 176(1) +; 64BIT-NEXT: ld 4, L..C0(2) # %const.0 +; 64BIT-NEXT: li 3, 512 ; 64BIT-NEXT: xxlxor 44, 44, 44 ; 64BIT-NEXT: xxlxor 45, 45, 45 -; 64BIT-NEXT: lxvd2x 0, 0, 3 +; 64BIT-NEXT: lxvd2x 0, 0, 4 +; 64BIT-NEXT: std 3, 184(1) ; 64BIT-NEXT: li 3, 80 +; 64BIT-NEXT: li 4, 256 ; 64BIT-NEXT: xxlxor 3, 3, 3 ; 64BIT-NEXT: xxlxor 4, 4, 4 ; 64BIT-NEXT: xxlxor 5, 5, 5 ; 64BIT-NEXT: stxvd2x 0, 1, 3 -; 64BIT-NEXT: li 3, 512 -; 64BIT-NEXT: std 4, 176(1) -; 64BIT-NEXT: li 4, 256 +; 64BIT-NEXT: li 3, 128 ; 64BIT-NEXT: xxlxor 6, 6, 6 ; 64BIT-NEXT: xxlxor 7, 7, 7 ; 64BIT-NEXT: xxlxor 8, 8, 8 -; 64BIT-NEXT: std 3, 184(1) -; 64BIT-NEXT: li 3, 128 ; 64BIT-NEXT: xxlxor 9, 9, 9 ; 64BIT-NEXT: xxlxor 10, 10, 10 ; 64BIT-NEXT: xxlxor 11, 11, 11 diff --git a/llvm/test/CodeGen/PowerPC/aix-vector-vararg-caller.ll b/llvm/test/CodeGen/PowerPC/aix-vector-vararg-caller.ll index 4697a093e5d6d..0ba345fb5275c 100644 --- a/llvm/test/CodeGen/PowerPC/aix-vector-vararg-caller.ll +++ b/llvm/test/CodeGen/PowerPC/aix-vector-vararg-caller.ll @@ -23,31 +23,31 @@ define <4 x i32> @caller() { ; 32BIT-NEXT: [[LWZtoc2:%[0-9]+]]:gprc = LWZtoc %const.2, $r2 :: (load (s32) from got) ; 32BIT-NEXT: [[LXVW4X2:%[0-9]+]]:vsrc = LXVW4X $zero, killed [[LWZtoc2]] :: (load (s128) from constant-pool) ; 32BIT-NEXT: [[LI2:%[0-9]+]]:gprc = LI 160 - ; 32BIT-NEXT: STXVW4X killed [[LXVW4X2]], $r1, killed [[LI2]] :: (store (s128)) + ; 32BIT-NEXT: STXVW4X killed [[LXVW4X2]], $r1, killed [[LI2]] :: (store (s128) into stack + 160) ; 32BIT-NEXT: [[LWZtoc3:%[0-9]+]]:gprc = LWZtoc %const.3, $r2 :: (load (s32) from got) ; 32BIT-NEXT: [[LXVW4X3:%[0-9]+]]:vsrc = LXVW4X $zero, killed [[LWZtoc3]] :: (load (s128) from constant-pool) ; 32BIT-NEXT: [[LI3:%[0-9]+]]:gprc = LI 144 - ; 32BIT-NEXT: STXVW4X killed [[LXVW4X3]], $r1, killed [[LI3]] :: (store (s128)) + ; 32BIT-NEXT: STXVW4X killed [[LXVW4X3]], $r1, killed [[LI3]] :: (store (s128) into stack + 144) ; 32BIT-NEXT: [[LWZtoc4:%[0-9]+]]:gprc = LWZtoc %const.4, $r2 :: (load (s32) from got) ; 32BIT-NEXT: [[LXVW4X4:%[0-9]+]]:vsrc = LXVW4X $zero, killed [[LWZtoc4]] :: (load (s128) from constant-pool) ; 32BIT-NEXT: [[LI4:%[0-9]+]]:gprc = LI 128 - ; 32BIT-NEXT: STXVW4X killed [[LXVW4X4]], $r1, killed [[LI4]] :: (store (s128)) + ; 32BIT-NEXT: STXVW4X killed [[LXVW4X4]], $r1, killed [[LI4]] :: (store (s128) into stack + 128) ; 32BIT-NEXT: [[LWZtoc5:%[0-9]+]]:gprc = LWZtoc %const.5, $r2 :: (load (s32) from got) ; 32BIT-NEXT: [[LXVW4X5:%[0-9]+]]:vsrc = LXVW4X $zero, killed [[LWZtoc5]] :: (load (s128) from constant-pool) ; 32BIT-NEXT: [[LI5:%[0-9]+]]:gprc = LI 112 - ; 32BIT-NEXT: STXVW4X killed [[LXVW4X5]], $r1, killed [[LI5]] :: (store (s128)) + ; 32BIT-NEXT: STXVW4X killed [[LXVW4X5]], $r1, killed [[LI5]] :: (store (s128) into stack + 112) ; 32BIT-NEXT: [[LWZtoc6:%[0-9]+]]:gprc = LWZtoc %const.6, $r2 :: (load (s32) from got) ; 32BIT-NEXT: [[LXVW4X6:%[0-9]+]]:vsrc = LXVW4X $zero, killed [[LWZtoc6]] :: (load (s128) from constant-pool) ; 32BIT-NEXT: [[LI6:%[0-9]+]]:gprc = LI 96 - ; 32BIT-NEXT: STXVW4X killed [[LXVW4X6]], $r1, killed [[LI6]] :: (store (s128)) + ; 32BIT-NEXT: STXVW4X killed [[LXVW4X6]], $r1, killed [[LI6]] :: (store (s128) into stack + 96) ; 32BIT-NEXT: [[LWZtoc7:%[0-9]+]]:gprc = LWZtoc %const.7, $r2 :: (load (s32) from got) ; 32BIT-NEXT: [[LXVW4X7:%[0-9]+]]:vsrc = LXVW4X $zero, killed [[LWZtoc7]] :: (load (s128) from constant-pool) ; 32BIT-NEXT: [[LI7:%[0-9]+]]:gprc = LI 80 - ; 32BIT-NEXT: STXVW4X killed [[LXVW4X7]], $r1, killed [[LI7]] :: (store (s128)) + ; 32BIT-NEXT: STXVW4X killed [[LXVW4X7]], $r1, killed [[LI7]] :: (store (s128) into stack + 80) ; 32BIT-NEXT: [[LWZtoc8:%[0-9]+]]:gprc = LWZtoc %const.8, $r2 :: (load (s32) from got) ; 32BIT-NEXT: [[LXVW4X8:%[0-9]+]]:vsrc = LXVW4X $zero, killed [[LWZtoc8]] :: (load (s128) from constant-pool) ; 32BIT-NEXT: [[LI8:%[0-9]+]]:gprc = LI 64 - ; 32BIT-NEXT: STXVW4X killed [[LXVW4X8]], $r1, killed [[LI8]] :: (store (s128)) + ; 32BIT-NEXT: STXVW4X killed [[LXVW4X8]], $r1, killed [[LI8]] :: (store (s128) into stack + 64) ; 32BIT-NEXT: [[LWZ:%[0-9]+]]:gprc = LWZ 52, $r1 :: (load (s32)) ; 32BIT-NEXT: [[LWZ1:%[0-9]+]]:gprc = LWZ 48, $r1 :: (load (s32)) ; 32BIT-NEXT: [[LWZ2:%[0-9]+]]:gprc = LWZ 44, $r1 :: (load (s32)) @@ -86,27 +86,27 @@ define <4 x i32> @caller() { ; 64BIT-NEXT: [[LDtocCPT3:%[0-9]+]]:g8rc = LDtocCPT %const.3, $x2 :: (load (s64) from got) ; 64BIT-NEXT: [[LXVW4X3:%[0-9]+]]:vsrc = LXVW4X $zero8, killed [[LDtocCPT3]] :: (load (s128) from constant-pool) ; 64BIT-NEXT: [[LI8_3:%[0-9]+]]:g8rc = LI8 192 - ; 64BIT-NEXT: STXVW4X killed [[LXVW4X3]], $x1, killed [[LI8_3]] :: (store (s128)) + ; 64BIT-NEXT: STXVW4X killed [[LXVW4X3]], $x1, killed [[LI8_3]] :: (store (s128) into stack + 192) ; 64BIT-NEXT: [[LDtocCPT4:%[0-9]+]]:g8rc = LDtocCPT %const.4, $x2 :: (load (s64) from got) ; 64BIT-NEXT: [[LXVW4X4:%[0-9]+]]:vsrc = LXVW4X $zero8, killed [[LDtocCPT4]] :: (load (s128) from constant-pool) ; 64BIT-NEXT: [[LI8_4:%[0-9]+]]:g8rc = LI8 176 - ; 64BIT-NEXT: STXVW4X killed [[LXVW4X4]], $x1, killed [[LI8_4]] :: (store (s128)) + ; 64BIT-NEXT: STXVW4X killed [[LXVW4X4]], $x1, killed [[LI8_4]] :: (store (s128) into stack + 176) ; 64BIT-NEXT: [[LDtocCPT5:%[0-9]+]]:g8rc = LDtocCPT %const.5, $x2 :: (load (s64) from got) ; 64BIT-NEXT: [[LXVW4X5:%[0-9]+]]:vsrc = LXVW4X $zero8, killed [[LDtocCPT5]] :: (load (s128) from constant-pool) ; 64BIT-NEXT: [[LI8_5:%[0-9]+]]:g8rc = LI8 160 - ; 64BIT-NEXT: STXVW4X killed [[LXVW4X5]], $x1, killed [[LI8_5]] :: (store (s128)) + ; 64BIT-NEXT: STXVW4X killed [[LXVW4X5]], $x1, killed [[LI8_5]] :: (store (s128) into stack + 160) ; 64BIT-NEXT: [[LDtocCPT6:%[0-9]+]]:g8rc = LDtocCPT %const.6, $x2 :: (load (s64) from got) ; 64BIT-NEXT: [[LXVW4X6:%[0-9]+]]:vsrc = LXVW4X $zero8, killed [[LDtocCPT6]] :: (load (s128) from constant-pool) ; 64BIT-NEXT: [[LI8_6:%[0-9]+]]:g8rc = LI8 144 - ; 64BIT-NEXT: STXVW4X killed [[LXVW4X6]], $x1, killed [[LI8_6]] :: (store (s128)) + ; 64BIT-NEXT: STXVW4X killed [[LXVW4X6]], $x1, killed [[LI8_6]] :: (store (s128) into stack + 144) ; 64BIT-NEXT: [[LDtocCPT7:%[0-9]+]]:g8rc = LDtocCPT %const.7, $x2 :: (load (s64) from got) ; 64BIT-NEXT: [[LXVW4X7:%[0-9]+]]:vsrc = LXVW4X $zero8, killed [[LDtocCPT7]] :: (load (s128) from constant-pool) ; 64BIT-NEXT: [[LI8_7:%[0-9]+]]:g8rc = LI8 128 - ; 64BIT-NEXT: STXVW4X killed [[LXVW4X7]], $x1, killed [[LI8_7]] :: (store (s128)) + ; 64BIT-NEXT: STXVW4X killed [[LXVW4X7]], $x1, killed [[LI8_7]] :: (store (s128) into stack + 128) ; 64BIT-NEXT: [[LDtocCPT8:%[0-9]+]]:g8rc = LDtocCPT %const.8, $x2 :: (load (s64) from got) ; 64BIT-NEXT: [[LXVW4X8:%[0-9]+]]:vsrc = LXVW4X $zero8, killed [[LDtocCPT8]] :: (load (s128) from constant-pool) ; 64BIT-NEXT: [[LI8_8:%[0-9]+]]:g8rc = LI8 112 - ; 64BIT-NEXT: STXVW4X killed [[LXVW4X8]], $x1, killed [[LI8_8]] :: (store (s128)) + ; 64BIT-NEXT: STXVW4X killed [[LXVW4X8]], $x1, killed [[LI8_8]] :: (store (s128) into stack + 112) ; 64BIT-NEXT: [[LD:%[0-9]+]]:g8rc = LD 104, $x1 :: (load (s64)) ; 64BIT-NEXT: [[LD1:%[0-9]+]]:g8rc = LD 96, $x1 :: (load (s64)) ; 64BIT-NEXT: [[LD2:%[0-9]+]]:g8rc = LD 88, $x1 :: (load (s64)) diff --git a/llvm/test/CodeGen/PowerPC/aix-vector-vararg-fixed-caller.ll b/llvm/test/CodeGen/PowerPC/aix-vector-vararg-fixed-caller.ll index fad275f58cd01..b39a94e17563e 100644 --- a/llvm/test/CodeGen/PowerPC/aix-vector-vararg-fixed-caller.ll +++ b/llvm/test/CodeGen/PowerPC/aix-vector-vararg-fixed-caller.ll @@ -16,13 +16,13 @@ define void @caller() { ; 32BIT-NEXT: [[LWZtoc:%[0-9]+]]:gprc = LWZtoc %const.0, $r2 :: (load (s32) from got) ; 32BIT-NEXT: [[LXVW4X:%[0-9]+]]:vsrc = LXVW4X $zero, killed [[LWZtoc]] :: (load (s128) from constant-pool) ; 32BIT-NEXT: [[LI:%[0-9]+]]:gprc = LI 64 - ; 32BIT-NEXT: STXVW4X killed [[LXVW4X]], $r1, killed [[LI]] :: (store (s128)) + ; 32BIT-NEXT: STXVW4X killed [[LXVW4X]], $r1, killed [[LI]] :: (store (s128) into stack + 64) ; 32BIT-NEXT: [[LIS:%[0-9]+]]:gprc = LIS 38314 ; 32BIT-NEXT: [[ORI:%[0-9]+]]:gprc = ORI killed [[LIS]], 63376 - ; 32BIT-NEXT: STW killed [[ORI]], 84, $r1 :: (store (s32) into unknown-address + 4, basealign 8) + ; 32BIT-NEXT: STW killed [[ORI]], 84, $r1 :: (store (s32) into stack + 84, basealign 16) ; 32BIT-NEXT: [[LIS1:%[0-9]+]]:gprc = LIS 16389 ; 32BIT-NEXT: [[ORI1:%[0-9]+]]:gprc = ORI killed [[LIS1]], 48905 - ; 32BIT-NEXT: STW killed [[ORI1]], 80, $r1 :: (store (s32), align 8) + ; 32BIT-NEXT: STW killed [[ORI1]], 80, $r1 :: (store (s32) into stack + 80, align 16) ; 32BIT-NEXT: [[LWZtoc1:%[0-9]+]]:gprc = LWZtoc %const.1, $r2 :: (load (s32) from got) ; 32BIT-NEXT: [[LXVW4X1:%[0-9]+]]:vsrc = LXVW4X $zero, killed [[LWZtoc1]] :: (load (s128) from constant-pool) ; 32BIT-NEXT: [[LWZtoc2:%[0-9]+]]:gprc_and_gprc_nor0 = LWZtoc %const.2, $r2 :: (load (s32) from got) @@ -57,7 +57,7 @@ define void @caller() { ; 64BIT-NEXT: [[RLDIC:%[0-9]+]]:g8rc = RLDIC killed [[ORI8_]], 32, 1 ; 64BIT-NEXT: [[ORIS8_:%[0-9]+]]:g8rc = ORIS8 killed [[RLDIC]], 38314 ; 64BIT-NEXT: [[ORI8_1:%[0-9]+]]:g8rc = ORI8 killed [[ORIS8_]], 63376 - ; 64BIT-NEXT: STD killed [[ORI8_1]], 112, $x1 :: (store (s64)) + ; 64BIT-NEXT: STD killed [[ORI8_1]], 112, $x1 :: (store (s64) into stack + 112, align 16) ; 64BIT-NEXT: [[LDtocCPT1:%[0-9]+]]:g8rc = LDtocCPT %const.1, $x2 :: (load (s64) from got) ; 64BIT-NEXT: [[LXVW4X1:%[0-9]+]]:vsrc = LXVW4X $zero8, killed [[LDtocCPT1]] :: (load (s128) from constant-pool) ; 64BIT-NEXT: [[LD:%[0-9]+]]:g8rc = LD 104, $x1 :: (load (s64))