https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91709
--- Comment #2 from joseph at codesourcery dot com <joseph at codesourcery dot com> --- If the result of multiplying by 1.5 is outside the range of the integer type, the version with multiplication is required to raise the FE_INVALID exception for the out-of-range conversion to integer, so the transformation is not valid with -ftrapping-math (which is on by default). Note also that the transformation would not be valid when the constant is 1.5f (generally, any case where the types / values involved mean the conversion from integer to floating, or the multiplication, might not be exact in the floating-point type).