Skip to content

Commit aa43577

Browse files
[LangRef] Clarify that selects can have !unpredictable (#162753)
Originally `!unpredictable` could only appear on branches and switches, but now it can also appear on selects. This change updates the LangRef accordingly.
1 parent be93399 commit aa43577

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

llvm/docs/LangRef.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7517,12 +7517,12 @@ sections that the user does not want removed after linking.
75177517
'``unpredictable``' Metadata
75187518
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
75197519

7520-
``unpredictable`` metadata may be attached to any branch or switch
7521-
instruction. It can be used to express the unpredictability of control
7522-
flow. Similar to the ``llvm.expect`` intrinsic, it may be used to alter
7523-
optimizations related to compare and branch instructions. The metadata
7524-
is treated as a boolean value; if it exists, it signals that the branch
7525-
or switch that it is attached to is completely unpredictable.
7520+
``unpredictable`` metadata may be attached to any branch, select, or switch
7521+
instruction. It can be used to express the unpredictability of control flow.
7522+
Similar to the ``llvm.expect`` intrinsic, it may be used to alter optimizations
7523+
related to compare and branch instructions. The metadata is treated as a
7524+
boolean value; if it exists, it signals that the branch, select, or switch that
7525+
it is attached to is completely unpredictable.
75267526

75277527
.. _md_dereferenceable:
75287528

0 commit comments

Comments
 (0)