[PATCH] D27919: [Loop Vectorizer] Interleave vs Gather - in some cases Gather is better.

Elena Demikhovsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 5 06:07:00 PST 2017


delena updated this revision to Diff 83227.
delena added a comment.

Now, when the interleaving cost calculation is correct, I compare the cost of 3 possible options - interleave, gather and scalar and choose the better option.
The decision made by cost model should be saved and latter used when we generate the vector code.

The code is refactored in order to allow this comparison, but the comparison is the *only* functional change in the code. The rest of the logic remains the same.

I added a test case that demonstrates gather - vs - interleave case.


Repository:
  rL LLVM

https://reviews.llvm.org/D27919

Files:
  ../lib/Transforms/Vectorize/LoopVectorize.cpp
  ../test/Analysis/CostModel/X86/interleave-load-i32.ll
  ../test/Analysis/CostModel/X86/interleave-store-i32.ll
  ../test/Transforms/LoopVectorize/X86/gather-vs-interleave.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27919.83227.patch
Type: text/x-patch
Size: 24360 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170105/06db008c/attachment-0001.bin>


More information about the llvm-commits mailing list