[llvm] [PowerPC][AIX] Specify pointer info and alignment for stack store (PR #144526)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 18 02:23:25 PDT 2025


================
@@ -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)
----------------
nikic wrote:

A change I didn't notice is that here we now specify the correct alignment (which is 4 for stack + 60, because AIX only requires alignment 4 for double stack slots) instead of the (currently incorrect) ABI alignment, which then causes this to be expanded as an unaligned store.

This will go away if we fix the ABI alignment for double.

https://github.com/llvm/llvm-project/pull/144526


More information about the llvm-commits mailing list