[PATCH] D133441: [SLP] Look ahead for mutual horizontal reductions.

Alexandros Lamprineas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 7 11:06:20 PDT 2022


labrinea created this revision.
labrinea added reviewers: vporpo, fhahn, ABataev.
Herald added a subscriber: hiraditya.
Herald added a project: All.
labrinea requested review of this revision.
Herald added a subscriber: pcwang-thead.
Herald added a project: LLVM.

When we try to reduce a horizontal reduction which has external users, the vectorization may be considered unprofitable because of the scalar extraction cost. However, we sometimes encounter mutual reductions cancelling each other out without actually having to extract any scalars. This fixes issue #55350 <https://github.com/llvm/llvm-project/issues/55350>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D133441

Files:
  llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
  llvm/test/Transforms/SLPVectorizer/AArch64/multiple_reduction.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133441.458514.patch
Type: text/x-patch
Size: 49048 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220907/4be96338/attachment-0001.bin>


More information about the llvm-commits mailing list