[all-commits] [llvm/llvm-project] b4c6d1: [LoopVectorizer] Don't perform interleaving of pre...
David Green via All-commits
all-commits at lists.llvm.org
Mon Feb 7 11:34:42 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b4c6d1bb379192cb5b712fda9f60cd105f21194f
https://github.com/llvm/llvm-project/commit/b4c6d1bb379192cb5b712fda9f60cd105f21194f
Author: David Green <david.green at arm.com>
Date: 2022-02-07 (Mon, 07 Feb 2022)
Changed paths:
M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
M llvm/test/Transforms/LoopVectorize/AArch64/scalar_interleave.ll
Log Message:
-----------
[LoopVectorizer] Don't perform interleaving of predicated scalar loops
The vectorizer will choose at times to "vectorize" loops with a scalar
factor (VF=1) with interleaving (IC > 1). This can occasionally produce
better code than the unroller (notable for reductions where it can
produce independent reduction chains that are combined after the loop).
At times this is not very beneficial though, for example when runtime
checks are needed or when the scalar code requires predication.
This addresses the second point, preventing the vectorizer from
interleaving when the scalar loop will require predication. This
prevents it from making a bit of a mess, that is worse than the original
and better left for the unroller to unroll if beneficial. It helps
reverse some of the regressions from D118090.
Differential Revision: https://reviews.llvm.org/D118566
More information about the All-commits
mailing list