[PATCH] D132773: [SLP] Workaround for vectorizing loads with more than one store uses.

Vasileios Porpodas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 26 17:00:28 PDT 2022


vporpo created this revision.
vporpo added reviewers: dmgreen, fhahn, ABataev, RKSimon, vdmitrie.
Herald added subscribers: hiraditya, kristof.beyls.
Herald added a project: All.
vporpo requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead.
Herald added a project: LLVM.

   L0      L1
  / \     /  \

S0  S0'  S1  S1'

In AArch64 this simple pattern of loads with multiple store users is not getting
vectorized because of the cost of the external uses.
This patch is a workaround that reduces the cost of the external use if the def
is a load and the user can be found in the `Stores` seeds map.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D132773

Files:
  llvm/include/llvm/Transforms/Vectorize/SLPVectorizer.h
  llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
  llvm/test/Transforms/SLPVectorizer/AArch64/load-used-by-two-stores.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132773.456066.patch
Type: text/x-patch
Size: 12042 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220827/11279c69/attachment.bin>


More information about the llvm-commits mailing list