mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-22 02:05:01 +00:00
Make more of the lowering helpers static. Also use MVT instead of EVT in a couple places.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188629 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
70f6b36c30
commit
ff79bc6e18
@ -5253,9 +5253,8 @@ static SDValue getVShift(bool isLeft, EVT VT, SDValue SrcOp,
|
||||
TLI.getScalarShiftAmountTy(SrcOp.getValueType()))));
|
||||
}
|
||||
|
||||
SDValue
|
||||
X86TargetLowering::LowerAsSplatVectorLoad(SDValue SrcOp, EVT VT, SDLoc dl,
|
||||
SelectionDAG &DAG) const {
|
||||
static SDValue
|
||||
LowerAsSplatVectorLoad(SDValue SrcOp, MVT VT, SDLoc dl, SelectionDAG &DAG) {
|
||||
|
||||
// Check if the scalar load can be widened into a vector load. And if
|
||||
// the address is "base + cst" see if the cst can be "absorbed" into
|
||||
@ -8829,8 +8828,8 @@ static SDValue LowerAVXExtend(SDValue Op, SelectionDAG &DAG,
|
||||
return DAG.getNode(ISD::CONCAT_VECTORS, dl, VT, OpLo, OpHi);
|
||||
}
|
||||
|
||||
SDValue X86TargetLowering::LowerANY_EXTEND(SDValue Op,
|
||||
SelectionDAG &DAG) const {
|
||||
static SDValue LowerANY_EXTEND(SDValue Op, const X86Subtarget *Subtarget,
|
||||
SelectionDAG &DAG) {
|
||||
if (Subtarget->hasFp256()) {
|
||||
SDValue Res = LowerAVXExtend(Op, DAG, Subtarget);
|
||||
if (Res.getNode())
|
||||
@ -8839,8 +8838,9 @@ SDValue X86TargetLowering::LowerANY_EXTEND(SDValue Op,
|
||||
|
||||
return SDValue();
|
||||
}
|
||||
SDValue X86TargetLowering::LowerZERO_EXTEND(SDValue Op,
|
||||
SelectionDAG &DAG) const {
|
||||
|
||||
static SDValue LowerZERO_EXTEND(SDValue Op, const X86Subtarget *Subtarget,
|
||||
SelectionDAG &DAG) {
|
||||
SDLoc DL(Op);
|
||||
MVT VT = Op.getSimpleValueType();
|
||||
SDValue In = Op.getOperand(0);
|
||||
@ -10248,11 +10248,10 @@ SDValue X86TargetLowering::LowerSELECT(SDValue Op, SelectionDAG &DAG) const {
|
||||
return DAG.getNode(X86ISD::CMOV, DL, VTs, Ops, array_lengthof(Ops));
|
||||
}
|
||||
|
||||
SDValue X86TargetLowering::LowerSIGN_EXTEND_AVX512(SDValue Op,
|
||||
SelectionDAG &DAG) const {
|
||||
EVT VT = Op->getValueType(0);
|
||||
static SDValue LowerSIGN_EXTEND_AVX512(SDValue Op, SelectionDAG &DAG) {
|
||||
MVT VT = Op->getSimpleValueType(0);
|
||||
SDValue In = Op->getOperand(0);
|
||||
EVT InVT = In.getValueType();
|
||||
MVT InVT = In.getSimpleValueType();
|
||||
SDLoc dl(Op);
|
||||
|
||||
if (InVT.getVectorElementType().getSizeInBits() >=8 &&
|
||||
@ -10267,7 +10266,8 @@ SDValue X86TargetLowering::LowerSIGN_EXTEND_AVX512(SDValue Op,
|
||||
Constant *C =
|
||||
ConstantInt::get(*DAG.getContext(),
|
||||
(NumElts == 8)? APInt(64, ~0ULL): APInt(32, ~0U));
|
||||
SDValue CP = DAG.getConstantPool(C, getPointerTy());
|
||||
const TargetLowering &TLI = DAG.getTargetLoweringInfo();
|
||||
SDValue CP = DAG.getConstantPool(C, TLI.getPointerTy());
|
||||
unsigned Alignment = cast<ConstantPoolSDNode>(CP)->getAlignment();
|
||||
SDValue Ld = DAG.getLoad(VT.getScalarType(), dl, DAG.getEntryNode(), CP,
|
||||
MachinePointerInfo::getConstantPool(),
|
||||
@ -10278,8 +10278,8 @@ SDValue X86TargetLowering::LowerSIGN_EXTEND_AVX512(SDValue Op,
|
||||
return SDValue();
|
||||
}
|
||||
|
||||
SDValue X86TargetLowering::LowerSIGN_EXTEND(SDValue Op,
|
||||
SelectionDAG &DAG) const {
|
||||
static SDValue LowerSIGN_EXTEND(SDValue Op, const X86Subtarget *Subtarget,
|
||||
SelectionDAG &DAG) {
|
||||
MVT VT = Op->getSimpleValueType(0);
|
||||
SDValue In = Op->getOperand(0);
|
||||
MVT InVT = In.getSimpleValueType();
|
||||
@ -12958,9 +12958,9 @@ SDValue X86TargetLowering::LowerOperation(SDValue Op, SelectionDAG &DAG) const {
|
||||
case ISD::SINT_TO_FP: return LowerSINT_TO_FP(Op, DAG);
|
||||
case ISD::UINT_TO_FP: return LowerUINT_TO_FP(Op, DAG);
|
||||
case ISD::TRUNCATE: return LowerTRUNCATE(Op, DAG);
|
||||
case ISD::ZERO_EXTEND: return LowerZERO_EXTEND(Op, DAG);
|
||||
case ISD::SIGN_EXTEND: return LowerSIGN_EXTEND(Op, DAG);
|
||||
case ISD::ANY_EXTEND: return LowerANY_EXTEND(Op, DAG);
|
||||
case ISD::ZERO_EXTEND: return LowerZERO_EXTEND(Op, Subtarget, DAG);
|
||||
case ISD::SIGN_EXTEND: return LowerSIGN_EXTEND(Op, Subtarget, DAG);
|
||||
case ISD::ANY_EXTEND: return LowerANY_EXTEND(Op, Subtarget, DAG);
|
||||
case ISD::FP_TO_SINT: return LowerFP_TO_SINT(Op, DAG);
|
||||
case ISD::FP_TO_UINT: return LowerFP_TO_UINT(Op, DAG);
|
||||
case ISD::FP_EXTEND: return LowerFP_EXTEND(Op, DAG);
|
||||
|
@ -839,8 +839,6 @@ namespace llvm {
|
||||
bool isSigned,
|
||||
bool isReplace) const;
|
||||
|
||||
SDValue LowerAsSplatVectorLoad(SDValue SrcOp, EVT VT, SDLoc dl,
|
||||
SelectionDAG &DAG) const;
|
||||
SDValue LowerBUILD_VECTOR(SDValue Op, SelectionDAG &DAG) const;
|
||||
SDValue LowerBUILD_VECTORvXi1(SDValue Op, SelectionDAG &DAG) const;
|
||||
SDValue LowerVECTOR_SHUFFLE(SDValue Op, SelectionDAG &DAG) const;
|
||||
@ -860,11 +858,6 @@ namespace llvm {
|
||||
SDValue LowerUINT_TO_FP_i32(SDValue Op, SelectionDAG &DAG) const;
|
||||
SDValue lowerUINT_TO_FP_vec(SDValue Op, SelectionDAG &DAG) const;
|
||||
SDValue LowerTRUNCATE(SDValue Op, SelectionDAG &DAG) const;
|
||||
SDValue LowerZERO_EXTEND(SDValue Op, SelectionDAG &DAG) const;
|
||||
SDValue LowerZERO_EXTEND_AVX512(SDValue Op, SelectionDAG &DAG) const;
|
||||
SDValue LowerSIGN_EXTEND(SDValue Op, SelectionDAG &DAG) const;
|
||||
SDValue LowerSIGN_EXTEND_AVX512(SDValue Op, SelectionDAG &DAG) const;
|
||||
SDValue LowerANY_EXTEND(SDValue Op, SelectionDAG &DAG) const;
|
||||
SDValue LowerFP_TO_SINT(SDValue Op, SelectionDAG &DAG) const;
|
||||
SDValue LowerFP_TO_UINT(SDValue Op, SelectionDAG &DAG) const;
|
||||
SDValue LowerFABS(SDValue Op, SelectionDAG &DAG) const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user