summaryrefslogtreecommitdiff
path: root/gcc/tree-switch-conversion.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-switch-conversion.c')
-rw-r--r--gcc/tree-switch-conversion.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/gcc/tree-switch-conversion.c b/gcc/tree-switch-conversion.c
index df88ddf77e8..87baefc07cf 100644
--- a/gcc/tree-switch-conversion.c
+++ b/gcc/tree-switch-conversion.c
@@ -318,7 +318,7 @@ emit_case_bit_tests (gimple swtch, tree index_expr,
memset (&test, 0, sizeof (test));
/* Get the edge for the default case. */
- tmp = gimple_switch_label (swtch, 0);
+ tmp = gimple_switch_default_label (swtch);
default_bb = label_to_block (CASE_LABEL (tmp));
default_edge = find_edge (switch_bb, default_bb);
@@ -612,14 +612,12 @@ collect_switch_conv_info (gimple swtch, struct switch_conv_info *info)
memset (info, 0, sizeof (*info));
/* The gimplifier has already sorted the cases by CASE_LOW and ensured there
- is a default label which is the first in the vector. */
- gcc_assert (CASE_LOW (gimple_switch_label (swtch, 0)) == NULL_TREE);
-
- /* Collect the bits we can deduce from the CFG. */
+ is a default label which is the first in the vector.
+ Collect the bits we can deduce from the CFG. */
info->index_expr = gimple_switch_index (swtch);
info->switch_bb = gimple_bb (swtch);
info->default_bb =
- label_to_block (CASE_LABEL (gimple_switch_label (swtch, 0)));
+ label_to_block (CASE_LABEL (gimple_switch_default_label (swtch)));
e_default = find_edge (info->switch_bb, info->default_bb);
info->default_prob = e_default->probability;
info->default_count = e_default->count;
@@ -1393,7 +1391,7 @@ process_switch (gimple swtch)
transformation. */
create_temp_arrays (&info);
- gather_default_values (gimple_switch_label (swtch, 0), &info);
+ gather_default_values (gimple_switch_default_label (swtch), &info);
build_constructors (swtch, &info);
build_arrays (swtch, &info); /* Build the static arrays and assignments. */