[llvm] [SelectionDAG] Introduce ISD::PTRADD (PR #140017)
Alexander Richardson via llvm-commits
llvm-commits at lists.llvm.org
Thu May 15 10:53:52 PDT 2025
================
@@ -468,6 +468,11 @@ class TargetMachine {
return false;
}
+ /// True if target has some particular form of dealing with pointer arithmetic
+ /// semantics. False if pointer arithmetic should not be preserved for passes
+ /// such as instruction selection, and can fallback to regular arithmetic.
+ virtual bool shouldPreservePtrArith(const Function &F) const { return false; }
----------------
arichardson wrote:
Passing the base pointer type would be great so it doesn't need to remain a downstream patch. Not sure if this is something AMDGPU would also need?
https://github.com/llvm/llvm-project/pull/140017
More information about the llvm-commits
mailing list