aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp
diff options
context:
space:
mode:
authorAlban Bridonneau <alban.bridonneau@arm.com>2022-04-19 11:23:44 +0100
committerMalhar Jajoo <malhar.jajoo@arm.com>2022-04-19 11:58:01 +0100
commit8daffd1dfb55c706d8661c65ed05380bcc68ce4b (patch)
tree8411573e54106b45dd25bbc03536a4813fcdeba5 /clang/lib/Frontend/CreateInvocationFromCommandLine.cpp
parente01dbabdd18d5e3af5134818dab8c67341cd25d5 (diff)
downloadllvm-8daffd1dfb55c706d8661c65ed05380bcc68ce4b.zip
llvm-8daffd1dfb55c706d8661c65ed05380bcc68ce4b.tar.gz
llvm-8daffd1dfb55c706d8661c65ed05380bcc68ce4b.tar.bz2
Fix SLP score for out of order contiguous loads
SLP uses the distance between pointers to optimize the getShallowScore. However the current code misses the case where we are trying to vectorize for VF=4, and the distance between pointers is 2. In that case the returned score reflects the case of contiguous loads, when it's not actually contiguous. The attached unit tests have 5 loads, where the program order is not the same as the offset order in the GEPs. So, the choice of which 4 loads to bundle together matters. If we pick the first 4, then we can vectorize with VF=4. If we pick the last 4, then we can only vectorize with VF=2. This patch makes a more conservative choice, to consider all distances>1 to not be a case of contiguous load, and give those cases a lower score. Reviewed By: ABataev Differential Revision: https://reviews.llvm.org/D123516
Diffstat (limited to 'clang/lib/Frontend/CreateInvocationFromCommandLine.cpp')
0 files changed, 0 insertions, 0 deletions