In vectorizable_reduction, one check on a reduction operand via index could be
contained by another one check via pointer, so remove the former.
2024-06-16 Feng Xue <fxue@os.amperecomputing.com>
gcc/
* tree-vect-loop.cc (vectorizable_reduction): Remove the duplicated
check.
"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;