PR81815: Invalid conditional reduction
We weren't checking whether the phi in a conditional reduction was
used by the condition itself (which isn't a case we handle).
2017-08-11 Richard Sandiford <richard.sandiford@linaro.org>
gcc/
PR tree-optimization/81835
* tree-vect-loop.c (vect_is_simple_reduction): Simply checks for
the phi SSA_NAME. Check that the condition in a COND_EXPR does
not depend on the phi.
gcc/testsuite/
PR tree-optimization/81835
* gcc.dg/vect/pr81815.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@251117 138bc75d-0d04-0410-961f-82ee72b054a4