https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81906

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code
             Target|                            |x86_64-*-*, i?86-*-*
           Priority|P3                          |P2
          Component|c++                         |target
   Target Milestone|---                         |7.3

--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
rint () is inlined into an SSE sequence:

void
ix86_expand_rint (rtx operand0, rtx operand1)
{
  /* C code for the stuff we're doing below:
        xa = fabs (operand1);
        if (!isless (xa, 2**52))
          return operand1;
        xa = xa + 2**52 - 2**52;
        return copysign (xa, operand1);
   */

that doesn't work for rounding modes != to-nearest.  Previously we had
the pattern guarded by !flag_trapping_math.  Thus with GCC 6 the bug
persists with -frounding-math -fno-trapping-math.

For ! TARGET_ROUND we need to use ! flag_rounding_math (or fix the code
sequence in case there exists one that works).

Reply via email to