[PATCH] D59065: Add ptrmask intrinsic
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 8 09:12:09 PDT 2019
fhahn marked an inline comment as done.
fhahn added inline comments.
================
Comment at: llvm/include/llvm/IR/Intrinsics.td:1026
+// is used to access memory.
+def int_ptrmask: Intrinsic<[llvm_anyptr_ty], [llvm_anyptr_ty, llvm_anyint_ty], [IntrNoMem]>;
----------------
jdoerfert wrote:
> Did we think about adding `Returned<0>` to the attribute list? It would most of LLVM simply look through this (as it should).
I think that would indicate that ptrmask is a no-op, right? That would not be true, it potentially changes the bit value of the pointer, e.g. masking out the data in the lowest bits of a tagged pointer.
The intended semantics are that the masking is done in a way that the underlying object the pointer points to is not changed, because it only masks out bits that need to be 0 anyways, when the pointer is used to access memory.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59065/new/
https://reviews.llvm.org/D59065
More information about the llvm-commits
mailing list