This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/81916] expansion of rint/nearbyint can simplified under -fno-signed-zeros
- From: "amonakov at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 22 Aug 2017 08:17:43 +0000
- Subject: [Bug middle-end/81916] expansion of rint/nearbyint can simplified under -fno-signed-zeros
- Auto-submitted: auto-generated
- References: <bug-81916-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81916
--- Comment #2 from Alexander Monakov <amonakov at gcc dot gnu.org> ---
I've opened this PR for the -fno-signed-zeros aspect specifically, which the
i386 backend doesn't exploit at all: it expands to
copysign(abs(x)+1.0p52-1.0p52, x).
I think handling these expansions in a generic manner would be right (provided
that costs are checked so target-specific insns are still used if available).