[llvm] [LV] Add initial support for partial alias masking (PR #177599)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 9 03:47:10 PST 2026
================
@@ -300,9 +300,17 @@ class LoopVectorizationLegality {
/// masking.
bool canFoldTailByMasking() const;
+ /// Returns true if all instructions in the loop support masking or
+ /// speculation.
+ ///
+ /// The mask may be loop-invariant if it represents a maximum safe dependence
+ /// distance (alias mask) or loop-variant if it is based on the induction
+ /// variable (e.g. tail-folding).
+ bool canMaskLoop() const;
----------------
fhahn wrote:
I think it would help to simplify the patch if we initially just do this for loops already tail-folded? In that case, we could simplify update the header mask?
https://github.com/llvm/llvm-project/pull/177599
More information about the llvm-commits
mailing list