From owner-svn-src-head@FreeBSD.ORG Tue Oct 1 19:14:25 2013 Return-Path: Delivered-To: svn-src-head@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 5D51CDB3; Tue, 1 Oct 2013 19:14:25 +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 4A33D2135; Tue, 1 Oct 2013 19:14:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r91JEPnN047738; Tue, 1 Oct 2013 19:14:25 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r91JEPMr047737; Tue, 1 Oct 2013 19:14:25 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201310011914.r91JEPMr047737@svn.freebsd.org> From: Dimitry Andric Date: Tue, 1 Oct 2013 19:14:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255978 - head/contrib/llvm/lib/Target/X86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Oct 2013 19:14:25 -0000 Author: dim Date: Tue Oct 1 19:14:24 2013 New Revision: 255978 URL: http://svnweb.freebsd.org/changeset/base/255978 Log: Pull in r191711 from upstream llvm trunk: The X86FixupLEAs pass for Intel Atom must not call convertToThreeAddress on ADD16rr opcodes, if src1 != src, since that would cause convertToThreeAddress to try to create a virtual register. This is not permitted after register allocation, which is when the X86FixupLEAs pass runs. This patch fixes PR16785. Pull in r191715 from upstream llvm trunk: Forgot to add a break statement. This should enable building the x11-toolskits/libXaw port with CPUTYPE=atom. Approved by: re (gjb) Reported by: Kenta Suzumoto MFC after: 3 days Modified: head/contrib/llvm/lib/Target/X86/X86FixupLEAs.cpp Modified: head/contrib/llvm/lib/Target/X86/X86FixupLEAs.cpp ============================================================================== --- head/contrib/llvm/lib/Target/X86/X86FixupLEAs.cpp Tue Oct 1 18:41:53 2013 (r255977) +++ head/contrib/llvm/lib/Target/X86/X86FixupLEAs.cpp Tue Oct 1 19:14:24 2013 (r255978) @@ -125,6 +125,15 @@ FixupLEAPass::postRAConvertToLEA(Machine // which requires isImm() to be true return 0; } + break; + case X86::ADD16rr: + case X86::ADD16rr_DB: + if (MI->getOperand(1).getReg() != MI->getOperand(2).getReg()) { + // if src1 != src2, then convertToThreeAddress will + // need to create a Virtual register, which we cannot do + // after register allocation. + return 0; + } } return TII->convertToThreeAddress(MFI, MBBI, 0); }