[PATCH] D34760: [LV] Fix PR33613 - retain order of insertelements per part

Ayal Zaks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 28 09:04:21 PDT 2017


Ayal created this revision.
Herald added a subscriber: mzolotukhin.

Packing scalar values into vectors was originally done by generating the insertelements for all parts as a single sequence, immediately following the last scalar being packed. When changing the interface of ValueMap to getOrCreateVectorValue **per part** in r306381 (https://reviews.llvm.org/D32871), these insertelements were still generated immediately following the same last scalar, but their order per part got reversed because of this. This in turn broke the shuffle of first-order-recurrence, which assumes the insertelements of the last part UF-1 appears after the insertelements of all other parts.

This patch places each set of insertelements following the last scalar of that part, effectively supporting the above assumption.


https://reviews.llvm.org/D34760

Files:
  lib/Transforms/Vectorize/LoopVectorize.cpp
  test/Transforms/LoopVectorize/first-order-recurrence.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34760.104429.patch
Type: text/x-patch
Size: 5538 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170628/c8af4568/attachment.bin>


More information about the llvm-commits mailing list