[llvm] [LV] Add support for partial alias masking with tail folding (PR #182457)
Benjamin Maxwell via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 2 08:24:37 PDT 2026
================
@@ -1499,6 +1565,21 @@ class LoopVectorizationCostModel {
/// initialized during object construction.
std::optional<unsigned> VScaleForTuning;
+ bool isUniform(Value *V, ElementCount VF) const {
+ // With alias-masking our runtime VF is [2, VF] (and not necessarily a
+ // power-of-two). Something that is uniform for VF may not be for the full
+ // range.
+ assert(PartialAliasMaskingStatus != AliasMaskingStatus::NotDecided);
+ return PartialAliasMaskingStatus == AliasMaskingStatus::Disabled &&
+ Legal->isUniform(V, VF);
+ }
+
+ bool isUniformMemOp(Instruction &I, ElementCount VF) const {
----------------
MacDue wrote:
(added comment)
https://github.com/llvm/llvm-project/pull/182457
More information about the llvm-commits
mailing list