[all-commits] [llvm/llvm-project] 0ab67e: [LV][EVL] Introduce the EVLIndVarSimplify Pass for...
Min-Yih Hsu via All-commits
all-commits at lists.llvm.org
Wed May 14 13:50:13 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0ab67ec191673a148d84f3819f5c97aaa5b84364
https://github.com/llvm/llvm-project/commit/0ab67ec191673a148d84f3819f5c97aaa5b84364
Author: Min-Yih Hsu <min.hsu at sifive.com>
Date: 2025-05-14 (Wed, 14 May 2025)
Changed paths:
A llvm/include/llvm/Transforms/Vectorize/EVLIndVarSimplify.h
M llvm/lib/Passes/PassBuilder.cpp
M llvm/lib/Passes/PassBuilderPipelines.cpp
M llvm/lib/Passes/PassRegistry.def
M llvm/lib/Target/RISCV/RISCVTargetMachine.cpp
M llvm/lib/Transforms/Vectorize/CMakeLists.txt
A llvm/lib/Transforms/Vectorize/EVLIndVarSimplify.cpp
A llvm/test/Transforms/LoopVectorize/RISCV/evl-iv-simplify.ll
Log Message:
-----------
[LV][EVL] Introduce the EVLIndVarSimplify Pass for EVL-vectorized loops (#131005)
When we enable EVL-based loop vectorization w/ predicated tail-folding,
each vectorized loop has effectively two induction variables: one
calculates the step using (VF x vscale) and the other one increases the
IV by values returned from experiment.get.vector.length. The former,
also known as canonical IV, is more favorable for analyses as it's
"countable" in the sense of SCEV; the latter (EVL-based IV), however, is
more favorable to codegen, at least for those that support scalable
vectors like AArch64 SVE and RISC-V.
The idea is that we use canonical IV all the way until the end of all
vectorizers, where we replace it with EVL-based IV using EVLIVSimplify
introduced here. Such that we can have the best from both worlds.
This Pass is enabled by default in RISC-V. However, since we haven't
really vectorize loops with predicate tail-folding by default, this Pass
is no-op at this moment.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list