[DAG] SelectionDAG::GetDemandedBits - don't recurse back into GetDemandedBits

Another minor cleanup as we work toward removing GetDemandedBits entirely - call SimplifyMultipleUseDemandedBits directly.
This commit is contained in:
Simon Pilgrim 2022-06-22 12:07:27 +01:00
parent 2f448bf509
commit 2c3a4a9334
1 changed files with 2 additions and 2 deletions

View File

@ -2491,8 +2491,8 @@ SDValue SelectionDAG::GetDemandedBits(SDValue V, const APInt &DemandedBits) {
if (Amt >= DemandedBits.getBitWidth())
break;
APInt SrcDemandedBits = DemandedBits << Amt;
if (SDValue SimplifyLHS =
GetDemandedBits(V.getOperand(0), SrcDemandedBits))
if (SDValue SimplifyLHS = TLI->SimplifyMultipleUseDemandedBits(
V.getOperand(0), SrcDemandedBits, *this))
return getNode(ISD::SRL, SDLoc(V), V.getValueType(), SimplifyLHS,
V.getOperand(1));
}