[llvm] [LoopVectorize] Enable vectorisation of early exit loops with live-outs (PR #120567)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 9 14:57:50 PST 2025
================
@@ -3662,6 +3665,13 @@ class VPRegionBlock : public VPBlockBase {
/// VPRegionBlock.
VPBlockBase *Exiting;
+ /// Hold the Early Exit block of the SEME region, if one exists.
+ VPBasicBlock *EarlyExit;
+
+ /// If one exists, this keeps track of the vector early mask that triggered
+ /// the early exit.
+ VPValue *VectorEarlyExitCond;
+
/// An indicator whether this region is to generate multiple replicated
----------------
fhahn wrote:
Thanks, I still need to take a look at the latest update. By forcing a wide IV I meant is ensuring that there always will be a vector induction, from which we should be able to extract the lane for the early exit I think.
One way to ensure that would be to not mark induction updates as uniform if there's an user of the induction outside the loop for early exit loops (something like https://github.com/llvm/llvm-project/commit/5c0d7aad84d52a6afcbd3feb4eeffde5ff94a89d)
https://github.com/llvm/llvm-project/pull/120567
More information about the llvm-commits
mailing list