aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/tree-vect-loop.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc
index eeb75c0..aab408d 100644
--- a/gcc/tree-vect-loop.cc
+++ b/gcc/tree-vect-loop.cc
@@ -7815,11 +7815,9 @@ vectorizable_reduction (loop_vec_info loop_vinfo,
"use not simple.\n");
return false;
}
- if (i == STMT_VINFO_REDUC_IDX (stmt_info))
- continue;
- /* For an IFN_COND_OP we might hit the reduction definition operand
- twice (once as definition, once as else). */
+ /* Skip reduction operands, and for an IFN_COND_OP we might hit the
+ reduction operand twice (once as definition, once as else). */
if (op.ops[i] == op.ops[STMT_VINFO_REDUC_IDX (stmt_info)])
continue;