[PATCH]: Add some folding of builtins fmin/fmax

Kaveh R. GHAZI ghazi@caip.rutgers.edu
Sat Nov 25 18:19:00 GMT 2006


On Sat, 25 Nov 2006, Andrew Pinski wrote:

> > +      /* If either argument is NaN, return the other one.  */
> > +      if (TREE_CODE (arg0) == REAL_CST && real_isnan (&TREE_REAL_CST (arg0)))
> > +	return fold_convert (type, arg1);
> > +      else
> > +	if (TREE_CODE (arg1) == REAL_CST && real_isnan (&TREE_REAL_CST (arg1)))
> > +	  return fold_convert (type, arg0);
>
> Shouldn't these be using omit_one_operand?

Can a REAL_CST have side-effects?

--
Kaveh R. Ghazi			ghazi@caip.rutgers.edu



More information about the Gcc-patches mailing list