[PATCH] D116690: [SLP]Initialize the lane with the given value instead of default 0.

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 5 13:07:27 PST 2022


ABataev created this revision.
ABataev added reviewers: RKSimon, vporpo, anton-afanasyev, dtemirbulatov.
Herald added a subscriber: hiraditya.
ABataev requested review of this revision.
Herald added a project: LLVM.

There is a bug in the reordering analysis stage. If the element with the
given hash is not added to the map but has the same number of APOs and
instructions with same parent, but different instruction opcode, it will
be initalized with default values and then the counter is increased by

1. But the lane is not updated and default to 0 instead of the actual `Lane` value. It leads to the fact that the analysis is useless in many cases and default to lane 0 instead of actual lane with the minimum amount of APO operands.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D116690

Files:
  llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
  llvm/test/Transforms/SLPVectorizer/AArch64/transpose-inseltpoison.ll
  llvm/test/Transforms/SLPVectorizer/AArch64/transpose.ll
  llvm/test/Transforms/SLPVectorizer/X86/insert-shuffle.ll
  llvm/test/Transforms/SLPVectorizer/X86/matched-shuffled-entries.ll
  llvm/test/Transforms/SLPVectorizer/X86/operandorder.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116690.397684.patch
Type: text/x-patch
Size: 12160 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220105/ffaac10d/attachment.bin>


More information about the llvm-commits mailing list