[llvm] [IR] Require that ptrmask mask matches pointer index size (PR #69343)
Alexander Richardson via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 19 11:35:39 PDT 2023
================
@@ -26965,13 +26966,23 @@ 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
-:ref:`the pointer aliasing rules <pointeraliasing>`). If the bitwidth of the
-mask argument does not match the pointer size of the target, the mask is
-zero-extended or truncated accordingly.
+The result of ``ptrmask(%ptr, %mask)`` is equivalent to the following expansion,
+where ``iPtrIdx`` is the index type size of the pointer::
----------------
arichardson wrote:
```suggestion
where ``iPtrIdx`` is the index type size of the pointer:
```
I think this extra ':' is not needed?
https://github.com/llvm/llvm-project/pull/69343
More information about the llvm-commits
mailing list