aboutsummaryrefslogtreecommitdiff
path: root/gcc/cfgloopmanip.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2012-01-01 12:07:34 +0000
committerJan Hubicka <jh@suse.cz>2012-01-01 12:07:34 +0000
commit612aaa7436df20f4e7369a877bc3f743291a7390 (patch)
tree40cd72a170f39bf112cfdf721c006d95af80120b /gcc/cfgloopmanip.c
parent3a1475e7d73bf1b2432ecde62b89409cca7a0d67 (diff)
PR rtl-optimization/51069
* cfgloopmanip.c (remove_path): Removing path making irreducible region unconditional makes BB part of the region. * gcc.c-torture/compile/pr51069.c: New testcase. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@182767 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgloopmanip.c')
-rw-r--r--gcc/cfgloopmanip.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/cfgloopmanip.c b/gcc/cfgloopmanip.c
index 1824421f616..967541756b5 100644
--- a/gcc/cfgloopmanip.c
+++ b/gcc/cfgloopmanip.c
@@ -290,6 +290,7 @@ remove_path (edge e)
int i, nrem, n_bord_bbs;
sbitmap seen;
bool irred_invalidated = false;
+ edge_iterator ei;
if (!can_remove_branch_p (e))
return false;
@@ -329,9 +330,13 @@ remove_path (edge e)
/* Find "border" hexes -- i.e. those with predecessor in removed path. */
for (i = 0; i < nrem; i++)
SET_BIT (seen, rem_bbs[i]->index);
+ if (!irred_invalidated)
+ FOR_EACH_EDGE (ae, ei, e->src->succs)
+ if (ae != e && ae->dest != EXIT_BLOCK_PTR && !TEST_BIT (seen, ae->dest->index)
+ && ae->flags & EDGE_IRREDUCIBLE_LOOP)
+ irred_invalidated = true;
for (i = 0; i < nrem; i++)
{
- edge_iterator ei;
bb = rem_bbs[i];
FOR_EACH_EDGE (ae, ei, rem_bbs[i]->succs)
if (ae->dest != EXIT_BLOCK_PTR && !TEST_BIT (seen, ae->dest->index))