[llvm] 904395a - [DAG] SimplifyMultipleUseDemandedBits - add default Depth = 0 argument.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 1 04:34:48 PST 2022
Author: Simon Pilgrim
Date: 2022-02-01T12:34:38Z
New Revision: 904395ab8f832615c2e1903ea8274155dbf8673f
URL: https://github.com/llvm/llvm-project/commit/904395ab8f832615c2e1903ea8274155dbf8673f
DIFF: https://github.com/llvm/llvm-project/commit/904395ab8f832615c2e1903ea8274155dbf8673f.diff
LOG: [DAG] SimplifyMultipleUseDemandedBits - add default Depth = 0 argument.
Simplifies an upcoming change.
Added:
Modified:
llvm/include/llvm/CodeGen/TargetLowering.h
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/CodeGen/TargetLowering.h b/llvm/include/llvm/CodeGen/TargetLowering.h
index e53da0274480a..3861648a5feba 100644
--- a/llvm/include/llvm/CodeGen/TargetLowering.h
+++ b/llvm/include/llvm/CodeGen/TargetLowering.h
@@ -3497,7 +3497,7 @@ class TargetLowering : public TargetLoweringBase {
SDValue SimplifyMultipleUseDemandedBits(SDValue Op, const APInt &DemandedBits,
const APInt &DemandedElts,
SelectionDAG &DAG,
- unsigned Depth) const;
+ unsigned Depth = 0) const;
/// Helper wrapper around SimplifyMultipleUseDemandedBits, demanding all
/// elements.
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 3eff266bc89d4..d5998d166d255 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -2449,7 +2449,7 @@ SDValue SelectionDAG::GetDemandedBits(SDValue V, const APInt &DemandedBits,
switch (V.getOpcode()) {
default:
return TLI->SimplifyMultipleUseDemandedBits(V, DemandedBits, DemandedElts,
- *this, 0);
+ *this);
case ISD::Constant: {
const APInt &CVal = cast<ConstantSDNode>(V)->getAPIntValue();
APInt NewVal = CVal & DemandedBits;
More information about the llvm-commits
mailing list