[PATCH] D56783: [SLP] Fix PR40310: The reduction nodes should stay scalar.

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 16 06:36:36 PST 2019


ABataev created this revision.
ABataev added reviewers: RKSimon, spatel, hfinkel, fedor.sergeev.

Sometimes the SLP vectorizer tries to vectorize the horizontal reduction
nodes during regular vectorization. This may happen inside of the loops,
when there are some vectorizable PHIs. Patch fixes this by checking if
the node is the reduction node and thus it must not be vectorized, it must
be gathered.


Repository:
  rL LLVM

https://reviews.llvm.org/D56783

Files:
  lib/Transforms/Vectorize/SLPVectorizer.cpp
  test/Transforms/SLPVectorizer/X86/PR39774.ll
  test/Transforms/SLPVectorizer/X86/PR40310.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56783.182031.patch
Type: text/x-patch
Size: 24530 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190116/8c7fdf9f/attachment.bin>


More information about the llvm-commits mailing list