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

Fabian Ritter via llvm-commits llvm-commits at lists.llvm.org
Fri May 16 02:27:43 PDT 2025


================
@@ -469,9 +470,13 @@ class TargetMachine {
   }
 
   /// 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; }
+  /// semantics for pointers with the given value type. False if pointer
+  /// arithmetic should not be preserved for passes such as instruction
+  /// selection, and can fallback to regular arithmetic.
----------------
ritter-x2a wrote:

Added the comment in 759f0656a9bc4e50bdc6add4d218b9425120d8cc.

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


More information about the llvm-commits mailing list