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

Fabian Ritter via llvm-commits llvm-commits at lists.llvm.org
Mon May 19 05:15:02 PDT 2025


================
@@ -1502,6 +1502,11 @@ enum NodeType {
   // Outputs: [rv], output chain, glue
   PATCHPOINT,
 
+  // PTRADD represents pointer arithmatic semantics, for targets that opt in
+  // using shouldPreservePtrArith().
+  // ptr = PTRADD ptr, offset
+  PTRADD,
----------------
ritter-x2a wrote:

An entry for that [already exists in SelectionDAGCompat](https://github.com/llvm/llvm-project/blob/416b7dfaa0d114b552c596d320f0aaac5651e61e/llvm/include/llvm/Target/GlobalISel/SelectionDAGCompat.td#L63), to generate `V_ADD3_U32_e64` for AMDGPU in GISel via a SelectionDAG rule.

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


More information about the llvm-commits mailing list