aboutsummaryrefslogtreecommitdiff
path: root/gcc/combine.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2011-04-12 19:49:11 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2011-04-12 19:49:11 +0200
commitb4ccfed9a0df82be04d565e2f5ebd3c581ad2d59 (patch)
tree0a5d1975afe21288e2370086b2a251eee36003d5 /gcc/combine.c
parentcf3caeaf0ac59e858ff2ae54e59dc5a2bf51961d (diff)
downloadgcc-b4ccfed9a0df82be04d565e2f5ebd3c581ad2d59.zip
gcc-b4ccfed9a0df82be04d565e2f5ebd3c581ad2d59.tar.gz
gcc-b4ccfed9a0df82be04d565e2f5ebd3c581ad2d59.tar.bz2
combine.c (update_cfg_for_uncondjump): Instead of testing at_end assert it is always true.
* combine.c (update_cfg_for_uncondjump): Instead of testing at_end assert it is always true. (try_combine): Don't call update_cfg_for_uncondjump for noop non-jump moves. From-SVN: r172329
Diffstat (limited to 'gcc/combine.c')
-rw-r--r--gcc/combine.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index 23015fd..766118d 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -2490,13 +2490,12 @@ static void
update_cfg_for_uncondjump (rtx insn)
{
basic_block bb = BLOCK_FOR_INSN (insn);
- bool at_end = (BB_END (bb) == insn);
+ gcc_assert (BB_END (bb) == insn);
- if (at_end)
- purge_dead_edges (bb);
+ purge_dead_edges (bb);
delete_insn (insn);
- if (at_end && EDGE_COUNT (bb->succs) == 1)
+ if (EDGE_COUNT (bb->succs) == 1)
{
rtx insn;
@@ -4409,7 +4408,8 @@ try_combine (rtx i3, rtx i2, rtx i1, rtx i0, int *new_direct_jump_p,
/* A noop might also need cleaning up of CFG, if it comes from the
simplification of a jump. */
- if (GET_CODE (newpat) == SET
+ if (JUMP_P (i3)
+ && GET_CODE (newpat) == SET
&& SET_SRC (newpat) == pc_rtx
&& SET_DEST (newpat) == pc_rtx)
{
@@ -4418,6 +4418,7 @@ try_combine (rtx i3, rtx i2, rtx i1, rtx i0, int *new_direct_jump_p,
}
if (undobuf.other_insn != NULL_RTX
+ && JUMP_P (undobuf.other_insn)
&& GET_CODE (PATTERN (undobuf.other_insn)) == SET
&& SET_SRC (PATTERN (undobuf.other_insn)) == pc_rtx
&& SET_DEST (PATTERN (undobuf.other_insn)) == pc_rtx)