This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]