[all-commits] [llvm/llvm-project] 35bb9b: [SLP] Limit GEP lists based on width of index comp...
Florian Hahn via All-commits
all-commits at lists.llvm.org
Wed Jun 24 12:03:45 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 35bb9bfbb099eb78dbed8f96d7cd7f5506d6584f
https://github.com/llvm/llvm-project/commit/35bb9bfbb099eb78dbed8f96d7cd7f5506d6584f
Author: Florian Hahn <flo at fhahn.com>
Date: 2020-06-24 (Wed, 24 Jun 2020)
Changed paths:
M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
M llvm/test/Transforms/SLPVectorizer/AArch64/getelementptr.ll
Log Message:
-----------
[SLP] Limit GEP lists based on width of index computation.
D68667 introduced a tighter limit to the number of GEPs to simplify
together. The limit was based on the vector element size of the pointer,
but the pointers themselves are not actually put in vectors.
IIUC we try to vectorize the index computations here, so we should base
the limit on the vector element size of the computation of the index.
This restores the test regression on AArch64 and also restores the
vectorization for a important pattern in SPEC2006/464.h264ref on
AArch64 (@test_i16_extend). We get a large benefit from doing a single
load up front and then processing the index computations in vectors.
Note that we could probably even further improve the AArch64 codegen, if
we would do zexts to i32 instead of i64 for the sub operands and then do
a single vector sext on the result of the subtractions. AArch64 provides
dedicated vector instructions to do so. Sketch of proof in Alive:
https://alive2.llvm.org/ce/z/A4xYAB
Reviewers: craig.topper, RKSimon, xbolva00, ABataev, spatel
Reviewed By: ABataev, spatel
Differential Revision: https://reviews.llvm.org/D82418
More information about the All-commits
mailing list