forked from OSchip/llvm-project
[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:
parent
2f448bf509
commit
2c3a4a9334
|
@ -2491,8 +2491,8 @@ SDValue SelectionDAG::GetDemandedBits(SDValue V, const APInt &DemandedBits) {
|
||||||
if (Amt >= DemandedBits.getBitWidth())
|
if (Amt >= DemandedBits.getBitWidth())
|
||||||
break;
|
break;
|
||||||
APInt SrcDemandedBits = DemandedBits << Amt;
|
APInt SrcDemandedBits = DemandedBits << Amt;
|
||||||
if (SDValue SimplifyLHS =
|
if (SDValue SimplifyLHS = TLI->SimplifyMultipleUseDemandedBits(
|
||||||
GetDemandedBits(V.getOperand(0), SrcDemandedBits))
|
V.getOperand(0), SrcDemandedBits, *this))
|
||||||
return getNode(ISD::SRL, SDLoc(V), V.getValueType(), SimplifyLHS,
|
return getNode(ISD::SRL, SDLoc(V), V.getValueType(), SimplifyLHS,
|
||||||
V.getOperand(1));
|
V.getOperand(1));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue