llvm::TargetLowering::getRecipEstimate

Return a reciprocal estimate for the input operand, or an empty value if unsupported.

Synopsis

Declared in <llvm/CodeGen/TargetLowering.h>

virtual
SDValue
getRecipEstimate(
    SDValue Operand,
    SelectionDAG& DAG,
    int Enabled,
    int& RefinementSteps) const;

Description

Return a reciprocal estimate value for the input operand.

Enabled is a ReciprocalEstimate enum with value either 'Unspecified' or 'Enabled' as set by a potential default override attribute. If RefinementSteps is 'Unspecified', the number of Newton-Raphson refinement iterations required to generate a sufficient (though not necessarily IEEE-754 compliant) estimate is returned in that parameter. A target may choose to implement its own refinement within this function. If that's true, then return '0' as the number of RefinementSteps to avoid any further refinement of the estimate. An empty SDValue return means no estimate sequence can be created.

Return Value

A reciprocal estimate for the input operand, or an empty value if unsupported.

Parameters

NameDescription
OperandInput operand to the estimate.
DAGSelectionDAG providing context.
EnabledWhether reciprocal estimates are enabled.
RefinementStepsNR refinement step count.