[COST]Improve cost model for shuffles in SLP.
authorAlexey Bataev <a.bataev@outlook.com>
Wed, 14 Apr 2021 14:49:32 +0000 (07:49 -0700)
committerAlexey Bataev <a.bataev@outlook.com>
Thu, 28 Apr 2022 17:04:41 +0000 (10:04 -0700)
commit75e1cf4a6a87e57da6b87e65121fc608dc4fb721
tree52e9c1a3fc2ec1160784a74de60997d73942106d
parentdb013b28c3d4a92cc007c878eb4d6585ba86dd1a
[COST]Improve cost model for shuffles in SLP.

Introduced masks where they are not added and improved target dependent
cost models to avoid returning of the incorrect cost results after
adding masks.

Differential Revision: https://reviews.llvm.org/D100486
llvm/include/llvm/Analysis/VectorUtils.h
llvm/lib/Analysis/VectorUtils.cpp
llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
llvm/lib/Target/X86/X86TargetTransformInfo.cpp
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
llvm/test/Analysis/CostModel/X86/reduction.ll
llvm/test/Analysis/CostModel/X86/shuffle-non-pow-2.ll
llvm/test/Analysis/CostModel/X86/shuffle-single-src.ll
llvm/test/Transforms/SLPVectorizer/X86/PR39774.ll