This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/23855] Should not do loop header copying for inner loop
- 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: 13 Sep 2005 13:12:19 -0000
- Subject: [Bug tree-optimization/23855] Should not do loop header copying for inner loop
- References: <20050913094645.23855.rguenth@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From rguenth at gcc dot gnu dot org 2005-09-13 13:12 -------
Unswitching should clean this up, but unfortunately(?) only looks at innermost
loops. For a reason it seems, just removing this checks results in an ICE.
Testcase for unswitching:
void bar(void);
void foo(int ie, int je)
{
int j;
int i;
if (je <= 0)
goto L5;
j = 0;
L2:
if (ie <= 0)
goto L3;
i = 0;
L1:
bar ();
i = i + 1;
if (ie != i) goto L1;
L3:
j = j + 1;
if (je != j) goto L2;
L5:
return;
}
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |rakdver at atrey dot karlin
| |dot mff dot cuni dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23855