mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-02 08:42:48 +00:00
Pull in r192064 from upstream llvm trunk:
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. This fixes unaligned SSE accesses (leading to a SIGBUS) which could occur in the ffmpeg ports. Approved by: re (kib) Reported by: tijl MFC after: 3 days
This commit is contained in:
parent
5dc5cbb274
commit
7ae3e01a31
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=256090
@ -3881,6 +3881,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;
|
||||
|
Loading…
Reference in New Issue
Block a user