]> git.ipfire.org Git - people/ms/gcc.git/commit
Fix SLP downward group access classification [PR92420]
authorRichard Sandiford <richard.sandiford@arm.com>
Mon, 11 Nov 2019 19:43:52 +0000 (19:43 +0000)
committerRichard Sandiford <richard.sandiford@arm.com>
Tue, 18 Feb 2020 08:51:59 +0000 (08:51 +0000)
commit2d8ea3a0a6095a56b7c59c50b1068d602cde934a
treeb5ce061897a96dfce965172fd46594376b22e06e
parent65709f4b93c74101440ab16bf4bddf6e44672177
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.

2020-02-18  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
Backport from mainline
2019-11-11  Richard Sandiford  <richard.sandiford@arm.com>

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/
PR tree-optimization/92420
* gcc.dg/vect/pr92420.c: New test.
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/vect/pr92420.c [new file with mode: 0644]
gcc/tree-vect-stmts.c