[llvm] [SelectionDAG] Introduce ISD::PTRADD (PR #140017)

Fabian Ritter via llvm-commits llvm-commits at lists.llvm.org
Tue May 20 00:32:20 PDT 2025


================
@@ -1729,6 +1734,10 @@ inline bool isExtVecInRegOpcode(unsigned Opcode) {
          Opcode == ISD::SIGN_EXTEND_VECTOR_INREG;
 }
 
+inline bool isPtrAdd(unsigned Opcode) {
+  return (Opcode == ISD::ADD) || (Opcode == ISD::PTRADD);
+}
----------------
ritter-x2a wrote:

Moved it to SDNode/SDValue like `isUndef`, and renamed it to `isAnyAdd` (as that name captures the semantics best to me).

https://github.com/llvm/llvm-project/pull/140017


More information about the llvm-commits mailing list