Commit 5958f9e2 by Jakub Jelinek Committed by Jakub Jelinek

tree-vect-stmts.c (vectorizable_condition): Build a VEC_COND_EXPR directly…

tree-vect-stmts.c (vectorizable_condition): Build a VEC_COND_EXPR directly instead of building a temporary tree.

	* tree-vect-stmts.c (vectorizable_condition): Build a VEC_COND_EXPR
	directly instead of building a temporary tree.

From-SVN: r232764
parent bc0cbd52
2016-01-23 Jakub Jelinek <jakub@redhat.com> 2016-01-23 Jakub Jelinek <jakub@redhat.com>
* tree-vect-stmts.c (vectorizable_condition): Build a VEC_COND_EXPR
directly instead of building a temporary tree.
PR bootstrap/69434 PR bootstrap/69434
* genrecog.c: Define INCLUDE_ALGORITHM before including system.h, * genrecog.c: Define INCLUDE_ALGORITHM before including system.h,
remove <algorithm> include. remove <algorithm> include.
......
...@@ -7478,7 +7478,7 @@ vectorizable_condition (gimple *stmt, gimple_stmt_iterator *gsi, ...@@ -7478,7 +7478,7 @@ vectorizable_condition (gimple *stmt, gimple_stmt_iterator *gsi,
tree comp_vectype = NULL_TREE; tree comp_vectype = NULL_TREE;
tree vec_cond_lhs = NULL_TREE, vec_cond_rhs = NULL_TREE; tree vec_cond_lhs = NULL_TREE, vec_cond_rhs = NULL_TREE;
tree vec_then_clause = NULL_TREE, vec_else_clause = NULL_TREE; tree vec_then_clause = NULL_TREE, vec_else_clause = NULL_TREE;
tree vec_compare, vec_cond_expr; tree vec_compare;
tree new_temp; tree new_temp;
loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info); loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
enum vect_def_type dt, dts[4]; enum vect_def_type dt, dts[4];
...@@ -7691,12 +7691,10 @@ vectorizable_condition (gimple *stmt, gimple_stmt_iterator *gsi, ...@@ -7691,12 +7691,10 @@ vectorizable_condition (gimple *stmt, gimple_stmt_iterator *gsi,
vec_compare = build2 (TREE_CODE (cond_expr), vec_cmp_type, vec_compare = build2 (TREE_CODE (cond_expr), vec_cmp_type,
vec_cond_lhs, vec_cond_rhs); vec_cond_lhs, vec_cond_rhs);
} }
vec_cond_expr = build3 (VEC_COND_EXPR, vectype, new_temp = make_ssa_name (vec_dest);
vec_compare, vec_then_clause, vec_else_clause); new_stmt = gimple_build_assign (new_temp, VEC_COND_EXPR,
vec_compare, vec_then_clause,
new_stmt = gimple_build_assign (vec_dest, vec_cond_expr); vec_else_clause);
new_temp = make_ssa_name (vec_dest, new_stmt);
gimple_assign_set_lhs (new_stmt, new_temp);
vect_finish_stmt_generation (stmt, new_stmt, gsi); vect_finish_stmt_generation (stmt, new_stmt, gsi);
if (slp_node) if (slp_node)
SLP_TREE_VEC_STMTS (slp_node).quick_push (new_stmt); SLP_TREE_VEC_STMTS (slp_node).quick_push (new_stmt);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment