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

--- Comment #2 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> 
---
Author: rsandifo
Date: Mon Nov 11 19:43:52 2019
New Revision: 278064

URL: https://gcc.gnu.org/viewcvs?rev=278064&root=gcc&view=rev
Log:
Fix SLP downward group access classification (PR92420)

This PR was caused by the SLP handling in get_group_load_store_type
returning VMAT_CONTIGUOUS rather than VMAT_CONTIGUOUS_REVERSE for
downward groups.

A more elaborate fix would be to try to combine the reverse permutation
into SLP_TREE_LOAD_PERMUTATION for loads, but that's really a follow-on
optimisation and not backport material.  It might also not necessarily
be a win, if the target supports (say) reversing and odd/even swaps
as independent permutes but doesn't recognise the combined form.

2019-11-11  Richard Sandiford  <richard.sandif...@arm.com>

gcc/
        PR tree-optimization/92420
        * tree-vect-stmts.c (get_negative_load_store_type): Move further
        up file.
        (get_group_load_store_type): Use it for reversed SLP accesses.

gcc/testsuite/
        * gcc.dg/vect/pr92420.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/vect/pr92420.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-vect-stmts.c

Reply via email to