[Bug rtl-optimization/85811] Invalid optimization with fmax, fabs and nan

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed May 16 21:56:00 GMT 2018


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

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #4)
>     case MAX_EXPR:
>       return RECURSE (op0) || RECURSE (op1);
> 
> This is not true if one is a NAN.

And the reason why it is not true for NAN is simple:
If one of the two arguments is NaN, the value of the other argument is returned


More information about the Gcc-bugs mailing list