https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81835

--- Comment #10 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
Author: aldyh
Date: Wed Sep 13 17:01:19 2017
New Revision: 252441

URL: https://gcc.gnu.org/viewcvs?rev=252441&root=gcc&view=rev
Log:
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.sandif...@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.

Added:
    branches/range-gen2/gcc/testsuite/gcc.dg/vect/pr81815.c
Modified:
    branches/range-gen2/gcc/ChangeLog
    branches/range-gen2/gcc/testsuite/ChangeLog
    branches/range-gen2/gcc/tree-vect-loop.c

Reply via email to