[llvm] [RegAllocFast] Don't align stack slots if the stack can't be realigned (PR #153682)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 19 07:51:18 PDT 2025


================
@@ -474,6 +474,13 @@ int RegAllocFastImpl::getStackSpaceFor(Register VirtReg) {
   const TargetRegisterClass &RC = *MRI->getRegClass(VirtReg);
   unsigned Size = TRI->getSpillSize(RC);
   Align Alignment = TRI->getSpillAlign(RC);
+
+  const MachineFunction &MF = MRI->getMF();
+  auto &ST = MF.getSubtarget();
+  Align CurrentAlign = ST.getFrameLowering()->getStackAlign();
----------------
arsenm wrote:

Probably should fix both in follow up 

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


More information about the llvm-commits mailing list