This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: teach simplify_rtx to simplify unordered compares
> > REAL_VALUE_FROM_CONST_DOUBLE (d0, args->op0);
> > REAL_VALUE_FROM_CONST_DOUBLE (d1, args->op1);
> > + if (REAL_VALUE_ISNAN (d0)
> > + || REAL_VALUE_ISNAN (d1))
> > + args->unordered = 1;
> > + else
> > + args->unordered = 0;
>
> This chunk of code seems odd. Is the first set of args->unordered
> really necessary?
I was taking care here for REAL_VALUE_FROM_CONST_DOUBLE possibly causing
an exception.
I agree that I can remove the set in the if, but I did wanted the
unordered test to be in the "possitive" case, since it looks cleaner
and I didn't wanted to put empty statement into then-path.
Honza
>
> --
> - Geoffrey Keating <geoffk@geoffk.org>