This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/27755] PRE confused by control flow
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 May 2006 13:37:00 -0000
- Subject: [Bug tree-optimization/27755] PRE confused by control flow
- References: <bug-27755-10053@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from rguenth at gcc dot gnu dot org 2006-05-24 13:36 -------
Not only loads:
int foo(int k, int b)
{
int j=0;
int res;
do {
for (int n=0;n<3;++n);
res = b+1;
} while (++j<k);
return res;
}
b+1 is not moved out of the outer loop. This looks like it would affect
loop invariant motion in general for nested loops in case the invariants
are computed after the inner loops. Is this how it is supposed to be?
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|load-PRE confused by control|PRE confused by control flow
|flow |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27755