[llvm] [SelectionDAG] Introduce ISD::PTRADD (PR #140017)
Fabian Ritter via llvm-commits
llvm-commits at lists.llvm.org
Mon May 19 05:32:58 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:
Currently, this PR just changes this to
```
def ptradd : SDNode<"ISD::PTRADD" , SDTPtrAddOp, []>;
```
When looking through the related code, I didn't have the impression that it mattered to the use in GlobalISel what the SDAG node here is, changing it to `ISD::PTRADD` at least doesn't break the test for the `V_ADD3_U32_e64` matching.
https://github.com/llvm/llvm-project/pull/140017
More information about the llvm-commits
mailing list