aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-switch-conversion.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-switch-conversion.cc')
-rw-r--r--gcc/tree-switch-conversion.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/tree-switch-conversion.cc b/gcc/tree-switch-conversion.cc
index dea217a..d088287 100644
--- a/gcc/tree-switch-conversion.cc
+++ b/gcc/tree-switch-conversion.cc
@@ -1030,6 +1030,9 @@ switch_conversion::build_one_array (int num, tree arr_index_type,
TREE_CONSTANT (decl) = 1;
TREE_READONLY (decl) = 1;
DECL_IGNORED_P (decl) = 1;
+ /* The decl is mergable since we don't take the address ever and
+ just reading from it. */
+ DECL_MERGEABLE (decl) = 1;
if (offloading_function_p (cfun->decl))
DECL_ATTRIBUTES (decl)
= tree_cons (get_identifier ("omp declare target"), NULL_TREE,
@@ -1793,12 +1796,14 @@ bit_test_cluster::find_bit_tests (vec<cluster *> &clusters, int max_c)
end up with as few clusters as possible. */
unsigned l = clusters.length ();
- auto_vec<min_cluster_item> min;
- min.reserve (l + 1);
- gcc_checking_assert (l > 0);
+ if (l == 0)
+ return clusters.copy ();
gcc_checking_assert (l <= INT_MAX);
+ auto_vec<min_cluster_item> min;
+ min.reserve (l + 1);
+
int bits_in_word = GET_MODE_BITSIZE (word_mode);
/* First phase: Compute the minimum number of clusters for each prefix of the