why not consfold sin(const)
Luchezar Belev
l_belev@yahoo.com
Sun Sep 19 16:02:00 GMT 2004
Hi all,
when compiling with -ffast-math, gcc replaces sin(0) with 0, but does not const fold sin of any
other const.
Is there some problem with that in principle (like that would not be correct code in some
circumstances)
or it's just not implemented?
This is also true for other builtin math funcs like log() (gcc only optimizes log(1) to 0),
but it is not the case with sqrt() - in that case the compiler always constfolds and eliminates
the
expensive and redundant sqrt operation.
Lucho
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail
More information about the Gcc
mailing list