summaryrefslogtreecommitdiff
path: root/gcc/tree.def
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@linaro.org>2017-12-16 14:04:46 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2017-12-16 14:04:46 +0000
commit9adab579d59ea50eeb6877df2292d9d5c7b20e3e (patch)
tree57f653f6952ae9f50f71264350c15852415ebe51 /gcc/tree.def
parentbe4c1d4a42c5c7dc8bffbc5c9e3250f02be0d922 (diff)
Add VEC_SERIES_EXPR and associated optab
Similarly to the VEC_DUPLICATE_EXPR, this patch adds a tree code equivalent of the VEC_SERIES rtx code: VEC_SERIES_EXPR. 2017-12-16 Richard Sandiford <richard.sandiford@linaro.org> Alan Hayward <alan.hayward@arm.com> David Sherwood <david.sherwood@arm.com> gcc/ * doc/generic.texi (VEC_SERIES_EXPR): Document. * doc/md.texi (vec_series@var{m}): Document. * tree.def (VEC_SERIES_EXPR): New tree code. * tree.h (build_vec_series): Declare. * tree.c (build_vec_series): New function. * cfgexpand.c (expand_debug_expr): Handle VEC_SERIES_EXPR. * tree-pretty-print.c (dump_generic_node): Likewise. * gimple-pretty-print.c (dump_binary_rhs): Likewise. * tree-inline.c (estimate_operator_cost): Likewise. * expr.c (expand_expr_real_2): Likewise. * optabs-tree.c (optab_for_tree_code): Likewise. * tree-cfg.c (verify_gimple_assign_binary): Likewise. * fold-const.c (const_binop): Fold VEC_SERIES_EXPRs of constants. * expmed.c (make_tree): Handle VEC_SERIES. * optabs.def (vec_series_optab): New optab. * optabs.h (expand_vec_series_expr): Declare. * optabs.c (expand_vec_series_expr): New function. * tree-vect-generic.c (expand_vector_operations_1): Check that the operands also have vector type. Co-Authored-By: Alan Hayward <alan.hayward@arm.com> Co-Authored-By: David Sherwood <david.sherwood@arm.com> From-SVN: r255741
Diffstat (limited to 'gcc/tree.def')
-rw-r--r--gcc/tree.def10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/tree.def b/gcc/tree.def
index c3af82461f7..48a53b7aa4b 100644
--- a/gcc/tree.def
+++ b/gcc/tree.def
@@ -540,6 +540,16 @@ DEFTREECODE (COND_EXPR, "cond_expr", tcc_expression, 3)
/* Represents a vector in which every element is equal to operand 0. */
DEFTREECODE (VEC_DUPLICATE_EXPR, "vec_duplicate_expr", tcc_unary, 1)
+/* Vector series created from a start (base) value and a step.
+
+ A = VEC_SERIES_EXPR (B, C)
+
+ means
+
+ for (i = 0; i < N; i++)
+ A[i] = B + C * i; */
+DEFTREECODE (VEC_SERIES_EXPR, "vec_series_expr", tcc_binary, 2)
+
/* Vector conditional expression. It is like COND_EXPR, but with
vector operands.