Activate -mrecip with -ffast-math?

Richard Guenther richard.guenther@gmail.com
Mon Jun 18 10:16:00 GMT 2007


On 6/17/07, Uros Bizjak <ubizjak@gmail.com> wrote:
> Hello!
>
> > I was wondering if there are objects to automatically activating Uros'
> > new -mrecip flag when -ffast-math is specified. It looks like a good
> > match since -mrecip is exactly about fast non-precise mathematics.
>
> There is a discussion in gcc-patches@ mailing list about this topic, in
> "Re: [PATCH, middle-end, i386]: reciprocal rsqrt pass + full recip x86
> backend support" thread [1]. The main problem is, that one of the
> polyhedron tests segfaults with this patch (not the problem of the recip
> patch, but usage of questionable FP equivalence tests and FP indexes in
> the array).

Of course there are cases with every optimization enabled by -ffast-math that
can break existing programs.  Just that we know of one case beforehand shouldn't
prevent us from enabling -mrecip at -ffast-math (provided -mno-recip
still works,
regardless if provided before or after -ffast-math).  [We'll at least
get some more
testing coverage this way]

Richard.



More information about the Gcc mailing list