Date: Wed, 9 Oct 2013 06:19:02 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r256178 - stable/9/contrib/llvm/lib/Target/X86 Message-ID: <201310090619.r996J2hY059769@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310090619.r996J2hY059769>