Index: docs/LangRef.rst =================================================================== --- docs/LangRef.rst +++ docs/LangRef.rst @@ -2181,6 +2181,13 @@ operations relative to non-volatile operations. This is not Java's "volatile" and has no cross-thread synchronization behavior. +A volatile load or store may access addresses which do not point to memory +(for example, MMIO registers). Unlike a non-volatile load or store, these +operations may have side-effects. However, an access to an address which +does not point to memory must not modify any memory that is accessible by +the module being compiled, and the compiler may assume volatile operations +do not trap. + IR-level volatile loads and stores cannot safely be optimized into llvm.memcpy or llvm.memmove intrinsics even when those intrinsics are flagged volatile. Likewise, the backend should never split or merge