[SLP]Do not swap not counted extractelements.
authorAlexey Bataev <a.bataev@outlook.com>
Tue, 21 Feb 2023 18:20:41 +0000 (10:20 -0800)
committerAlexey Bataev <a.bataev@outlook.com>
Tue, 21 Feb 2023 21:16:51 +0000 (13:16 -0800)
commitcbcdd747e85b8d33b821d94d8114b971f31fd0d2
treef03e13f1a3621d9f82cdb3ea8ac94042c4613f6e
parent58a75c6a4b838014dc9c96022a8a421773428707
[SLP]Do not swap not counted extractelements.

No need to swap extractelements, which were not excluded from the list
during cost analysis. It leads to incorrect cost calculation and make
vector code more profitable than it is actually is.
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
llvm/test/Transforms/SLPVectorizer/AArch64/extractelements-to-shuffle.ll