aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Earnshaw <rearnsha@arm.com>1999-10-20 12:45:22 +0000
committerRichard Earnshaw <rearnsha@gcc.gnu.org>1999-10-20 12:45:22 +0000
commit506f9fbf4218d6a4a4481e7637c13bb0086fee9e (patch)
treefc257d470fb6abc041bc739fb324ad6a62ece267 /gcc
parentee7b8369c2babb18188722d55fc2d5476ceca115 (diff)
downloadgcc-506f9fbf4218d6a4a4481e7637c13bb0086fee9e.zip
gcc-506f9fbf4218d6a4a4481e7637c13bb0086fee9e.tar.gz
gcc-506f9fbf4218d6a4a4481e7637c13bb0086fee9e.tar.bz2
(split_edge): Handle casesi insns.
From-SVN: r30101
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog1
-rw-r--r--gcc/flow.c13
2 files changed, 14 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index de82cea..76ca2b9 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -4,6 +4,7 @@ Wed Oct 20 10:46:41 1999 Richard Earnshaw (rearnsha@arm.com)
* flow.c (merge_blocks_move_predecessor_nojumps): Re-order the basic
block records so that merge_blocks_nomove will clean up correctly.
+ (split_edge): Handle casesi insns.
Tue Oct 19 23:43:50 1999 Jeffrey A Law (law@cygnus.com)
diff --git a/gcc/flow.c b/gcc/flow.c
index fcefe0a..0990bd0 100644
--- a/gcc/flow.c
+++ b/gcc/flow.c
@@ -1484,6 +1484,19 @@ split_edge (edge_in)
--LABEL_NUSES (old_label);
++LABEL_NUSES (new_label);
}
+
+ /* Handle casesi dispatch insns */
+ if ((tmp = single_set (insn)) != NULL
+ && SET_DEST (tmp) == pc_rtx
+ && GET_CODE (SET_SRC (tmp)) == IF_THEN_ELSE
+ && GET_CODE (XEXP (SET_SRC (tmp), 2)) == LABEL_REF
+ && XEXP (XEXP (SET_SRC (tmp), 2), 0) == old_label)
+ {
+ XEXP (SET_SRC (tmp), 2) = gen_rtx_LABEL_REF (VOIDmode,
+ new_label);
+ --LABEL_NUSES (old_label);
+ ++LABEL_NUSES (new_label);
+ }
}
else
{