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

--- Comment #4 from joseph at codesourcery dot com <joseph at codesourcery dot 
com> ---
On Wed, 24 Aug 2016, ktkachov at gcc dot gnu.org wrote:

> int f4(float x) { return (1.0f / x) < 0.0f; }         // -> x < 0.0f

Requires -fno-trapping-math, as this could lose an overflow or underflow 
from the division (but provided subnormals are supported, it can't 
underflow to zero for IEEE types).

> int f5(float x) { return (x / 2.0f) <= 0.0f; }        // -> x <= 0.0f

Requires -funsafe-math-optimizations or similar; this is not a correct 
transformation for the least positive subnormal.  (In principle, given 
-fno-rounding-math -fno-trapping-math, you could convert this to x <= 
FLT_TRUE_MIN and be correct.)

Reply via email to