[llvm] [IR] Require that ptrmask mask matches pointer index size (PR #69343)

Jessica Clarke via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 18 10:27:18 PDT 2023


================
@@ -26965,10 +26966,20 @@ to facilitate alias analysis and underlying-object detection.
 Semantics:
 """"""""""
 
-The result of ``ptrmask(ptr, mask)`` is equivalent to
-``getelementptr ptr, (ptrtoint(ptr) & mask) - ptrtoint(ptr)``. Both the returned
-pointer(s) and the first argument are based on the same underlying object (for more
-information on the *based on* terminology see
+The result of ``ptrmask(%ptr, %mask)`` is equivalent to the following expansion,
----------------
jrtc27 wrote:

Is this actually true (both before and after)? I would hope that ptrmask does not have the address-exposed semantics that ptrtoint does?

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


More information about the llvm-commits mailing list