aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJeff Law <law@gcc.gnu.org>1997-02-10 14:50:17 -0700
committerJeff Law <law@gcc.gnu.org>1997-02-10 14:50:17 -0700
commitad7e369fd519d5ccea15bafb57b1e36edc119266 (patch)
treeebd61d04fa71e40567621987d11d5a085adea0a1 /gcc
parent1995f267b73ed2fc5cfa6771ff3848facf9c2b2a (diff)
downloadgcc-ad7e369fd519d5ccea15bafb57b1e36edc119266.zip
gcc-ad7e369fd519d5ccea15bafb57b1e36edc119266.tar.gz
gcc-ad7e369fd519d5ccea15bafb57b1e36edc119266.tar.bz2
stmt.c (group_case_nodes): Recognize more opportunities to group case nodes.
* stmt.c (group_case_nodes): Recognize more opportunities to group case nodes. From-SVN: r13624
Diffstat (limited to 'gcc')
-rw-r--r--gcc/stmt.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/stmt.c b/gcc/stmt.c
index a8f2abc..a3f42d5 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -5590,12 +5590,18 @@ group_case_nodes (head)
while (node)
{
rtx lb = next_real_insn (label_rtx (node->code_label));
+ rtx lb2;
case_node_ptr np = node;
/* Try to group the successors of NODE with NODE. */
while (((np = np->right) != 0)
/* Do they jump to the same place? */
- && next_real_insn (label_rtx (np->code_label)) == lb
+ && ((lb2 = next_real_insn (label_rtx (np->code_label))) == lb
+ || (lb != 0 && lb2 != 0
+ && simplejump_p (lb)
+ && simplejump_p (lb2)
+ && rtx_equal_p (SET_SRC (PATTERN (lb)),
+ SET_SRC (PATTERN (lb2)))))
/* Are their ranges consecutive? */
&& tree_int_cst_equal (np->low,
fold (build (PLUS_EXPR,