[SLP] Fix for PR32086: Count InsertElementInstr of the same elements as shuffle.
Summary: If the same value is going to be vectorized several times in the same tree entry, this entry is considered to be a gather entry and cost of this gather is counter as cost of InsertElementInstrs for each gathered value. But we can consider these elements as ShuffleInstr with SK_PermuteSingle shuffle kind. Reviewers: spatel, RKSimon, mkuper, hfinkel Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D38697 llvm-svn: 323246
Showing
- llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp 343 additions, 121 deletionsllvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
- llvm/test/Transforms/SLPVectorizer/X86/PR32086.ll 5 additions, 6 deletionsllvm/test/Transforms/SLPVectorizer/X86/PR32086.ll
- llvm/test/Transforms/SLPVectorizer/X86/blending-shuffle.ll 11 additions, 9 deletionsllvm/test/Transforms/SLPVectorizer/X86/blending-shuffle.ll
- llvm/test/Transforms/SLPVectorizer/X86/hoist.ll 8 additions, 9 deletionsllvm/test/Transforms/SLPVectorizer/X86/hoist.ll
Loading
Please register or sign in to comment