[PATCH] D114528: [LV] Make sure VF doesn't exceed compile time known TC
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 25 04:58:05 PST 2021
dmgreen added a comment.
Sounds sensible to me.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:1747
+ ElementCount UserVF,
+ bool foldTailByMasking);
----------------
foldTailByMasking -> FoldTailByMasking
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:6078
+ (!foldTailByMasking || isPowerOf2_32(ConstTripCount))) {
// We need to clamp the VF to be the ConstTripCount. There is no point in
// choosing a higher viable VF as done in the loop below. If
----------------
Can you update this comment..
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:6083
LLVM_DEBUG(dbgs() << "LV: Clamping the MaxVF to the constant trip count: "
<< ConstTripCount << "\n");
+ return ElementCount::getFixed(PowerOf2Floor(ConstTripCount));
----------------
.. and this debug message.
================
Comment at: llvm/test/Transforms/LoopVectorize/X86/known_TC.ll:7
; TODO: Make sure selected VF for the main loop doesn't exceed TC.
; TODO: Make sure selected VF for the epilog loop doesn't exceed remaining TC.
----------------
This can be removed now?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114528/new/
https://reviews.llvm.org/D114528
More information about the llvm-commits
mailing list