[clang] clang: Add pragma clang fp reciprocal (PR #68267)

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 6 11:03:27 PDT 2023


================
@@ -4609,6 +4609,22 @@ The pragma can take two values: ``on`` and ``off``.
     float v = t + z;
   }
 
+``#pragma clang fp reciprocal`` allows control over using reciprocal
+approximations in floating point expressions. When enabled, this
+pragma allows the expression ``x / y`` to be approximated as ``x *
+(1.0 / y)``.  This pragma can be used to disable reciprocal
+approximation when it is otherwise enabled for the translation unit
+with the ``-fallow-reciprocal`` flag.  The pragma can take two values:
----------------
andykaylor wrote:

```suggestion
with the ``-freciprocal-math`` flag or other fast-math options. The pragma can
take two values:
```

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


More information about the cfe-commits mailing list