mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
X86: Don't fold spills into SSE operations if the stack is unaligned.
Regalloc can emit unaligned spills nowadays, but we can't fold the spills into SSE ops if we can't guarantee alignment. PR12250. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192064 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -4166,6 +4166,10 @@ MachineInstr* X86InstrInfo::foldMemoryOperandImpl(MachineFunction &MF,
|
||||
const MachineFrameInfo *MFI = MF.getFrameInfo();
|
||||
unsigned Size = MFI->getObjectSize(FrameIndex);
|
||||
unsigned Alignment = MFI->getObjectAlignment(FrameIndex);
|
||||
// If the function stack isn't realigned we don't want to fold instructions
|
||||
// that need increased alignment.
|
||||
if (!RI.needsStackRealignment(MF))
|
||||
Alignment = std::min(Alignment, TM.getFrameLowering()->getStackAlignment());
|
||||
if (Ops.size() == 2 && Ops[0] == 0 && Ops[1] == 1) {
|
||||
unsigned NewOpc = 0;
|
||||
unsigned RCSize = 0;
|
||||
|
Reference in New Issue
Block a user