[llvm] [InferAddressSpaces] Handle unconverted ptrmask (PR #140802)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 24 20:46:36 PDT 2025
================
@@ -151,6 +152,54 @@ class TargetTransformInfoImplBase {
}
virtual bool isNoopAddrSpaceCast(unsigned, unsigned) const { return false; }
+
+ // Given an address space cast of the given pointer value, calculate the known
+ // bits of the source pointer in the source addrspace and the destination
+ // pointer in the destination addrspace.
+ virtual std::pair<KnownBits, KnownBits>
+ computeKnownBitsAddrSpaceCast(unsigned FromAS, unsigned ToAS,
+ const Value &PtrOp) const {
+ if (DL.isNonIntegralAddressSpace(FromAS))
----------------
arsenm wrote:
Either remove the FromAS parameter, or assert the address space of PtrOp matches FromAS
https://github.com/llvm/llvm-project/pull/140802
More information about the llvm-commits
mailing list