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 Tue, 14 Nov 2006, Kaveh R. GHAZI wrote:
> I'm not able to implement Roger's more elaborate solution here:
> http://gcc.gnu.org/ml/gcc-patches/2006-11/msg00665.html

Not to worry.  That's a longer term plan, and if anything this
patch gets us a big step closer.


> 2006-11-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
>
> 	* builtins.c (integer_valued_real_p): Handle fmin/fmax.
> 	(fold_builtin_fmin_fmax): New.
> 	(fold_builtin_1): Use it.
>
> 	* gcc.dg/builtins-20.c: Add fmin/fmax cases.
> 	* gcc.dg/torture/builtin-minmax-1.c: New.

This is OK for mainline.

I'm sure you've already got it queued, but you can now easily add
fmin(x,NaN) -> x and fmin(NaN,y) -> y to your new fold_builtin_fmin_fmax.

Roger
--


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