aboutsummaryrefslogtreecommitdiff
path: root/gcc/combine.c
diff options
context:
space:
mode:
authorKai Tietz <ktietz@gcc.gnu.org>2009-09-20 11:22:11 +0200
committerKai Tietz <ktietz@gcc.gnu.org>2009-09-20 11:22:11 +0200
commit63c6c7e070b9c79d0a797ed50fa90c8f1d35480d (patch)
treec3683f21b52e4c4bfad4e1cad30f679a4f171041 /gcc/combine.c
parented6d9a1b9bcd377da8fe8fadae73f316536f2160 (diff)
downloadgcc-63c6c7e070b9c79d0a797ed50fa90c8f1d35480d.zip
gcc-63c6c7e070b9c79d0a797ed50fa90c8f1d35480d.tar.gz
gcc-63c6c7e070b9c79d0a797ed50fa90c8f1d35480d.tar.bz2
[multiple changes]
2009-09-20 Paolo Bonzini <bonzini@gnu.org> PR/39886 * combine.c (update_cfg_for_uncondjump): Set EDGE_FALLTHRU just when insn is equal to BB_END (bb). 2009-09-20 Kai Tietz <kai.tietz@onevision.com> * gcc.c-tortue/compile/pr39886.c: New. From-SVN: r151895
Diffstat (limited to 'gcc/combine.c')
-rw-r--r--gcc/combine.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index 6b507c2..35ab576 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -2363,7 +2363,7 @@ propagate_for_debug (rtx insn, rtx last, rtx dest, rtx src, bool move)
}
}
-/* Delete the conditional jump INSN and adjust the CFG correspondingly.
+/* Delete the unconditional jump INSN and adjust the CFG correspondingly.
Note that the INSN should be deleted *after* removing dead edges, so
that the kept edge is the fallthrough edge for a (set (pc) (pc))
but not for a (set (pc) (label_ref FOO)). */
@@ -2372,12 +2372,13 @@ static void
update_cfg_for_uncondjump (rtx insn)
{
basic_block bb = BLOCK_FOR_INSN (insn);
+ bool at_end = (BB_END (bb) == insn);
- if (BB_END (bb) == insn)
+ if (at_end)
purge_dead_edges (bb);
delete_insn (insn);
- if (EDGE_COUNT (bb->succs) == 1)
+ if (at_end && EDGE_COUNT (bb->succs) == 1)
single_succ_edge (bb)->flags |= EDGE_FALLTHRU;
}