This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Activate -mrecip with -ffast-math?
Bradley Lucier wrote:
> If -ffinite-math-only is specified, then producing NaN instead of inf
> should be allowed.
Agreed. After all, -finite-math says:
Allow optimizations for floating-point arithmetic that assume that
arguments and results are not NaNs or +-Infs.
Since the compiler can assume the output isn't a NaN or an Inf, it can
freely switch one and the other.
> If -fno-finite-math-only is specified, then the generated code should
> "do the right thing" if an argument or result is inf or NaN.
Also agreed.
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713