Without it we can't recurse further.
/// indicating any elements which may be undef in the output \p UndefElts.
virtual bool isSplatValueForTargetNode(SDValue Op, const APInt &DemandedElts,
APInt &UndefElts,
+ const SelectionDAG &DAG,
unsigned Depth = 0) const;
/// Returns true if the given Opc is considered a canonical constant for the
default:
if (Opcode >= ISD::BUILTIN_OP_END || Opcode == ISD::INTRINSIC_WO_CHAIN ||
Opcode == ISD::INTRINSIC_W_CHAIN || Opcode == ISD::INTRINSIC_VOID)
- return TLI->isSplatValueForTargetNode(V, DemandedElts, UndefElts, Depth);
+ return TLI->isSplatValueForTargetNode(V, DemandedElts, UndefElts, *this,
+ Depth);
break;
}
bool TargetLowering::isSplatValueForTargetNode(SDValue Op,
const APInt &DemandedElts,
APInt &UndefElts,
+ const SelectionDAG &DAG,
unsigned Depth) const {
assert((Op.getOpcode() >= ISD::BUILTIN_OP_END ||
Op.getOpcode() == ISD::INTRINSIC_WO_CHAIN ||
bool X86TargetLowering::isSplatValueForTargetNode(SDValue Op,
const APInt &DemandedElts,
APInt &UndefElts,
+ const SelectionDAG &DAG,
unsigned Depth) const {
unsigned NumElts = DemandedElts.getBitWidth();
unsigned Opc = Op.getOpcode();
}
return TargetLowering::isSplatValueForTargetNode(Op, DemandedElts, UndefElts,
- Depth);
+ DAG, Depth);
}
// Helper to peek through bitops/trunc/setcc to determine size of source vector.
bool PoisonOnly, bool ConsiderFlags, unsigned Depth) const override;
bool isSplatValueForTargetNode(SDValue Op, const APInt &DemandedElts,
- APInt &UndefElts,
+ APInt &UndefElts, const SelectionDAG &DAG,
unsigned Depth) const override;
bool isTargetCanonicalConstantNode(SDValue Op) const override {