https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82153
--- Comment #4 from Arjan van de Ven ---
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 00mulsd 0x0(%rip),%xmm0# 28
27: 00
28: f2
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82153
--- Comment #3 from joseph at codesourcery dot com ---
On Fri, 8 Sep 2017, arjan at linux dot intel.com wrote:
> When a conversion is inexact, a truncated result is returned. If a converted
> result is larger than the maximum signed doubleword i
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82153
--- Comment #2 from Arjan van de Ven ---
When a conversion is inexact, a truncated result is returned. If a converted
result is larger than the maximum signed doubleword integer, the floating-point
invalid exception is raised, and if this excepti
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82153
--- Comment #1 from joseph at codesourcery dot com ---
floor rounds towards -inf. Conversion to int rounds towards 0. That is,
it wouldn't be valid to omit the roundsd because results would be
different for integer arguments. That said, if y