[PATCH] D103912: LoadStoreVectorizer: support different operand orders in the add sequence match

Viacheslav Nikolaev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 8 10:13:18 PDT 2021


wvoquine created this revision.
Herald added a subscriber: hiraditya.
wvoquine requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

First we refactor the code which does no wrapping add sequences
match: we need to allow different operand orders for
the key add instructions involved in the match.

Then we use the refactored code trying 4 variants of matching operands.

Originally the code relied on the fact that the matching operands
of the two last add instructions of memory index calculations 
had the same LHS argument. But which operand is the same
in the two instructions is actually not essential, so now we allow
that to be any of LHS or RHS of each of the two instructions.
This increases the chances of vectorization to happen.


https://reviews.llvm.org/D103912

Files:
  llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp
  llvm/test/Transforms/LoadStoreVectorizer/X86/vectorize-i8-nested-add.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103912.350646.patch
Type: text/x-patch
Size: 14013 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210608/de10ce74/attachment.bin>


More information about the llvm-commits mailing list