svn commit: r256090 - head/contrib/llvm/lib/Target/X86
Dimitry Andric
dim at FreeBSD.org
Sun Oct 6 16:12:45 UTC 2013
Author: dim
Date: Sun Oct 6 16:12:45 2013
New Revision: 256090
URL: http://svnweb.freebsd.org/changeset/base/256090
Log:
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
Modified:
head/contrib/llvm/lib/Target/X86/X86InstrInfo.cpp
Modified: head/contrib/llvm/lib/Target/X86/X86InstrInfo.cpp
==============================================================================
--- head/contrib/llvm/lib/Target/X86/X86InstrInfo.cpp Sun Oct 6 15:59:06 2013 (r256089)
+++ head/contrib/llvm/lib/Target/X86/X86InstrInfo.cpp Sun Oct 6 16:12:45 2013 (r256090)
@@ -3881,6 +3881,10 @@ MachineInstr* X86InstrInfo::foldMemoryOp
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;
More information about the svn-src-head
mailing list