diff options
author | Ira Rosen <ira.rosen@linaro.org> | 2011-10-18 09:39:04 +0000 |
---|---|---|
committer | Ira Rosen <irar@gcc.gnu.org> | 2011-10-18 09:39:04 +0000 |
commit | 36ba4aaedc8507aa7f66add20d92b65df3b8faff (patch) | |
tree | 003e1d024145ae0b6a8fe049fd43e175358d9b1e /gcc/tree.def | |
parent | d355361573c6be211721cc5c945dd5cecdd33c6b (diff) | |
download | gcc-36ba4aaedc8507aa7f66add20d92b65df3b8faff.zip gcc-36ba4aaedc8507aa7f66add20d92b65df3b8faff.tar.gz gcc-36ba4aaedc8507aa7f66add20d92b65df3b8faff.tar.bz2 |
md.texi (vec_widen_ushiftl_hi, [...]): Document.
* doc/md.texi (vec_widen_ushiftl_hi, vec_widen_ushiftl_lo,
vec_widen_sshiftl_hi, vec_widen_sshiftl_lo): Document.
* tree-pretty-print.c (dump_generic_node): Handle WIDEN_LSHIFT_EXPR,
VEC_WIDEN_LSHIFT_HI_EXPR and VEC_WIDEN_LSHIFT_LO_EXPR.
(op_code_prio): Likewise.
(op_symbol_code): Handle WIDEN_LSHIFT_EXPR.
* optabs.c (optab_for_tree_code): Handle
VEC_WIDEN_LSHIFT_HI_EXPR and VEC_WIDEN_LSHIFT_LO_EXPR.
(init-optabs): Initialize optab codes for vec_widen_u/sshiftl_hi/lo.
* optabs.h (enum optab_index): Add OTI_vec_widen_u/sshiftl_hi/lo.
* genopinit.c (optabs): Initialize the new optabs.
* expr.c (expand_expr_real_2): Handle
VEC_WIDEN_LSHIFT_HI_EXPR and VEC_WIDEN_LSHIFT_LO_EXPR.
* gimple-pretty-print.c (dump_binary_rhs): Likewise.
* tree-vectorizer.h (NUM_PATTERNS): Increase to 8.
* tree.def (WIDEN_LSHIFT_EXPR, VEC_WIDEN_LSHIFT_HI_EXPR,
VEC_WIDEN_LSHIFT_LO_EXPR): New.
* cfgexpand.c (expand_debug_expr): Handle new tree codes.
* tree-vect-patterns.c (vect_vect_recog_func_ptrs): Add
vect_recog_widen_shift_pattern.
(vect_handle_widen_mult_by_const): Rename...
(vect_handle_widen_op_by_const): ...to this. Handle shifts.
Add a new argument, update documentation.
(vect_recog_widen_mult_pattern): Assume that only second
operand can be constant. Update call to
vect_handle_widen_op_by_const.
(vect_recog_over_widening_pattern): Fix typo.
(vect_recog_widen_shift_pattern): New.
* tree-vect-stmts.c (vectorizable_type_promotion): Handle
widening shifts.
(supportable_widening_operation): Likewise.
* tree-inline.c (estimate_operator_cost): Handle new tree codes.
* tree-vect-generic.c (expand_vector_operations_1): Likewise.
* tree-cfg.c (verify_gimple_assign_binary): Likewise.
* config/arm/neon.md (neon_vec_<US>shiftl_<mode>): New.
(vec_widen_<US>shiftl_lo_<mode>, neon_vec_<US>shiftl_hi_<mode>,
vec_widen_<US>shiftl_hi_<mode>, neon_vec_<US>shift_left_<mode>):
Likewise.
* config/arm/predicates.md (const_neon_scalar_shift_amount_operand):
New.
* config/arm/iterators.md (V_innermode): New.
* tree-vect-slp.c (vect_build_slp_tree): Require same shift operand
for widening shift.
From-SVN: r180128
Diffstat (limited to 'gcc/tree.def')
-rw-r--r-- | gcc/tree.def | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/tree.def b/gcc/tree.def index 3e59819..1472cb1 100644 --- a/gcc/tree.def +++ b/gcc/tree.def @@ -1125,6 +1125,19 @@ DEFTREECODE (WIDEN_MULT_PLUS_EXPR, "widen_mult_plus_expr", tcc_expression, 3) is subtracted from t3. */ DEFTREECODE (WIDEN_MULT_MINUS_EXPR, "widen_mult_minus_expr", tcc_expression, 3) +/* Widening shift left. + The first operand is of type t1. + The second operand is the number of bits to shift by; it need not be the + same type as the first operand and result. + Note that the result is undefined if the second operand is larger + than or equal to the first operand's type size. + The type of the entire expression is t2, such that t2 is at least twice + the size of t1. + WIDEN_LSHIFT_EXPR is equivalent to first widening (promoting) + the first argument from type t1 to type t2, and then shifting it + by the second argument. */ +DEFTREECODE (WIDEN_LSHIFT_EXPR, "widen_lshift_expr", tcc_binary, 2) + /* Fused multiply-add. All operands and the result are of the same type. No intermediate rounding is performed after multiplying operand one with operand two @@ -1180,6 +1193,16 @@ DEFTREECODE (VEC_EXTRACT_ODD_EXPR, "vec_extractodd_expr", tcc_binary, 2) DEFTREECODE (VEC_INTERLEAVE_HIGH_EXPR, "vec_interleavehigh_expr", tcc_binary, 2) DEFTREECODE (VEC_INTERLEAVE_LOW_EXPR, "vec_interleavelow_expr", tcc_binary, 2) +/* Widening vector shift left in bits. + Operand 0 is a vector to be shifted with N elements of size S. + Operand 1 is an integer shift amount in bits. + The result of the operation is N elements of size 2*S. + VEC_WIDEN_LSHIFT_HI_EXPR computes the N/2 high results. + VEC_WIDEN_LSHIFT_LO_EXPR computes the N/2 low results. + */ +DEFTREECODE (VEC_WIDEN_LSHIFT_HI_EXPR, "widen_lshift_hi_expr", tcc_binary, 2) +DEFTREECODE (VEC_WIDEN_LSHIFT_LO_EXPR, "widen_lshift_lo_expr", tcc_binary, 2) + /* PREDICT_EXPR. Specify hint for branch prediction. The PREDICT_EXPR_PREDICTOR specify predictor and PREDICT_EXPR_OUTCOME the outcome (0 for not taken and 1 for taken). Once the profile is guessed |