svn commit: r256178 - stable/9/contrib/llvm/lib/Target/X86
Dimitry Andric
dim at FreeBSD.org
Wed Oct 9 06:19:02 UTC 2013
Author: dim
Date: Wed Oct 9 06:19:01 2013
New Revision: 256178
URL: http://svnweb.freebsd.org/changeset/base/256178
Log:
MFC r256090:
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.
Reported by: tijl
Modified:
stable/9/contrib/llvm/lib/Target/X86/X86InstrInfo.cpp
Directory Properties:
stable/9/contrib/llvm/ (props changed)
Modified: stable/9/contrib/llvm/lib/Target/X86/X86InstrInfo.cpp
==============================================================================
--- stable/9/contrib/llvm/lib/Target/X86/X86InstrInfo.cpp Wed Oct 9 05:27:21 2013 (r256177)
+++ stable/9/contrib/llvm/lib/Target/X86/X86InstrInfo.cpp Wed Oct 9 06:19:01 2013 (r256178)
@@ -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-stable
mailing list