[clang] [llvm] Implement operand bundles for floating-point operations (PR #109798)

Andy Kaylor via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 26 15:57:10 PDT 2024


================
@@ -2994,6 +2994,29 @@ A "convergencectrl" operand bundle is only valid on a ``convergent`` operation.
 When present, the operand bundle must contain exactly one value of token type.
 See the :doc:`ConvergentOperations` document for details.
 
+.. _ob_fpe:
+
+Floating-point Environment Operand Bundles
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+These operand bundles provide details on how the operation interacts with the
+:ref:`floating-point environment <_floatenv>`. There are two kinds of such
+operand bundles, which characterize interaction with floating-point control
+modes and status bits.
----------------
andykaylor wrote:

> more exotic target-specific stuff (e.g., x87's precision control bit)

For anyone who doesn't think FTZ complicates their life enough.....

We seem to be currently taking the position that FTZ/DAZ is outside the scope of the IR semantics, though I may have mentioned that I'm not entirely happy with that. An even stronger case could be made for pretending the x87 precision control doesn't exist. We have IR types for binary32, binary64, and x86_fp80. It wouldn't be entirely unreasonable to say that the behavior of the latter is unspecified if the precision control bit is changed. I'm not sure there's a realistic use case for dynamically changing the precision control, and clang already avoids using the x86_fp80 type on Windows, where the default setting isn't 80-bit. I guess someone could have legacy code that does it.

https://github.com/llvm/llvm-project/pull/109798


More information about the llvm-commits mailing list