diff mbox

shrink-wrap: Handle multiple predecessors of prologue

Message ID 20150922205535.GC3544@gate.crashing.org
State New
Headers show

Commit Message

Segher Boessenkool Sept. 22, 2015, 8:55 p.m. UTC
On Tue, Sep 22, 2015 at 11:11:47AM -0500, Segher Boessenkool wrote:
> > So, given that your solution seems to work, the patch is ok.
> 
> Thanks!  Here is what I will commit after bootstrap+test (the superfluous
> assert removed, and the comment for the code quoted above tweaked a bit).

I added the following tiny patchlet for a paper bag problem revealed
by testing on x86-64.  Committed together with the rest.


Segher

---
 gcc/shrink-wrap.c |    3 +++
 1 file changed, 3 insertions(+)
diff mbox

Patch

diff --git a/gcc/shrink-wrap.c b/gcc/shrink-wrap.c
index 94b1228..a99474d 100644
--- a/gcc/shrink-wrap.c
+++ b/gcc/shrink-wrap.c
@@ -822,6 +822,9 @@  try_shrink_wrapping (edge *entry_edge, bitmap_head *bb_with,
 	den += e->src->frequency;
       }
 
+  if (den == 0)
+    den = 1;
+
   /* All is okay, so do it.  */
 
   crtl->shrink_wrapped = true;