llvm::TargetLowering::ComputeNumSignBitsForTargetNode

Return the number of known sign bits for a target-specific SelectionDAG node.

Synopsis

Declared in <llvm/CodeGen/TargetLowering.h>

virtual
unsigned int
ComputeNumSignBitsForTargetNode(
    SDValue Op,
    APInt const& DemandedElts,
    SelectionDAG const& DAG,
    unsigned int Depth = 0) const;

Description

This method can be implemented by targets that want to expose additional information about sign bits to the DAG Combiner. The DemandedElts argument allows us to only collect the minimum sign bits that are shared by the requested vector elements.

Return Value

The number of known sign bits for a target-specific SelectionDAG node.

Parameters

NameDescription
OpSDNode or value being queried.
DemandedEltsMask of vector elements that are demanded.
DAGSelectionDAG providing context.
DepthRecursion depth limit for the analysis.