[all-commits] [llvm/llvm-project] 0b61cd: [LV] Add epilogue minimum iteration check in VPlan...

Florian Hahn via All-commits all-commits at lists.llvm.org
Wed Apr 1 07:48:03 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0b61cd39e45ad7e0476740a5ecc455e7461488a4
      https://github.com/llvm/llvm-project/commit/0b61cd39e45ad7e0476740a5ecc455e7461488a4
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2026-04-01 (Wed, 01 Apr 2026)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
    M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
    M llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp
    M llvm/lib/Transforms/Vectorize/VPlanTransforms.h
    M llvm/test/Transforms/LoopVectorize/AArch64/epilog-vectorization-factors.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/induction-costs-sve.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/load-cast-context.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/low_trip_count_predicates.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/partial-reduce-sub-epilogue-vec.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/sve-epilog-vect-inloop-reductions.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/sve-epilog-vect-reductions.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/sve-epilog-vect-strict-reductions.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/sve-epilog-vect.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/sve-epilog-vscale-fixed.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/sve2-histcnt-epilogue.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/sve2-histcnt.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/transform-narrow-interleave-to-widen-memory-scalable.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/vector-reverse.ll
    M llvm/test/Transforms/LoopVectorize/VPlan/dissolve-replicate-regions.ll
    M llvm/test/Transforms/LoopVectorize/X86/transform-narrow-interleave-to-widen-memory-epilogue-vec.ll
    M llvm/test/Transforms/LoopVectorize/epilog-vectorization-reductions.ll

  Log Message:
  -----------
  [LV] Add epilogue minimum iteration check in VPlan as well. (#189372)

Update LV to also use the VPlan-based addMinimumIterationCheck for the
iteration count check for the epilogue.

As the VPlan-based addMinimumIterationCheck uses VPExpandSCEV, those
need to be placed in the entry block for now, moving vscale * VF * IC to
the entry for scalable vectors.

The new logic also fails to simplify some checks involving PtrToInt,
because they were only simplified when going through generated IR, then
folding some PtrToInt in IR, then constructing SCEVs again. But those
should be cleaned up by later combines, and there is not really much we
can do other than trying to go through IR.

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



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