[SLP][VECT] Add check to fix 96837
authorJoel Hutton <joel.hutton@arm.com>
Wed, 30 Sep 2020 14:08:13 +0000 (15:08 +0100)
committerJoel Hutton <joel.hutton@arm.com>
Wed, 30 Sep 2020 14:16:29 +0000 (15:16 +0100)
commit97b798d80baf945ea28236eef3fa69f36626b579
tree6e1f24cccbeeb478f55aeda3f0cacc408d56a60b
parentaa248b8db9a7594fcc84e52a84d56526d4284ca8
[SLP][VECT] Add check to fix 96837

The following patch adds a simple check to prevent slp stmts from
vector constructors being rearranged. vect_attempt_slp_rearrange_stmts
tries to rearrange to avoid a load permutation.

This fixes PR target/96837
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96827

gcc/ChangeLog:

2020-09-29  Joel Hutton  <joel.hutton@arm.com>

PR target/96837
* tree-vect-slp.c (vect_analyze_slp): Do not call
vect_attempt_slp_rearrange_stmts for vector constructors.

gcc/testsuite/ChangeLog:

2020-09-29  Joel Hutton  <joel.hutton@arm.com>

PR target/96837
* gcc.dg/vect/bb-slp-49.c: New test.
gcc/testsuite/gcc.dg/vect/bb-slp-49.c [new file with mode: 0644]
gcc/tree-vect-slp.c