diff options
Diffstat (limited to 'gcc/cfgloop.c')
-rw-r--r-- | gcc/cfgloop.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/gcc/cfgloop.c b/gcc/cfgloop.c index 0a2829f5c18..c8f7603535d 100644 --- a/gcc/cfgloop.c +++ b/gcc/cfgloop.c @@ -804,19 +804,20 @@ flow_loops_find (loops, flags) header->loop_depth = 0; + /* If we have an abnormal predecessor, do not consider the + loop (not worth the problems). */ + for (e = header->pred; e; e = e->pred_next) + if (e->flags & EDGE_ABNORMAL) + break; + if (e) + continue; + for (e = header->pred; e; e = e->pred_next) { basic_block latch = e->src; if (e->flags & EDGE_ABNORMAL) - { - if (more_latches) - { - RESET_BIT (headers, header->index); - num_loops--; - } - break; - } + abort (); /* Look for back edges where a predecessor is dominated by this block. A natural loop has a single entry |