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

--- Comment #1 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> 
---
Author: rsandifo
Date: Tue Jan 23 10:42:10 2018
New Revision: 256976

URL: https://gcc.gnu.org/viewcvs?rev=256976&root=gcc&view=rev
Log:
Disable some patterns for fold-left reductions (PR 83965)

In this PR we recognised a PLUS_EXPR as a fold-left reduction,
then applied pattern matching to convert it to a WIDEN_SUM_EXPR.
We need to keep the original code in this case since we implement
the reduction using scalar rather than vector operations.

2018-01-23  Richard Sandiford  <richard.sandif...@linaro.org>

gcc/
        PR tree-optimization/83965
        * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
        (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
        instead of checking only for a reduction.
        (vect_recog_widen_sum_pattern): Likewise.

gcc/testsuite/
        PR tree-optimization/83965
        * gcc.dg/vect/pr83965.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/vect/pr83965.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-vect-patterns.c

Reply via email to