This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/24964] Does not optimise abs(x)**2 to x**2
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Nov 2005 00:40:07 -0000
- Subject: [Bug tree-optimization/24964] Does not optimise abs(x)**2 to x**2
- References: <bug-24964-7427@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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