[libc-commits] [PATCH] D152280: [libc] Add platform independent floating point rounding mode checks.
Michael Jones via Phabricator via libc-commits
libc-commits at lists.llvm.org
Tue Jun 6 13:04:52 PDT 2023
michaelrj added inline comments.
================
Comment at: libc/src/__support/FPUtil/FEnvImpl.h:130
+// Quick free standing get rounding mode based on the above observations.
+LIBC_INLINE int quick_get_round() {
+ static volatile float x = 0x1.0p-24f;
----------------
I like the idea, but I'd like to have a flag to use the old method as well for targets where we're using `-ffastmath` or other optimizations that might precompute this value unexpectedly.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152280/new/
https://reviews.llvm.org/D152280
More information about the libc-commits
mailing list