[llvm] [llvm] Support invariant.load on readonly intrinsics (PR #205916)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 5 08:50:44 PDT 2026


================
@@ -12150,11 +12181,8 @@ as the ``MOVNT`` instruction on x86.
 
 The optional ``!invariant.load`` metadata must reference a single
 metadata name ``<empty_node>`` corresponding to a metadata node with no
-entries. If a load instruction tagged with the ``!invariant.load``
-metadata is executed, the memory location referenced by the load has
-to contain the same value at all points in the program where the
-memory location is dereferenceable; otherwise, the behavior is
-undefined.
+entries. See ``invariant.load`` metadata
+:ref:`invariant.load <md_invariant.load>`.
----------------
dtcxzyw wrote:

```suggestion
entries. See :ref:`invariant.load <md_invariant.load>` metadata.
```
`invariant.load` is rendered twice.


https://github.com/llvm/llvm-project/pull/205916


More information about the llvm-commits mailing list