tree-optimization/96783 - fix vectorization of negative step SLP
authorRichard Biener <rguenther@suse.de>
Wed, 26 Aug 2020 12:24:01 +0000 (14:24 +0200)
committerRichard Biener <rguenther@suse.de>
Wed, 26 Aug 2020 12:28:49 +0000 (14:28 +0200)
commit71b6257e3a90995e1c1d3d2716a0eec5eef243db
treedfc83a6f216f1a57b4032e20c6eb56a3250a2420
parent1f53d8f1d3e7519bd81cc5874e43ed9896cf6180
tree-optimization/96783 - fix vectorization of negative step SLP

This appropriately uses VMAT_ELEMENTWISE when the vectors cannot be
filled from a single SLP group until we get more explicit support
for negative stride SLP.

2020-08-26  Richard Biener  <rguenther@suse.de>

PR tree-optimization/96783
* tree-vect-stmts.c (get_group_load_store_type): Use
VMAT_ELEMENTWISE for negative strides when we cannot
use VMAT_STRIDED_SLP.

* gcc.dg/vect/pr96783-1.c: New testcase.
* gcc.dg/vect/pr96783-2.c: Likewise.
gcc/testsuite/gcc.dg/vect/pr96783-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/pr96783-2.c [new file with mode: 0644]
gcc/tree-vect-stmts.c