[llvm] [SelectionDAG] Introduce ISD::PTRADD (PR #140017)
Fabian Ritter via llvm-commits
llvm-commits at lists.llvm.org
Mon May 19 05:51:47 PDT 2025
================
@@ -5641,7 +5641,8 @@ bool SelectionDAG::isADDLike(SDValue Op, bool NoWrap) const {
bool SelectionDAG::isBaseWithConstantOffset(SDValue Op) const {
return Op.getNumOperands() == 2 && isa<ConstantSDNode>(Op.getOperand(1)) &&
- (Op.getOpcode() == ISD::ADD || isADDLike(Op));
+ (Op.getOpcode() == ISD::ADD || Op.getOpcode() == ISD::PTRADD ||
----------------
ritter-x2a wrote:
Added `ISD::isPtrAdd` to ISDOpcodes.h, where there are similar opcode predicates, in 2ccad11fe32f3fbed04c0944d7119fda9c9387e8.
https://github.com/llvm/llvm-project/pull/140017
More information about the llvm-commits
mailing list