[PATCH] D21121: IR: Introduce llvm.type.checked.load intrinsic.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 9 12:30:04 PST 2023


pcc added inline comments.


================
Comment at: llvm/trunk/include/llvm/IR/Intrinsics.td:673
+                                      [llvm_ptr_ty, llvm_i32_ty, llvm_metadata_ty],
+                                      [IntrNoMem]>;
+
----------------
nikic wrote:
> Why is this intrinsic marked as IntrNoMem? LangRef says it's supposed to be ArgMemOnly + ReadOnly, and that's what I'd normally expect from a load-like intrinsic...
You're right, it should technically be `argmemonly readonly`. I guess this never came up because it only makes sense to use this intrinsic to load from constant data structures (i.e. vtables), so it acts as a pure function mapping from pointers to pointers, just like a `readnone` intrinsic.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D21121



More information about the llvm-commits mailing list