diff options
author | Richard Henderson <rth@redhat.com> | 2011-12-23 14:07:16 -0800 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2011-12-23 14:07:16 -0800 |
commit | e2c8363087652e9f4d52a5d3e88990a1a2c1cb23 (patch) | |
tree | f192a8cf06c285d9663ee9b363012776e9ae394b /gcc/optabs.c | |
parent | ef2361a9e57dacabbf1179f5e5b472ab43d33153 (diff) | |
download | gcc-e2c8363087652e9f4d52a5d3e88990a1a2c1cb23.zip gcc-e2c8363087652e9f4d52a5d3e88990a1a2c1cb23.tar.gz gcc-e2c8363087652e9f4d52a5d3e88990a1a2c1cb23.tar.bz2 |
Delete VEC_EXTRACT_EVEN/ODD_EXPR.
* tree.def (VEC_EXTRACT_EVEN_EXPR, VEC_EXTRACT_ODD_EXPR): Remove.
* cfgexpand.c (expand_debug_expr): Don't handle them.
* expr.c (expand_expr_real_2): Likewise.
* fold-const.c (fold_binary_loc): Likewise.
* gimple-pretty-print.c (dump_binary_rhs): Likewise.
* tree-cfg.c (verify_gimple_assign_binary): Likewise.
* tree-inline.c (estimate_operator_cost): Likewise.
* tree-pretty-print.c (dump_generic_node): Likewise.
* tree-vect-generic.c (expand_vector_operations_1): Likewise.
* optabs.c (optab_for_tree_code): Likewise.
(can_vec_perm_for_code_p): Remove.
(expand_binop): Don't try it.
(init_optabs): Don't init vec_extract_even/odd_optab.
* genopinit.c (optabs): Likewise.
* optabs.h (OTI_vec_extract_even, OTI_vec_extract_odd): Remove.
(vec_extract_even_optab, vec_extract_odd_optab): Remove.
* tree-vect-data-refs.c (vect_strided_store_supported): Tidy code.
(vect_permute_store_chain): Use TYPE_VECTOR_SUBPARTS instead of
GET_MODE_NUNITS; check vect_gen_perm_mask return value instead of
asserting vect_strided_store_supported.
(vect_strided_load_supported): Use can_vec_perm_p.
(vect_permute_load_chain): Use VEC_PERM_EXPR.
* doc/generic.texi (VEC_EXTRACT_EVEN_EXPR): Remove.
(VEC_EXTRACT_ODD_EXPR): Remove.
* doc/md.texi (vec_extract_even, vec_extract_odd): Remove.
From-SVN: r182669
Diffstat (limited to 'gcc/optabs.c')
-rw-r--r-- | gcc/optabs.c | 108 |
1 files changed, 0 insertions, 108 deletions
diff --git a/gcc/optabs.c b/gcc/optabs.c index 1c13b5a..b586eb9 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -547,12 +547,6 @@ optab_for_tree_code (enum tree_code code, const_tree type, case ABS_EXPR: return trapv ? absv_optab : abs_optab; - case VEC_EXTRACT_EVEN_EXPR: - return vec_extract_even_optab; - - case VEC_EXTRACT_ODD_EXPR: - return vec_extract_odd_optab; - default: return NULL; } @@ -1600,26 +1594,6 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1, } } - /* Certain vector operations can be implemented with vector permutation. */ - if (VECTOR_MODE_P (mode)) - { - enum tree_code tcode = ERROR_MARK; - rtx sel; - - if (binoptab == vec_extract_even_optab) - tcode = VEC_EXTRACT_EVEN_EXPR; - else if (binoptab == vec_extract_odd_optab) - tcode = VEC_EXTRACT_ODD_EXPR; - - if (tcode != ERROR_MARK - && can_vec_perm_for_code_p (tcode, mode, &sel)) - { - temp = expand_vec_perm (mode, op0, op1, sel, target); - gcc_assert (temp != NULL); - return temp; - } - } - /* Look for a wider mode of the same class for which we think we can open-code the operation. Check for a widening multiply at the wider mode as well. */ @@ -6259,8 +6233,6 @@ init_optabs (void) init_optab (udot_prod_optab, UNKNOWN); init_optab (vec_extract_optab, UNKNOWN); - init_optab (vec_extract_even_optab, UNKNOWN); - init_optab (vec_extract_odd_optab, UNKNOWN); init_optab (vec_set_optab, UNKNOWN); init_optab (vec_init_optab, UNKNOWN); init_optab (vec_shl_optab, UNKNOWN); @@ -6868,86 +6840,6 @@ can_vec_perm_p (enum machine_mode mode, bool variable, return true; } -/* Return true if we can implement with VEC_PERM_EXPR for this target. - If PSEL is non-null, return the selector for the permutation. */ - -bool -can_vec_perm_for_code_p (enum tree_code code, enum machine_mode mode, - rtx *psel) -{ - bool need_sel_test = false; - enum insn_code icode; - - /* If the target doesn't implement a vector mode for the vector type, - then no operations are supported. */ - if (!VECTOR_MODE_P (mode)) - return false; - - /* Do as many tests as possible without reqiring the selector. */ - icode = direct_optab_handler (vec_perm_optab, mode); - if (icode == CODE_FOR_nothing && GET_MODE_INNER (mode) != QImode) - { - enum machine_mode qimode - = mode_for_vector (QImode, GET_MODE_SIZE (mode)); - if (VECTOR_MODE_P (qimode)) - icode = direct_optab_handler (vec_perm_optab, qimode); - } - if (icode == CODE_FOR_nothing) - { - icode = direct_optab_handler (vec_perm_const_optab, mode); - if (icode != CODE_FOR_nothing - && targetm.vectorize.vec_perm_const_ok != NULL) - need_sel_test = true; - } - if (icode == CODE_FOR_nothing) - return false; - - /* If the selector is required, or if we need to test it, build it. */ - if (psel || need_sel_test) - { - int i, nelt = GET_MODE_NUNITS (mode), alt = 0; - unsigned char *data = XALLOCAVEC (unsigned char, nelt); - - switch (code) - { - case VEC_EXTRACT_ODD_EXPR: - alt = 1; - /* FALLTHRU */ - case VEC_EXTRACT_EVEN_EXPR: - for (i = 0; i < nelt; ++i) - data[i] = i * 2 + alt; - break; - - default: - gcc_unreachable (); - } - - if (need_sel_test - && !targetm.vectorize.vec_perm_const_ok (mode, data)) - return false; - - if (psel) - { - rtvec vec = rtvec_alloc (nelt); - enum machine_mode imode = mode; - - for (i = 0; i < nelt; ++i) - RTVEC_ELT (vec, i) = GEN_INT (data[i]); - - if (GET_MODE_CLASS (mode) != MODE_VECTOR_INT) - { - imode = int_mode_for_mode (GET_MODE_INNER (mode)); - imode = mode_for_vector (imode, nelt); - gcc_assert (GET_MODE_CLASS (imode) == MODE_VECTOR_INT); - } - - *psel = gen_rtx_CONST_VECTOR (imode, vec); - } - } - - return true; -} - /* A subroutine of expand_vec_perm for expanding one vec_perm insn. */ static rtx |