This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/81906] [7/8 Regression] Calls to rint() wrongly optimized away starting in g++ 6
- From: "joseph at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 21 Aug 2017 14:30:27 +0000
- Subject: [Bug target/81906] [7/8 Regression] Calls to rint() wrongly optimized away starting in g++ 6
- Auto-submitted: auto-generated
- References: <bug-81906-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81906
--- Comment #10 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
A correct (for -frounding-math) SSE sequence would (for arguments with
absolute value < 2**52) add and subtract 2**52 for a positive operand,
-2**52 for a negative operand. Then it would need to copy the sign of the
original operand to the result to ensure zero results get the correct sign
in all cases.