[SLP]Do not count perfect diamond matches for gathers several times.
authorAlexey Bataev <a.bataev@outlook.com>
Thu, 6 May 2021 20:44:03 +0000 (13:44 -0700)
committerAlexey Bataev <a.bataev@outlook.com>
Mon, 10 May 2021 14:08:07 +0000 (07:08 -0700)
commit30463bc3f1839e8a238be4c137e2356f3cca2771
tree654f01ca6c760747945c43cc1c2a56d575aad1e1
parent4677d795b2042e783952fdcdaefaf2ca6bfb72a6
[SLP]Do not count perfect diamond matches for gathers several times.

Need to remove the old code for avoiding double counting of the gather
nodes with perfect diamond matches within the tree after we started
detecting perfect/shuffled matching in the previous patch D100495. We
may skip the cost for such nodes completely.

Differential Revision: https://reviews.llvm.org/D102023
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
llvm/test/Transforms/SLPVectorizer/AArch64/gather-cost.ll