Wordsmith the semantics of invariant.load
authorEvgeniy Brevnov <ybrevnov@azul.com>
Thu, 22 Apr 2021 03:04:49 +0000 (10:04 +0700)
committerEvgeniy Brevnov <ybrevnov@azul.com>
Thu, 22 Apr 2021 03:06:13 +0000 (10:06 +0700)
Don't phrase the semantics in terms of the optimizer.  Instead have a
more straightforward execution based semantic.

Reviewed By: ebrevnov

Differential Revision: https://reviews.llvm.org/D63439

llvm/docs/LangRef.rst

index 9d00f4c..e6760f8 100644 (file)
@@ -9639,10 +9639,10 @@ 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 optimizer may assume the memory location
-referenced by the load contains the same value at all points in the
-program where the memory location is known to be dereferenceable;
-otherwise, the behavior is undefined.
+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.
 
 The optional ``!invariant.group`` metadata must reference a single metadata name
  ``<empty_node>`` corresponding to a metadata node with no entries.