This is the mail archive of the
mailing list for the GCC project.
why not consfold sin(const)
- From: Luchezar Belev <l_belev at yahoo dot com>
- To: gcc at gcc dot gnu dot org
- Date: Sun, 19 Sep 2004 07:07:12 -0700 (PDT)
- Subject: why not consfold sin(const)
when compiling with -ffast-math, gcc replaces sin(0) with 0, but does not const fold sin of any
Is there some problem with that in principle (like that would not be correct code in some
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
expensive and redundant sqrt operation.
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!