This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/48092] associative property of builtins is not exploited on GIMPLE


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));
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]