[libc-commits] [PATCH] D117590: [libc] Implement correct rounding with all rounding modes for hypot functions.

Paul Zimmermann via libc-commits libc-commits at lists.llvm.org
Tue Jan 25 04:57:51 PST 2022


       Dear Tue,

> I have also tried replacing the final get_round with the corresponding floating point operations, but for some reason, -O3 always partially optimized it away even with -frounding-math flag together, and that make the results incorrect.
> If I change the flag to -O2, then it is correct, but I see virtually no performance improvement.  So I decided to keep the get_round() at the end so that it is easier to read and less sensitive to optimization flags.

this might be a compiler bug, since -frounding-math should be supported
whatever the optimization level (-O2 or -O3). You might want to investigate
further and report the bug if any.

Best regards,
Paul


More information about the libc-commits mailing list