[llvm] Base with add like constant offset (PR #88493)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 12 04:18:18 PDT 2024
================
@@ -5191,6 +5191,9 @@ bool SelectionDAG::isADDLike(SDValue Op) const {
}
bool SelectionDAG::isBaseWithConstantOffset(SDValue Op) const {
----------------
RKSimon wrote:
Can we not just simplify this function to:
```
bool SelectionDAG::isBaseWithConstantOffset(SDValue Op) const {
return (Op.getOpcode() == ISD::ADD || isADDLike(Op)) &&
isa<ConstantSDNode>(Op.getOperand(1));
}
```
https://github.com/llvm/llvm-project/pull/88493
More information about the llvm-commits
mailing list