This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/29953] [SH-4] Perfomance regression in loops. cmp/eq used instead of dt
- From: "christian dot bruel at st dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Apr 2007 14:30:40 -0000
- Subject: [Bug target/29953] [SH-4] Perfomance regression in loops. cmp/eq used instead of dt
- References: <bug-29953-12348@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from christian dot bruel at st dot com 2007-04-03 15:30 -------
This missed optimisation appears with all counted loops. The ir in gimple
produces
j = 0;
<D1202>:;
j = j + 1;
if (j <= 999)
{
goto <D1202>;
}
The transformation to do ( j=1000; j=j-1; if (j)...) will allow the decrement
and test pattern to be catched by combine.
Since this transformation needs to know about code selection (and is only
useful if the number of issued instructions is > 1), it seems best to do it in
rtl. I'm thinking about strength_reduce in loop.c when we optimize bivs.
Question: does it make sense to do this transformation in loop.c ? I'm thinking
at strength_reduce.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29953