[PATCH] D100273: [VectorCombine] Scalarize vector load/extract.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 11 14:04:36 PDT 2021
fhahn created this revision.
fhahn added reviewers: spatel, RKSimon, lebedev.ri.
Herald added a subscriber: hiraditya.
fhahn requested review of this revision.
Herald added a project: LLVM.
This patch adds a new combine that tries to scalarize chains of
`extractelement (load %ptr), %idx` to `load (gep %ptr, %idx)`. This is
profitable when extracting only a few elements out of a large vector.
At the moment, , `store (extractelement (load %ptr), %idx), %ptr`
operations on large vectors result in huge code in the backend.
This can easily be triggered by using the matrix extension, e.g.
https://clang.godbolt.org/z/qsccPdPf4
This should complement D98240 <https://reviews.llvm.org/D98240>.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D100273
Files:
llvm/lib/Transforms/Vectorize/VectorCombine.cpp
llvm/test/Transforms/VectorCombine/AArch64/load-extractelement-scalarization.ll
llvm/test/Transforms/VectorCombine/X86/load-inseltpoison.ll
llvm/test/Transforms/VectorCombine/X86/load.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100273.336689.patch
Type: text/x-patch
Size: 14911 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210411/97c20230/attachment.bin>
More information about the llvm-commits
mailing list