diff options
author | Florian Hahn <flo@fhahn.com> | 2025-07-15 16:19:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-07-15 15:19:27 +0100 |
commit | 02d3738be92eac38cebfb7b670673abb9538ca76 (patch) | |
tree | d4a2c70412296081241b452fdd93c34737a05210 /llvm/lib/CodeGen/MachineSink.cpp | |
parent | 9f7937401b62d95f2ebe86072d6f277eb9745cd0 (diff) | |
download | llvm-02d3738be92eac38cebfb7b670673abb9538ca76.zip llvm-02d3738be92eac38cebfb7b670673abb9538ca76.tar.gz llvm-02d3738be92eac38cebfb7b670673abb9538ca76.tar.bz2 |
[AArch64,TTI] Remove RealUse check for vector insert/extract costs. (#146526)
getVectorInstrCostHelper would return costs of zero for vector
inserts/extracts that move data between GPR and vector registers, if
there was no 'real' use, i.e. there was no corresponding existing
instruction.
This meant that passes like LoopVectorize and SLPVectorizer, which
likely are the main users of the interface, would understimate the cost
of insert/extracts that move data between GPR and vector registers,
which has non-trivial costs.
The patch removes the special case and only returns costs of zero for
lane 0 if it there is no need to transfer between integer and vector
registers.
This impacts a number of SLP test, and most of them look like general
improvements.I think the change should make things more accurate for any
AArch64 target, but if not it could also just be Apple CPU specific.
I am seeing +2% end-to-end improvements on SLP-heavy workloads.
PR: https://github.com/llvm/llvm-project/pull/146526
Diffstat (limited to 'llvm/lib/CodeGen/MachineSink.cpp')
0 files changed, 0 insertions, 0 deletions