Commit d34b4814 by Alan Hayward Committed by Alan Hayward

2015-10-27 Alan Hayward <alan.hayward@arm.com>

	* tree-vect-looop.c
	(vectorizable_live_operation): Change iterator.

From-SVN: r229447
parent 54b96a2d
2015-10-27 Alan Hayward <alan.hayward@arm.com>
* tree-vect-looop.c
(vectorizable_live_operation): Change iterator.
2015-10-27 Abderrazek Zaafrani <a.zaafrani@samsung.com> 2015-10-27 Abderrazek Zaafrani <a.zaafrani@samsung.com>
Aditya Kumar <aditya.k7@samsung.com> Aditya Kumar <aditya.k7@samsung.com>
...@@ -5901,13 +5901,9 @@ vectorizable_live_operation (gimple *stmt, ...@@ -5901,13 +5901,9 @@ vectorizable_live_operation (gimple *stmt,
stmt_vec_info stmt_info = vinfo_for_stmt (stmt); stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info); loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo); struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
int i;
int op_type;
tree op; tree op;
gimple *def_stmt; gimple *def_stmt;
enum vect_def_type dt; ssa_op_iter iter;
enum tree_code code;
enum gimple_rhs_class rhs_class;
gcc_assert (STMT_VINFO_LIVE_P (stmt_info)); gcc_assert (STMT_VINFO_LIVE_P (stmt_info));
...@@ -5958,24 +5954,14 @@ vectorizable_live_operation (gimple *stmt, ...@@ -5958,24 +5954,14 @@ vectorizable_live_operation (gimple *stmt,
if (nested_in_vect_loop_p (loop, stmt)) if (nested_in_vect_loop_p (loop, stmt))
return false; return false;
code = gimple_assign_rhs_code (stmt);
op_type = TREE_CODE_LENGTH (code);
rhs_class = get_gimple_rhs_class (code);
gcc_assert (rhs_class != GIMPLE_UNARY_RHS || op_type == unary_op);
gcc_assert (rhs_class != GIMPLE_BINARY_RHS || op_type == binary_op);
/* FORNOW: support only if all uses are invariant. This means /* FORNOW: support only if all uses are invariant. This means
that the scalar operations can remain in place, unvectorized. that the scalar operations can remain in place, unvectorized.
The original last scalar value that they compute will be used. */ The original last scalar value that they compute will be used. */
FOR_EACH_SSA_TREE_OPERAND (op, stmt, iter, SSA_OP_USE)
for (i = 0; i < op_type; i++)
{ {
if (rhs_class == GIMPLE_SINGLE_RHS) enum vect_def_type dt = vect_uninitialized_def;
op = TREE_OPERAND (gimple_op (stmt, 1), i);
else if (!vect_is_simple_use (op, loop_vinfo, &def_stmt, &dt))
op = gimple_op (stmt, i + 1);
if (op
&& !vect_is_simple_use (op, loop_vinfo, &def_stmt, &dt))
{ {
if (dump_enabled_p ()) if (dump_enabled_p ())
dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
......
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