[PATCH] D44216: [LangRef] make it clear that FP instructions do not have side effects

Andy Kaylor via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 7 09:51:12 PST 2018


andrew.w.kaylor added a comment.

Thanks for taking the initiative on this!



================
Comment at: docs/LangRef.rst:3047
+The LLVM floating-point opcodes assume default exception handling.
+There is no possibility of trapping with any of these instructions.
+Therefore, we return a NaN constant value in both cases. This is
----------------
I don't like the wording, "There is no possibility of trapping...." Strictly speaking, if the user code has unmasked FP exceptions (in spite of not telling us via FENV_ACCESS that they intended to) it is possible that these will trap. More to the point is that the optimizer assumes no trapping.


================
Comment at: docs/LangRef.rst:6400
 The value produced is the floating-point sum of the two operands.
+This instruction can not trap or have any other side effects.
 This instruction can also take any number of :ref:`fast-math
----------------
Again, I'd suggest "can not trap or have any other side effects" -> "is assumed not to trap or have any other side effects"


https://reviews.llvm.org/D44216





More information about the llvm-commits mailing list