slp: fix is_linear_load_p to prevent multiple answers
authorTamar Christina <tamar.christina@arm.com>
Mon, 11 Jan 2021 09:56:44 +0000 (09:56 +0000)
committerTamar Christina <tamar.christina@arm.com>
Mon, 11 Jan 2021 09:56:44 +0000 (09:56 +0000)
commit39666d2b8858361b4921fe0ae87bba90a62d9b9a
treebc3823327c4070c29743b67cc771421ab89ea2b6
parent9a6c37e6ae520534993ef76dd45d016c8c86db21
slp: fix is_linear_load_p to prevent multiple answers

This fixes an issue where is_linear_load_p could return the incorrect
permutation kind because it is singe pass.

This arranges the candidates in such a way that there won't be any ambiguity so
that the function can still be linear but give correct values.

gcc/ChangeLog:

* tree-vect-slp-patterns.c (is_linear_load_p): Fix ambiguity.
gcc/tree-vect-slp-patterns.c