[llvm] 2c3a4a9 - [DAG] SelectionDAG::GetDemandedBits - don't recurse back into GetDemandedBits
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 22 05:49:07 PDT 2022
Author: Simon Pilgrim
Date: 2022-06-22T13:48:57+01:00
New Revision: 2c3a4a9334ea0881e79644ed9c25dde442ec22d2
URL: https://github.com/llvm/llvm-project/commit/2c3a4a9334ea0881e79644ed9c25dde442ec22d2
DIFF: https://github.com/llvm/llvm-project/commit/2c3a4a9334ea0881e79644ed9c25dde442ec22d2.diff
LOG: [DAG] SelectionDAG::GetDemandedBits - don't recurse back into GetDemandedBits
Another minor cleanup as we work toward removing GetDemandedBits entirely - call SimplifyMultipleUseDemandedBits directly.
Added:
Modified:
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index c2820c1c9902..213874fb4933 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -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));
}
More information about the llvm-commits
mailing list