[llvm] [NFC][LV]: Differentiate between Pred and Unpred masked operations. (PR #169509)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 8 14:21:53 PDT 2026
================
@@ -714,9 +717,16 @@ class LoopVectorizationLegality {
AssumptionCache *AC;
/// While vectorizing these instructions we have to generate a
- /// call to the appropriate masked intrinsic or drop them in case of
- /// conditional assumes.
- SmallPtrSet<const Instruction *, 8> MaskedOp;
+ /// call to the appropriate masked intrinsic or drop them.
+ /// In order to differentiate between control flow introduced at the source
+ /// level and that introduced by the loop vectoriser during tail-folding, we
+ /// keep two lists:
+ /// 1) UnpredMaskedOp - instructions that need masking if we are
+ /// in conditionally executed block.
+ /// 2) PredMaskedOp - instructions that need masking if we are in
+ /// a predicated loop.
+ SmallPtrSet<const Instruction *, 8> UnpredMaskedOps;
----------------
fhahn wrote:
Tthis naming is confusing, something like `ConditionallyExecutedMaskedOps` or something would be clearer.
https://github.com/llvm/llvm-project/pull/169509
More information about the llvm-commits
mailing list