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, middle-end]: Convert (int)logb() into ilogb().


On Thu, 18 Jun 2009, Uros Bizjak wrote:

> Hello!
> 
> Just an old middle-end patch I have found while cleaning my patch
> archive. While it uses old infrastructure for conversion, it actually
> converts in the same way as e.g. (long)round(d) -> lround(d) a couple
> of lines above.
> 
> While  this particular conversion does its job pretty well, I'm not
> interested in fixing the conversion infrastructure itself. This can be
> fixed in future for all FP->int functions, including newly introduced
> ilogb conversion.
> 
> 2009-06-18  Uros Bizjak  <ubizjak@gmail.com>
> 
> 	* convert.c (convert_to_integer): Convert (int)logb() into ilogb().
> 
> testsuite/ChangeLog:
> 
> 2009-06-18  Uros Bizjak  <ubizjak@gmail.com>
> 
> 	* gcc.dg/builtins-65.c: New test.
> 
> The patch was bootstrapped and regression tested on
> x86_64-pc-linuc-gnu. OK for mainline?

I think in addition of testing flag_unsafe_math_optimizations you
should test !flag_trapping_math and !flag_math_errno and 
flag_finite_math_only (basically for -ffast-math which we do not
have a single flag for).

Ok with that change.

Thanks,
Richard.


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