This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/48092] associative property of builtins is not exploited on GIMPLE
- From: "vincenzo.innocente at cern dot ch" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 08 Sep 2011 10:01:48 +0000
- Subject: [Bug tree-optimization/48092] associative property of builtins is not exploited on GIMPLE
- Auto-submitted: auto-generated
- References: <bug-48092-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48092
--- Comment #3 from vincenzo Innocente <vincenzo.innocente at cern dot ch> 2011-09-08 10:01:48 UTC ---
btw even in C with -Ofast
a*exp(x)*exp(y) (same for sqrt) is NOT optimized. compare
double exp0(double x, double y) {
return exp(x)*exp(y);
}
double exp1(double a, double x, double y) {
return a*exp(x)*exp(y);
}
double exp02(double a, double x, double y) {
return a*(exp(x)*exp(y));
}