[PATCH] middle-end: add real_isfinite function

Richard Guenther richard.guenther@gmail.com
Tue Jun 12 19:00:00 GMT 2007


On 6/12/07, Kaveh R. GHAZI <ghazi@caip.rutgers.edu> wrote:
> This patch is a cleanup, it adds a function to real.c to do isfinite.
> It allows me to replace lots of "isinf||isnan" and "!isinf&&!isnan"
> with calls to this one function, which is more readable IMHO.  E.g.:
>
> -      if (!real_isnan (ra1) && !real_isinf (ra1)
> -         && !real_isnan (ra2) && !real_isinf (ra2)
> -         && !real_isnan (ra3) && !real_isinf (ra3))
> +      if (real_isfinite (ra1) && real_isfinite (ra2) && real_isfinite (ra3))
>
> Tested on sparc-sun-solaris2.10, no regressions.
>
> Okay for mainline?

This is ok.

Thanks,
Richard.

>                 Thanks,
>                 --Kaveh
>
>
> 2007-06-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
>
>         * real.c (real_isfinite): New.
>         (real_sqrt): Use it.
>         * real.h (real_isfinite): New.
>         * builtins.c: Use it.



More information about the Gcc-patches mailing list