[llvm] [SelectionDAG] Introduce ISD::PTRADD (PR #140017)
Fabian Ritter via llvm-commits
llvm-commits at lists.llvm.org
Fri May 16 02:29:27 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.
+ virtual bool shouldPreservePtrArith(const Function &F,
+ const EVT &PtrVT) const {
----------------
ritter-x2a wrote:
Moved it to `TargetLoweringBase` and changed the signature to pass the EVT by value in 759f0656a9bc4e50bdc6add4d218b9425120d8cc.
https://github.com/llvm/llvm-project/pull/140017
More information about the llvm-commits
mailing list