[llvm] [LangRef] Clarify the behavior of select with FP poison-generating flags (PR #137131)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 24 01:01:18 PDT 2025
================
@@ -12895,12 +12895,16 @@ vectors of the same size, and the selection is done element by element.
If the condition is an i1 and the value arguments are vectors of the
same size, then an entire vector is selected.
+Note that violations of poison-generating flags for both arms may not result in poison return values.
+For simplicity, if :ref:`fast-math flags <fastmath>` are present, they are only applied to the result, not both arms.
----------------
nikic wrote:
The arguments section already talks about FMF, so it may make sense to add the note there.
I also wonder whether we should specify that the non-value FMF flags (reassoc etc) don't have an effect on select. Or at least, I don't know what they can mean. But this is a separate question...
https://github.com/llvm/llvm-project/pull/137131
More information about the llvm-commits
mailing list