From owner-svn-src-stable-9@FreeBSD.ORG Wed Oct 9 06:19:02 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6F173BA4; Wed, 9 Oct 2013 06:19:02 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5CC092D73; Wed, 9 Oct 2013 06:19:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r996J2UH059770; Wed, 9 Oct 2013 06:19:02 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r996J2hY059769; Wed, 9 Oct 2013 06:19:02 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201310090619.r996J2hY059769@svn.freebsd.org> From: Dimitry Andric Date: Wed, 9 Oct 2013 06:19:02 +0000 (UTC) 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 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Oct 2013 06:19:02 -0000 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;