summaryrefslogtreecommitdiff
path: root/gcc/tree.def
diff options
context:
space:
mode:
authoralalaw01 <alalaw01@138bc75d-0d04-0410-961f-82ee72b054a4>2014-10-27 14:04:43 +0000
committeralalaw01 <alalaw01@138bc75d-0d04-0410-961f-82ee72b054a4>2014-10-27 14:04:43 +0000
commit7ba68b188744b2128dd590e939a92cdfc592a178 (patch)
treeb3fd50b4cacca8673a98acd16f6b70f7f379c0ac /gcc/tree.def
parent94ea856876f6fe2524e543d8641f5c026c907031 (diff)
downloadgcc-7ba68b188744b2128dd590e939a92cdfc592a178.tar.gz
[Vectorizer] Make REDUC_xxx_EXPR tree codes produce a scalar result
PR tree-optimization/61114 * expr.c (expand_expr_real_2): For REDUC_{MIN,MAX,PLUS}_EXPR, add extract_bit_field around optab result. * fold-const.c (fold_unary_loc): For REDUC_{MIN,MAX,PLUS}_EXPR, produce scalar not vector. * tree-cfg.c (verify_gimple_assign_unary): Check result vs operand type for REDUC_{MIN,MAX,PLUS}_EXPR. * tree-vect-loop.c (vect_analyze_loop): Update comment. (vect_create_epilog_for_reduction): For direct vector reduction, use result of tree code directly without extract_bit_field. * tree.def (REDUC_MAX_EXPR, REDUC_MIN_EXPR, REDUC_PLUS_EXPR): Update comment. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216736 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree.def')
-rw-r--r--gcc/tree.def7
1 files changed, 3 insertions, 4 deletions
diff --git a/gcc/tree.def b/gcc/tree.def
index bd39e4b89bd..c830e4bad84 100644
--- a/gcc/tree.def
+++ b/gcc/tree.def
@@ -1161,10 +1161,9 @@ DEFTREECODE (TRANSACTION_EXPR, "transaction_expr", tcc_expression, 1)
result (e.g. summing the elements of the vector, finding the minimum over
the vector elements, etc).
Operand 0 is a vector.
- The expression returns a vector of the same type, with the first
- element in the vector holding the result of the reduction of all elements
- of the operand. The content of the other elements in the returned vector
- is undefined. */
+ The expression returns a scalar, with type the same as the elements of the
+ vector, holding the result of the reduction of all elements of the operand.
+ */
DEFTREECODE (REDUC_MAX_EXPR, "reduc_max_expr", tcc_unary, 1)
DEFTREECODE (REDUC_MIN_EXPR, "reduc_min_expr", tcc_unary, 1)
DEFTREECODE (REDUC_PLUS_EXPR, "reduc_plus_expr", tcc_unary, 1)