From owner-svn-src-all@FreeBSD.ORG Mon Jun 30 20:26:31 2014 Return-Path: Delivered-To: svn-src-all@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 ESMTPS id A096E6ED; Mon, 30 Jun 2014 20:26:31 +0000 (UTC) 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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C556212F; Mon, 30 Jun 2014 20:26:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5UKQV8e001943; Mon, 30 Jun 2014 20:26:31 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5UKQV2i001941; Mon, 30 Jun 2014 20:26:31 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201406302026.s5UKQV2i001941@svn.freebsd.org> From: Dimitry Andric Date: Mon, 30 Jun 2014 20:26:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268065 - in stable: 10/contrib/llvm/lib/Target/PowerPC 10/contrib/llvm/patches 9/contrib/llvm/lib/Target/PowerPC 9/contrib/llvm/patches X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2014 20:26:31 -0000 Author: dim Date: Mon Jun 30 20:26:30 2014 New Revision: 268065 URL: http://svnweb.freebsd.org/changeset/base/268065 Log: MFC r267981: Pull in r211627 from upstream llvm trunk (by Bill Schmidt): [PPC64] Fix PR20071 (fctiduz generated for targets lacking that instruction) PR20071 identifies a problem in PowerPC's fast-isel implementation for floating-point conversion to integer. The fctiduz instruction was added in Power ISA 2.06 (i.e., Power7 and later). However, this instruction is being generated regardless of which 64-bit PowerPC target is selected. The intent is for fast-isel to punt to DAG selection when this instruction is not available. This patch implements that change. For testing purposes, the existing fast-isel-conversion.ll test adds a RUN line for -mcpu=970 and tests for the expected code generation. Additionally, the existing test fast-isel-conversion-p5.ll was found to be incorrectly expecting the unavailable instruction to be generated. I've removed these test variants since we have adequate coverage in fast-isel-conversion.ll. This is needed to compile clang with debug+asserts on older powerpc64 and ppc970 targets. Requested by: jhibbits MFC r267982: Add the llvm patch for r267981. MFC r268003: Fix breakage after r267981. Pointy hat to: dim Added: stable/10/contrib/llvm/patches/patch-r267981-llvm-r211435-fix-ppc-fctiduz.diff - copied, changed from r267982, head/contrib/llvm/patches/patch-r267981-llvm-r211435-fix-ppc-fctiduz.diff Modified: stable/10/contrib/llvm/lib/Target/PowerPC/PPCFastISel.cpp Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Added: stable/9/contrib/llvm/patches/patch-r267981-llvm-r211435-fix-ppc-fctiduz.diff - copied, changed from r267982, head/contrib/llvm/patches/patch-r267981-llvm-r211435-fix-ppc-fctiduz.diff Modified: stable/9/contrib/llvm/lib/Target/PowerPC/PPCFastISel.cpp Directory Properties: stable/9/contrib/llvm/ (props changed) Modified: stable/10/contrib/llvm/lib/Target/PowerPC/PPCFastISel.cpp ============================================================================== --- stable/10/contrib/llvm/lib/Target/PowerPC/PPCFastISel.cpp Mon Jun 30 20:24:00 2014 (r268064) +++ stable/10/contrib/llvm/lib/Target/PowerPC/PPCFastISel.cpp Mon Jun 30 20:26:30 2014 (r268065) @@ -1026,6 +1026,10 @@ bool PPCFastISel::SelectFPToI(const Inst if (DstVT != MVT::i32 && DstVT != MVT::i64) return false; + // If we don't have FCTIDUZ and we need it, punt to SelectionDAG. + if (DstVT == MVT::i64 && !IsSigned && !PPCSubTarget.hasFPCVT()) + return false; + Value *Src = I->getOperand(0); Type *SrcTy = Src->getType(); if (!isTypeLegal(SrcTy, SrcVT)) Copied and modified: stable/10/contrib/llvm/patches/patch-r267981-llvm-r211435-fix-ppc-fctiduz.diff (from r267982, head/contrib/llvm/patches/patch-r267981-llvm-r211435-fix-ppc-fctiduz.diff) ============================================================================== --- head/contrib/llvm/patches/patch-r267981-llvm-r211435-fix-ppc-fctiduz.diff Fri Jun 27 20:45:17 2014 (r267982, copy source) +++ stable/10/contrib/llvm/patches/patch-r267981-llvm-r211435-fix-ppc-fctiduz.diff Mon Jun 30 20:26:30 2014 (r268065) @@ -32,7 +32,7 @@ Index: lib/Target/PowerPC/PPCFastISel.cp return false; + // If we don't have FCTIDUZ and we need it, punt to SelectionDAG. -+ if (DstVT == MVT::i64 && !IsSigned && !PPCSubTarget->hasFPCVT()) ++ if (DstVT == MVT::i64 && !IsSigned && !PPCSubTarget.hasFPCVT()) + return false; + Value *Src = I->getOperand(0);