[all-commits] [llvm/llvm-project] 864977: [VectorCombine] Scalarize vector load/extract.
Florian Hahn via All-commits
all-commits at lists.llvm.org
Mon May 24 01:30:12 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 86497785d540e59eaca24bed4219ddec183cbc9b
https://github.com/llvm/llvm-project/commit/86497785d540e59eaca24bed4219ddec183cbc9b
Author: Florian Hahn <flo at fhahn.com>
Date: 2021-05-24 (Mon, 24 May 2021)
Changed paths:
M llvm/lib/Transforms/Vectorize/VectorCombine.cpp
M llvm/test/Transforms/VectorCombine/AArch64/load-extractelement-scalarization.ll
M llvm/test/Transforms/VectorCombine/X86/load-inseltpoison.ll
M llvm/test/Transforms/VectorCombine/X86/load.ll
Log Message:
-----------
[VectorCombine] Scalarize vector load/extract.
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.
Reviewed By: spatel
Differential Revision: https://reviews.llvm.org/D100273
More information about the All-commits
mailing list