[all-commits] [llvm/llvm-project] 5c93fc: [VPlan] Model initial header mask as region value....

Florian Hahn via All-commits all-commits at lists.llvm.org
Wed Jul 8 14:38:34 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5c93fce720433b7302c4ac2e011ffb997c2fb977
      https://github.com/llvm/llvm-project/commit/5c93fce720433b7302c4ac2e011ffb997c2fb977
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2026-07-08 (Wed, 08 Jul 2026)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
    M llvm/lib/Transforms/Vectorize/VPlan.cpp
    M llvm/lib/Transforms/Vectorize/VPlan.h
    M llvm/lib/Transforms/Vectorize/VPlanAnalysis.cpp
    M llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp
    M llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h
    M llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
    M llvm/lib/Transforms/Vectorize/VPlanTransforms.h
    M llvm/lib/Transforms/Vectorize/VPlanUtils.cpp
    M llvm/lib/Transforms/Vectorize/VPlanUtils.h
    M llvm/lib/Transforms/Vectorize/VPlanVerifier.cpp
    M llvm/test/Transforms/LoopVectorize/AArch64/conditional-branches-cost.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/fold-tail-low-trip-count.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/force-target-instruction-cost.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/induction-costs-sve.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/predicated-costs.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/reduction-recurrence-costs-sve.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/store-costs-sve.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/widen-gep-all-indices-invariant.ll
    M llvm/test/Transforms/LoopVectorize/ARM/mve-saddsatcost.ll
    M llvm/test/Transforms/LoopVectorize/ARM/tail-folding-counting-down.ll
    M llvm/test/Transforms/LoopVectorize/SystemZ/force-target-instruction-cost.ll
    M llvm/test/Transforms/LoopVectorize/SystemZ/predicated-first-order-recurrence.ll
    M llvm/test/Transforms/LoopVectorize/VPlan/X86/vplan-vp-intrinsics.ll
    M llvm/test/Transforms/LoopVectorize/VPlan/buildvector-first-lane-only.ll
    M llvm/test/Transforms/LoopVectorize/VPlan/conditional-scalar-assignment-vplan.ll
    M llvm/test/Transforms/LoopVectorize/VPlan/first-order-recurrence-sink-replicate-region.ll
    M llvm/test/Transforms/LoopVectorize/VPlan/tail-folding.ll
    M llvm/test/Transforms/LoopVectorize/VPlan/vplan-print-before-after-all.ll
    M llvm/test/Transforms/LoopVectorize/VPlan/vplan-printing-alias-mask.ll
    M llvm/test/Transforms/LoopVectorize/VPlan/vplan-printing-reductions-tail-folded.ll
    M llvm/test/Transforms/LoopVectorize/VPlan/vplan-sink-scalars-and-merge.ll
    M llvm/test/Transforms/LoopVectorize/X86/cost-model.ll
    M llvm/test/Transforms/LoopVectorize/X86/drop-inbounds-flags-for-reverse-vector-pointer.ll
    M llvm/test/Transforms/LoopVectorize/X86/fold-tail-low-trip-count.ll
    M llvm/test/Transforms/LoopVectorize/X86/induction-costs.ll
    M llvm/test/Transforms/LoopVectorize/X86/pr81872.ll
    M llvm/test/Transforms/LoopVectorize/X86/small-size.ll
    M llvm/test/Transforms/LoopVectorize/X86/vectorize-interleaved-accesses-gap.ll
    M llvm/test/Transforms/LoopVectorize/alias-mask.ll
    M llvm/test/Transforms/LoopVectorize/find-last-iv-sinkable-expr-tail-folding.ll
    M llvm/test/Transforms/LoopVectorize/first-order-recurrence-tail-folding.ll
    M llvm/test/Transforms/LoopVectorize/first-order-recurrence.ll
    M llvm/test/Transforms/LoopVectorize/iv-select-cmp-fold-tail.ll
    M llvm/test/Transforms/LoopVectorize/optsize.ll
    M llvm/test/Transforms/LoopVectorize/pr51614-fold-tail-by-masking.ll
    M llvm/test/Transforms/LoopVectorize/reduction-order.ll
    M llvm/test/Transforms/LoopVectorize/select-reduction.ll
    M llvm/test/Transforms/LoopVectorize/store-reduction-results-in-tail-folded-loop.ll
    M llvm/test/Transforms/LoopVectorize/tail-folding-div.ll
    M llvm/test/Transforms/LoopVectorize/tail-folding-replicate-region.ll
    M llvm/test/Transforms/LoopVectorize/tail-folding-vectorization-factor-1.ll
    M llvm/test/Transforms/LoopVectorize/use-scalar-epilogue-if-tp-fails.ll
    M llvm/test/Transforms/PhaseOrdering/ARM/arm_add_q7.ll

  Log Message:
  -----------
  [VPlan] Model initial header mask as region value. (#196199)

Introduce a new VPRegionValue for the header mask, managed by loop
regions similar to the canonical IV.

The main benefit is we do not need to materialize the mask early and it
is trivial to find (no more need for patterns hard-coded in findHeaderMask).

It is currently materialized before computing costs, as we compute costs
for part of it currently.

PR: https://github.com/llvm/llvm-project/pull/196199



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list