This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/36204] [4.4 Regression] missed store sinking out of a loop
- 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: 11 May 2008 00:53:36 -0000
- Subject: [Bug tree-optimization/36204] [4.4 Regression] missed store sinking out of a loop
- References: <bug-36204-6528@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from pinskia at gcc dot gnu dot org 2008-05-11 00:53 -------
Note if we have the following source:
void link_error();
int foo(int n, int * p)
{
int i = 0;
p[0] = 0;
for (i = 0; i < 1024*1024; i++)
{
p[0]++;
}
if (p[0] != 1024*1024)
link_error ();
return 0;
}
Since PRE is doing LIM's job, we get rid of the loop at -O1 but miss it at -O2.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |major
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2008-05-11 00:53:36
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36204