This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/21485] [4.0/4.1/4.2/4.3 Regression] codegen regression due to PRE increasing register pressure (missing load PRE really)
- 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: 28 May 2007 07:06:59 -0000
- Subject: [Bug tree-optimization/21485] [4.0/4.1/4.2/4.3 Regression] codegen regression due to PRE increasing register pressure (missing load PRE really)
- References: <bug-21485-10607@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #21 from pinskia at gcc dot gnu dot org 2007-05-28 07:06 -------
The missed load PRE for the testcase below is fixed on the pointer plus banch
as the addition is done in "unsigned int" for both the "++k" and the
array[k+1]. If we change "++k" into "k+=2" and array[k+1] into array[k+2], we
run into another missed PRE issue which can be shown by the following testcase
which we don't optimize currently:
int f(int a, int b)
{
int c = a+2;
int d = c*2;
int e = a*2;
int f = e+2;
return d == f;
}
Which I will file seperately.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21485