[PATCH] D87772: [SLP] sort candidates to increase chance of optimal compare reduction
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 16 08:53:46 PDT 2020
spatel created this revision.
spatel added reviewers: dtemirbulatov, ABataev, RKSimon, lebedev.ri.
Herald added subscribers: hiraditya, mcrosier.
Herald added a project: LLVM.
spatel requested review of this revision.
This is one (small) part of improving PR41312:
https://llvm.org/PR41312
As shown there and in the smaller tests here, if we have some member of the reduction values that does not match the others, we want to push it to the end (bring the matching members forward and together).
In the examples here, we have 5 candidates for the 4 slots of the reduction. If the one "wrong" compare is grouped with the others, it prevents forming the ideal v4i1 compare reduction.
https://reviews.llvm.org/D87772
Files:
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
llvm/test/Transforms/SLPVectorizer/X86/compare-reduce.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87772.292234.patch
Type: text/x-patch
Size: 5456 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200916/ffb04e5e/attachment.bin>
More information about the llvm-commits
mailing list