[llvm-dev] Intrinsics InstrReadMem memory properties

Son Tuan VU via llvm-dev llvm-dev at lists.llvm.org
Wed Jul 24 06:20:12 PDT 2019


Hello,

According to include/llvm/IR/Intrinsics.td, InstrReadMem property indicates
that the intrinsic only reads from and does not write to memory.

Does this mean that it can read anywhere in the memory? Because we already
have 'InstrArgMemOnly' for intrinsics which only access memory that its
argument(s) point(s) to.

If 'InstrReadMem' really means read from anywhere in the memory, this
should imply that,  if there's an intrinsic having this property *after* a
dead store, the latter should not be eliminated by optimizations?

This is not the current behavior of LLVM though, so it seems that my
guesses are wrong... But at least, can someone show me the mistake here?

Thanks for your time,

Son Tuan Vu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190724/1ba361bf/attachment-0001.html>


More information about the llvm-dev mailing list