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

--- Comment #4 from Arjan van de Ven <arjan at linux dot intel.com> ---
btw gcc has no issue with just generating cvttsd2si


int roundme2(double A)
{
        return A * 4.3;
}

generates

 20:   f2 0f 59 05 00 00 00    mulsd  0x0(%rip),%xmm0        # 28
<roundme2+0x8>
  27:   00
  28:   f2 0f 2c c0             cvttsd2si %xmm0,%eax
  2c:   c3                      retq


so maybe the real missed optimization is a trunc() followed by
assign-to-integer as a general thing

Reply via email to