This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/37471] New: Move invariant pulls too many cmps 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: 10 Sep 2008 22:56:49 -0000
- Subject: [Bug rtl-optimization/37471] New: Move invariant pulls too many cmps out of a loop
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
I was looking at some code generation for an internal benchmark when I noticed
this. With the current trunk on powerpc, we get a mfcr which is slow for the
cell (and most likely other PPCs too) as we pulled too many cmps with some
loops.
A simple example:
int f(int b, int l, int d, int c, int e)
{
int i = 0;
for(i = 0;i< l;i ++)
{
if (b)
g();
if (c)
g();
if (d)
g();
if (e)
g();
}
}
--
Summary: Move invariant pulls too many cmps out of a loop
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P3
Component: rtl-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
GCC target triplet: powerpc*-*-*
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37471