summaryrefslogtreecommitdiff
path: root/gcc/ifcvt.c
diff options
context:
space:
mode:
authorsje <sje@138bc75d-0d04-0410-961f-82ee72b054a4>2006-09-20 16:41:12 +0000
committersje <sje@138bc75d-0d04-0410-961f-82ee72b054a4>2006-09-20 16:41:12 +0000
commitfa4578c672a406cb77add9d6bedaa171b2be5eba (patch)
tree6e044ba861af2f20d86a11086e84eb3657abdfd5 /gcc/ifcvt.c
parent59ae0c9c83e70e6a6a6da6aed83e55ed87092989 (diff)
downloadgcc-fa4578c672a406cb77add9d6bedaa171b2be5eba.tar.gz
PR target/28574
* ifcvt.c (dead_or_predicable): Don't predicate then blocks with tablejumps in them. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117084 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ifcvt.c')
-rw-r--r--gcc/ifcvt.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c
index 987a2fbe0bd..41da0b3af16 100644
--- a/gcc/ifcvt.c
+++ b/gcc/ifcvt.c
@@ -3560,6 +3560,13 @@ dead_or_predicable (basic_block test_bb, basic_block merge_bb,
head = BB_HEAD (merge_bb);
end = BB_END (merge_bb);
+ /* If merge_bb ends with a tablejump, predicating/moving insn's
+ into test_bb and then deleting merge_bb will result in the jumptable
+ that follows merge_bb being removed along with merge_bb and then we
+ get an unresolved reference to the jumptable. */
+ if (tablejump_p (end, NULL, NULL))
+ return FALSE;
+
if (LABEL_P (head))
head = NEXT_INSN (head);
if (NOTE_P (head))