This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: optimization/10171: [3.2/3.3/3.4 regression] wrong code for inlined function
- From: jason at gcc dot gnu dot org
- To: agesen at vmware dot com, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, mchen at vmware dot com, mendel at vmware dot com, nobody at gcc dot gnu dot org
- Date: 21 Mar 2003 06:17:28 -0000
- Subject: Re: optimization/10171: [3.2/3.3/3.4 regression] wrong code for inlined function
- Reply-to: jason at gcc dot gnu dot org, agesen at vmware dot com, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, mchen at vmware dot com, mendel at vmware dot com, nobody at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
Synopsis: [3.2/3.3/3.4 regression] wrong code for inlined function
State-Changed-From-To: open->analyzed
State-Changed-By: jason
State-Changed-When: Fri Mar 21 06:17:28 2003
State-Changed-Why:
This is a bug in loop unrolling; 2.95 shows the bug with
-funroll-loops. The only difference is that now we do some
unrolling at -O2.
The loop optimizer properly calculates that there will
always be a single pass through the loop. The unroller
has a special case for this. It looks for and deletes an
unconditional jump to the continue point, then deletes a
conditional jump from the end of the loop. Unfortunately,
this code fails to handle nontrivial for loops, as the
unconditional jump at the beginning of the loop (created
previously by loop inversion) is to the test, not to the
continue point. So that jump is not deleted, but the
conditional jump at the end is, and so we just skip over
the loop. Oops.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10171