Skip to content

Commit

Permalink
[LangRef] add explanatory text for select poison semantics (PR20895)
Browse files Browse the repository at this point in the history
This is copied from the suggested text by @regehr in:
https://bugs.llvm.org/show_bug.cgi?id=20895

The way forward was not clear for several years, but now that we
have 'freeze' and Alive2, the behavior should be documented.
Also see comments in D76332.
  • Loading branch information
rotateright committed Mar 18, 2020
1 parent 30ccc2e commit faba1d0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion llvm/docs/LangRef.rst
Expand Up @@ -3478,9 +3478,12 @@ the ``nsw`` flag.

Poison value behavior is defined in terms of value *dependence*:

- Values other than :ref:`phi <i_phi>` nodes depend on their operands.
- Values other than :ref:`phi <i_phi>` nodes and :ref:`select <i_select>'
instructions depend on their operands.
- :ref:`Phi <i_phi>` nodes depend on the operand corresponding to
their dynamic predecessor basic block.
- Select instructions depend on their condition operand and their
select operand.
- Function arguments depend on the corresponding actual argument values
in the dynamic callers of their functions.
- :ref:`Call <i_call>` instructions depend on the :ref:`ret <i_ret>`
Expand Down

0 comments on commit faba1d0

Please sign in to comment.