[Bug target/96793] __builtin_floor produces wrong result when rounding direction is FE_DOWNWARD
chfast at gmail dot com
gcc-bugzilla@gcc.gnu.org
Fri Aug 28 14:06:30 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96793
--- Comment #15 from Paweł Bylica <chfast at gmail dot com> ---
(In reply to Marc Glisse from comment #14)
> (In reply to Marc Glisse from comment #13)
> > if (HONOR_SIGNED_ZEROS (mode))
> > x2 = copysign (x2, x);
>
> Hmm, I misread the comment, sorry. We already do that, for both floor and
> ceil. But we don't use a true copysign, we use ix86_sse_copysign_to_positive
> which won't be able to change the sign from - to +. Just changing it to a
> true copysign (one extra and or andn) should be enough then?
Yes, having full copysign should do the job.
More information about the Gcc-bugs
mailing list