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
Dimitry Andric
dim at FreeBSD.org
Mon Jun 30 20:26:31 UTC 2014
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/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)
Changes in other areas also in this revision:
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)
Modified: stable/9/contrib/llvm/lib/Target/PowerPC/PPCFastISel.cpp
==============================================================================
--- stable/9/contrib/llvm/lib/Target/PowerPC/PPCFastISel.cpp Mon Jun 30 20:24:00 2014 (r268064)
+++ stable/9/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/9/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/9/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);
More information about the svn-src-stable-9
mailing list