[Vectorizer] Make REDUC_xxx_EXPR tree codes produce a scalar result
authorAlan Lawrence <alan.lawrence@arm.com>
Mon, 27 Oct 2014 14:04:43 +0000 (14:04 +0000)
committerAlan Lawrence <alalaw01@gcc.gnu.org>
Mon, 27 Oct 2014 14:04:43 +0000 (14:04 +0000)
commit99f76d9bacfcef28546dda5a51cb3651ba422518
treeb3fd50b4cacca8673a98acd16f6b70f7f379c0ac
parent60393bbc613a987e068945e55ab4e5e9dad29742
[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.

From-SVN: r216736
gcc/ChangeLog
gcc/expr.c
gcc/fold-const.c
gcc/tree-cfg.c
gcc/tree-vect-loop.c
gcc/tree.def