mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-24 05:09:34 +00:00
[ARM] Replace ARMISD::FMIN/FMAX with the shiny new ISD::FMINNAN/FMAXNAN.
NFCI. This removes a custom ISDNode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244590 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ece40fd6d5
commit
17ec8cc90a
@ -941,6 +941,14 @@ ARMTargetLowering::ARMTargetLowering(const TargetMachine &TM,
|
||||
setOperationAction(ISD::FRINT, MVT::f64, Legal);
|
||||
}
|
||||
}
|
||||
|
||||
if (Subtarget->hasVFP3()) {
|
||||
setOperationAction(ISD::FMINNAN, MVT::f32, Legal);
|
||||
setOperationAction(ISD::FMAXNAN, MVT::f32, Legal);
|
||||
setOperationAction(ISD::FMINNAN, MVT::f64, Legal);
|
||||
setOperationAction(ISD::FMAXNAN, MVT::f64, Legal);
|
||||
}
|
||||
|
||||
// We have target-specific dag combine patterns for the following nodes:
|
||||
// ARMISD::VMOVRRD - No need to call setTargetDAGCombine
|
||||
setTargetDAGCombine(ISD::ADD);
|
||||
@ -1138,8 +1146,6 @@ const char *ARMTargetLowering::getTargetNodeName(unsigned Opcode) const {
|
||||
case ARMISD::UMLAL: return "ARMISD::UMLAL";
|
||||
case ARMISD::SMLAL: return "ARMISD::SMLAL";
|
||||
case ARMISD::BUILD_VECTOR: return "ARMISD::BUILD_VECTOR";
|
||||
case ARMISD::FMAX: return "ARMISD::FMAX";
|
||||
case ARMISD::FMIN: return "ARMISD::FMIN";
|
||||
case ARMISD::VMAXNM: return "ARMISD::VMAX";
|
||||
case ARMISD::VMINNM: return "ARMISD::VMIN";
|
||||
case ARMISD::BFI: return "ARMISD::BFI";
|
||||
@ -10170,7 +10176,7 @@ static SDValue PerformSELECT_CCCombine(SDNode *N, SelectionDAG &DAG,
|
||||
!DAG.getTarget().Options.UnsafeFPMath &&
|
||||
!(DAG.isKnownNeverZero(LHS) || DAG.isKnownNeverZero(RHS)))
|
||||
break;
|
||||
Opcode = IsReversed ? ARMISD::FMAX : ARMISD::FMIN;
|
||||
Opcode = IsReversed ? ISD::FMAXNAN : ISD::FMINNAN;
|
||||
break;
|
||||
|
||||
case ISD::SETOGT:
|
||||
@ -10192,7 +10198,7 @@ static SDValue PerformSELECT_CCCombine(SDNode *N, SelectionDAG &DAG,
|
||||
!DAG.getTarget().Options.UnsafeFPMath &&
|
||||
!(DAG.isKnownNeverZero(LHS) || DAG.isKnownNeverZero(RHS)))
|
||||
break;
|
||||
Opcode = IsReversed ? ARMISD::FMIN : ARMISD::FMAX;
|
||||
Opcode = IsReversed ? ISD::FMINNAN : ISD::FMAXNAN;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -174,8 +174,6 @@ namespace llvm {
|
||||
BUILD_VECTOR,
|
||||
|
||||
// Floating-point max and min:
|
||||
FMAX,
|
||||
FMIN,
|
||||
VMAXNM,
|
||||
VMINNM,
|
||||
|
||||
|
@ -587,11 +587,6 @@ def SDTARMVMULL : SDTypeProfile<1, 2, [SDTCisInt<0>, SDTCisInt<1>,
|
||||
def NEONvmulls : SDNode<"ARMISD::VMULLs", SDTARMVMULL>;
|
||||
def NEONvmullu : SDNode<"ARMISD::VMULLu", SDTARMVMULL>;
|
||||
|
||||
def SDTARMFMAX : SDTypeProfile<1, 2, [SDTCisVT<0, f32>, SDTCisSameAs<0, 1>,
|
||||
SDTCisSameAs<0, 2>]>;
|
||||
def NEONfmax : SDNode<"ARMISD::FMAX", SDTARMFMAX>;
|
||||
def NEONfmin : SDNode<"ARMISD::FMIN", SDTARMFMAX>;
|
||||
|
||||
def NEONimmAllZerosV: PatLeaf<(NEONvmovImm (i32 timm)), [{
|
||||
ConstantSDNode *ConstVal = cast<ConstantSDNode>(N->getOperand(0));
|
||||
unsigned EltBits = 0;
|
||||
@ -6343,8 +6338,8 @@ def : N3VSMulOpPat<fmul, fsub, VFMSfd>,
|
||||
Requires<[HasVFP4, UseNEONForFP, UseFusedMAC]>;
|
||||
def : N2VSPat<fabs, VABSfd>;
|
||||
def : N2VSPat<fneg, VNEGfd>;
|
||||
def : N3VSPat<NEONfmax, VMAXfd>;
|
||||
def : N3VSPat<NEONfmin, VMINfd>;
|
||||
def : N3VSPat<fmaxnan, VMAXfd>;
|
||||
def : N3VSPat<fminnan, VMINfd>;
|
||||
def : NVCVTFIPat<fp_to_sint, VCVTf2sd>;
|
||||
def : NVCVTFIPat<fp_to_uint, VCVTf2ud>;
|
||||
def : NVCVTIFPat<sint_to_fp, VCVTs2fd>;
|
||||
|
Loading…
x
Reference in New Issue
Block a user