This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Patch, PR 57787] Wasted work in ix86_pad_returns()
- From: pchang9 at cs dot wisc dot edu
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 22 Jul 2013 13:01:31 -0500
- Subject: [Patch, PR 57787] Wasted work in ix86_pad_returns()
Hi,
The problem appears in revision 201034 in version 4.9. I also reported
this problem at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57787.
Bootstrap and regression-tested on x86_64-linux.
In method "ix86_pad_returns()" in i386.c, the loop on line 35723 should
break immediately after "replace" is set to "true".
2013-07-22 Chang <pchang9@cs.wisc.edu>
* i386.c (ix86_pad_returns): Exit loop after setting replace.
Index: gcc/config/i386/i386.c
===================================================================
--- gcc/config/i386/i386.c (revision 201034)
+++ gcc/config/i386/i386.c (working copy)
@@ -35723,7 +35723,10 @@
FOR_EACH_EDGE (e, ei, bb->preds)
if (EDGE_FREQUENCY (e) && e->src->index >= 0
&& !(e->flags & EDGE_FALLTHRU))
- replace = true;
+ {
+ replace = true;
+ break;
+ }
}
if (!replace)
{
-Chang