[PATCH] D107080: [SLP]Fix an assertion for the size of user nodes.

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 29 07:52:20 PDT 2021


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

For the nodes with reused scalars the user may be not only of the size
of the final shuffle but also of the size of the scalars themselves,
need to check for this. It is safe to just modify the check here, since
the order of the scalars themselves is preserved, only indeces of the
reused scalars is changed. So, the users with the same size as the
number of scalars in the node, will not be affected, they still will get
the operands in the required order.

Reported by @mstorsjo in D105020 <https://reviews.llvm.org/D105020>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D107080

Files:
  llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
  llvm/test/Transforms/SLPVectorizer/AArch64/reorder-fmuladd-crash.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107080.362779.patch
Type: text/x-patch
Size: 6479 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210729/ee4b94d6/attachment.bin>


More information about the llvm-commits mailing list