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/24964] Does not optimise abs(x)**2 to x**2



------- Comment #1 from pinskia at gcc dot gnu dot org  2005-11-21 00:40 -------
This comes down to the tree-combiner.
Take the following C functions:
double fabs(double);
double f(double a)
{
  return fabs(a)*fabs(a);
}

double f1(double *a)
{
  return fabs(*a)*fabs(*a);
}

double f2(double *a)
{
  double t = fabs(*a);
  return t*t;
}


Only f2 is not optimized.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  BugsThisDependsOn|                            |15459
             Status|UNCONFIRMED                 |NEW
          Component|fortran                     |tree-optimization
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-11-21 00:40:07
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24964


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