summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/docs/AliasAnalysis.rst2
-rw-r--r--llvm/docs/LangRef.rst10
2 files changed, 11 insertions, 1 deletions
diff --git a/llvm/docs/AliasAnalysis.rst b/llvm/docs/AliasAnalysis.rst
index 02b749ffb91..e201333f300 100644
--- a/llvm/docs/AliasAnalysis.rst
+++ b/llvm/docs/AliasAnalysis.rst
@@ -136,7 +136,7 @@ be overlapping in some way, but do not start at the same address.
The ``MustAlias`` response may only be returned if the two memory objects are
guaranteed to always start at exactly the same location. A ``MustAlias``
-response implies that the pointers compare equal.
+response does not imply that the pointers compare equal.
The ``getModRefInfo`` methods
-----------------------------
diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst
index c65c9eef776..1d0b9068d31 100644
--- a/llvm/docs/LangRef.rst
+++ b/llvm/docs/LangRef.rst
@@ -5121,6 +5121,16 @@ Examples:
!0 = !{!"magic ptr"}
!1 = !{!"other ptr"}
+The invariant.group metadata must be dropped when replacing one pointer by
+another based on aliasing information. This is because invariant.group is tied
+to the SSA value of the pointer operand.
+
+.. code-block:: llvm
+ %v = load i8, i8* %x, !invariant.group !0
+ ; if %x mustalias %y then we can replace the above instruction with
+ %v = load i8, i8* %y
+
+
'``type``' Metadata
^^^^^^^^^^^^^^^^^^^
OpenPOWER on IntegriCloud