summaryrefslogtreecommitdiff
path: root/gcc/stmt.c
diff options
context:
space:
mode:
authorsteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2012-06-29 14:48:08 +0000
committersteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2012-06-29 14:48:08 +0000
commit22d29d94535f12c8f3f6a0f2441137f1256a988d (patch)
treeff5846aca298075f454abf75c2500eae0de6daa0 /gcc/stmt.c
parentc9ff52f44a32dcc8d96f3fa684ba981fe5a91a08 (diff)
downloadgcc-22d29d94535f12c8f3f6a0f2441137f1256a988d.tar.gz
* system.h (CASE_USE_BIT_TESTS): Poison.
* stmt.c (CASE_USE_BIT_TESTS): Fold away into its only user ... (expand_switch_using_bit_tests_p): ...here. * doc/tm.texi.in (CASE_USE_BIT_TESTS): Remove documentation. * doc/tm.texi (CASE_USE_BIT_TESTS): Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189078 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/stmt.c')
-rw-r--r--gcc/stmt.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/gcc/stmt.c b/gcc/stmt.c
index 4ad4d0f1e59..ea0d3a58d97 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -1722,13 +1722,6 @@ add_case_node (struct case_node *head, tree type, tree low, tree high,
/* Maximum number of case bit tests. */
#define MAX_CASE_BIT_TESTS 3
-/* By default, enable case bit tests on targets with ashlsi3. */
-#ifndef CASE_USE_BIT_TESTS
-#define CASE_USE_BIT_TESTS (optab_handler (ashl_optab, word_mode) \
- != CODE_FOR_nothing)
-#endif
-
-
/* A case_bit_test represents a set of case nodes that may be
selected from using a bit-wise comparison. HI and LO hold
the integer to be tested against, LABEL contains the label
@@ -1888,8 +1881,10 @@ bool
expand_switch_using_bit_tests_p (tree index_expr, tree range,
unsigned int uniq, unsigned int count)
{
- return (CASE_USE_BIT_TESTS
- && ! TREE_CONSTANT (index_expr)
+ if (optab_handler (ashl_optab, word_mode) == CODE_FOR_nothing)
+ return false;
+
+ return (! TREE_CONSTANT (index_expr)
&& compare_tree_int (range, GET_MODE_BITSIZE (word_mode)) < 0
&& compare_tree_int (range, 0) > 0
&& lshift_cheap_p ()