[PATCH] D60486: [AArch64] Add support for MTE intrinsics

Momchil Velikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 9 01:31:37 PDT 2019


chill added inline comments.


================
Comment at: llvm/trunk/include/llvm/IR/IntrinsicsAArch64.td:692
+def int_aarch64_irg   : Intrinsic<[llvm_ptr_ty], [llvm_ptr_ty, llvm_i64_ty],
+    [IntrInaccessibleMemOnly]>;
+def int_aarch64_addg  : Intrinsic<[llvm_ptr_ty], [llvm_ptr_ty, llvm_i64_ty],
----------------
eugenis wrote:
> Sorry for such a late question.
> Why is IRG not IntrNoMem? Does this model the fact that it updates the internal state of the RNG in the CPU?
> 
> It is not covered by tests.
> 
`IntrNoMem` would be incorrect, as that means also no side effects whatsoever, and `IRG` potentially has side effects.
On the other hand it, in fact does not modify memory, so `IntrInaccessibleMemOnly` is pessimistic and I can't see how being pessimistic in this case ensures correctness (the only good reason for being pessimistic IMHO).
The spot on attribute would be `IntrHasSideEffects`.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60486/new/

https://reviews.llvm.org/D60486





More information about the llvm-commits mailing list