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

--- Comment #2 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> 
---
Author: rsandifo
Date: Sun Mar 18 10:25:29 2018
New Revision: 258631

URL: https://gcc.gnu.org/viewcvs?rev=258631&root=gcc&view=rev
Log:
Don't try to vectorise COND_EXPR reduction chains (PR 84913)

The testcase ICEd for both SVE and AVX512 because we were trying
to vectorise a chain of COND_EXPRs as a reduction and getting
confused by reduc_index == -1.

2018-03-18  Richard Sandiford  <richard.sandif...@linaro.org>

gcc/
        PR tree-optimization/84913
        * tree-vect-loop.c (vectorizable_reduction): Don't try to
        vectorize chains of COND_EXPRs.

gcc/testsuite/
        PR tree-optimization/84913
        * gfortran.dg/vect/pr84913.f90: New test.

Added:
    trunk/gcc/testsuite/gfortran.dg/vect/pr84913.f90
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-vect-loop.c

Reply via email to