Commit 9fb60a0d by Richard Kenner Committed by Richard Kenner

* stmt.c (expand_end_case): Remove orig_minval and use tree_low_cst.

From-SVN: r46486
parent 2ea792c2
Thu Oct 25 08:46:06 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* stmt.c (expand_end_case): Remove orig_minval and use tree_low_cst.
2001-10-24 Christopher Faylor <cgf@redhat.com> 2001-10-24 Christopher Faylor <cgf@redhat.com>
* config/i386/cygwin.h: Use proper path for mingw crt files when * config/i386/cygwin.h: Use proper path for mingw crt files when
......
...@@ -5317,7 +5317,7 @@ void ...@@ -5317,7 +5317,7 @@ void
expand_end_case (orig_index) expand_end_case (orig_index)
tree orig_index; tree orig_index;
{ {
tree minval = NULL_TREE, maxval = NULL_TREE, range = NULL_TREE, orig_minval; tree minval = NULL_TREE, maxval = NULL_TREE, range = NULL_TREE;
rtx default_label = 0; rtx default_label = 0;
struct case_node *n; struct case_node *n;
unsigned int count; unsigned int count;
...@@ -5417,8 +5417,6 @@ expand_end_case (orig_index) ...@@ -5417,8 +5417,6 @@ expand_end_case (orig_index)
count++; count++;
} }
orig_minval = minval;
/* Compute span of values. */ /* Compute span of values. */
if (count != 0) if (count != 0)
range = fold (build (MINUS_EXPR, index_type, maxval, minval)); range = fold (build (MINUS_EXPR, index_type, maxval, minval));
...@@ -5559,14 +5557,14 @@ expand_end_case (orig_index) ...@@ -5559,14 +5557,14 @@ expand_end_case (orig_index)
for (n = thiscase->data.case_stmt.case_list; n; n = n->right) for (n = thiscase->data.case_stmt.case_list; n; n = n->right)
{ {
HOST_WIDE_INT i HOST_WIDE_INT i
= TREE_INT_CST_LOW (n->low) - TREE_INT_CST_LOW (orig_minval); = tree_low_cst (n->low, 0) - tree_low_cst (minval, 0);
while (1) while (1)
{ {
labelvec[i] labelvec[i]
= gen_rtx_LABEL_REF (Pmode, label_rtx (n->code_label)); = gen_rtx_LABEL_REF (Pmode, label_rtx (n->code_label));
if (i + TREE_INT_CST_LOW (orig_minval) if (i + tree_low_cst (minval, 0)
== TREE_INT_CST_LOW (n->high)) == tree_low_cst (n->high, 0))
break; break;
i++; i++;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment