aboutsummaryrefslogtreecommitdiff
path: root/gcc/combine.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2011-01-03 21:59:20 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2011-01-03 21:59:20 +0100
commit9766135bb18d75cd0d5257d21de485e953e3505e (patch)
treea5d208c43ab55221a90b175688171ca074b3ad73 /gcc/combine.c
parentd652f226fca1e942b7851d1205f8a6a472d9e0a0 (diff)
downloadgcc-9766135bb18d75cd0d5257d21de485e953e3505e.zip
gcc-9766135bb18d75cd0d5257d21de485e953e3505e.tar.gz
gcc-9766135bb18d75cd0d5257d21de485e953e3505e.tar.bz2
re PR rtl-optimization/47157 (ICE: in calc_dfs_tree, at dominance.c:395 with -O)
PR rtl-optimization/47157 * combine.c (try_combine): If undobuf.other_insn becomes (set (pc) (pc)) jump, call update_cfg_for_uncondjump on it and set *new_direct_jump_p too. * gcc.c-torture/compile/pr47157.c: New test. From-SVN: r168439
Diffstat (limited to 'gcc/combine.c')
-rw-r--r--gcc/combine.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index d9d6838..3ee53e6 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -1,7 +1,7 @@
/* Optimize by combining instructions for GNU compiler.
Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
- Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+ 2011 Free Software Foundation, Inc.
This file is part of GCC.
@@ -4378,6 +4378,15 @@ try_combine (rtx i3, rtx i2, rtx i1, rtx i0, int *new_direct_jump_p)
update_cfg_for_uncondjump (i3);
}
+ if (undobuf.other_insn != NULL_RTX
+ && GET_CODE (PATTERN (undobuf.other_insn)) == SET
+ && SET_SRC (PATTERN (undobuf.other_insn)) == pc_rtx
+ && SET_DEST (PATTERN (undobuf.other_insn)) == pc_rtx)
+ {
+ *new_direct_jump_p = 1;
+ update_cfg_for_uncondjump (undobuf.other_insn);
+ }
+
combine_successes++;
undo_commit ();