[SLP]Fix getSpillCost functions.
authorAlexey Bataev <a.bataev@outlook.com>
Fri, 26 May 2023 17:35:25 +0000 (10:35 -0700)
committerAlexey Bataev <a.bataev@outlook.com>
Fri, 26 May 2023 19:19:28 +0000 (12:19 -0700)
commit95b631181a610dc8c94a699975a6e6b43709e5a2
tree4a81fcdee17bb7e69db985efcb77d07d7bf239cc
parent9b9e9abad6ca590fc5618f1ccab6f294519d17d5
[SLP]Fix getSpillCost functions.

There are several issues in the current implementation. The instructions
are not properly ordered, if they are placed in different basic blocks,
need to reverse the order of blocks. Also, need to exclude
non-vectorizable nodes and check for CallBase, not CallInst, otherwise
invoke calls are not handled correctly.
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
llvm/test/Transforms/SLPVectorizer/AArch64/landing_pad.ll