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

Fabian Ritter via llvm-commits llvm-commits at lists.llvm.org
Wed May 21 01:43:56 PDT 2025


================
@@ -2617,6 +2620,85 @@ SDValue DAGCombiner::foldSubToAvg(SDNode *N, const SDLoc &DL) {
   return SDValue();
 }
 
+/// Try to fold a pointer arithmetic node.
----------------
ritter-x2a wrote:

I could add a CLI option to enable PTRADD generation for AMDGPU (for bring-up only, to be removed such that PTRADDs are always used there once the regressions in all the other tests are resolved) and make a PR with the DAGCombine changes and AMDGPU tests that use that option. What do you think?

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


More information about the llvm-commits mailing list