[all-commits] [llvm/llvm-project] 72e51d: Reapply "[LV] Use ExtractLane(LastActiveLane, V) l...

Florian Hahn via All-commits all-commits at lists.llvm.org
Wed Nov 26 11:32:03 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 72e51d389f66d9cc6b55fd74b56fbbd087672a43
      https://github.com/llvm/llvm-project/commit/72e51d389f66d9cc6b55fd74b56fbbd087672a43
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2025-11-26 (Wed, 26 Nov 2025)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
    M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
    M llvm/lib/Transforms/Vectorize/VPlan.h
    M llvm/lib/Transforms/Vectorize/VPlanAnalysis.cpp
    M llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h
    M llvm/lib/Transforms/Vectorize/VPlanPredicator.cpp
    M llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
    M llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
    M llvm/lib/Transforms/Vectorize/VPlanUnroll.cpp
    M llvm/lib/Transforms/Vectorize/VPlanVerifier.cpp
    M llvm/test/Transforms/LoopVectorize/RISCV/dead-ops-cost.ll
    M llvm/test/Transforms/LoopVectorize/RISCV/divrem.ll
    M llvm/test/Transforms/LoopVectorize/RISCV/first-order-recurrence-scalable-vf1.ll
    M llvm/test/Transforms/LoopVectorize/RISCV/scalable-tailfold.ll
    M llvm/test/Transforms/LoopVectorize/RISCV/tail-folding-fixed-order-recurrence.ll
    M llvm/test/Transforms/LoopVectorize/RISCV/uniform-load-store.ll
    M llvm/test/Transforms/LoopVectorize/X86/small-size.ll
    M llvm/test/Transforms/LoopVectorize/first-order-recurrence-tail-folding.ll
    M llvm/test/Transforms/LoopVectorize/lcssa-crashes.ll
    M llvm/test/Transforms/LoopVectorize/optsize.ll
    M llvm/test/Transforms/LoopVectorize/pr43166-fold-tail-by-masking.ll
    M llvm/test/Transforms/LoopVectorize/tail-folding-vectorization-factor-1.ll
    M llvm/test/Transforms/LoopVectorize/use-scalar-epilogue-if-tp-fails.ll

  Log Message:
  -----------
  Reapply "[LV] Use ExtractLane(LastActiveLane, V) live outs when tail-folding. (#149042)"

This reverts commit a6edeedbfa308876d6f2b1648729d52970bb07e6.

The following fixes have landed, addressing issues causing the original
revert:
* https://github.com/llvm/llvm-project/pull/169298
* https://github.com/llvm/llvm-project/pull/167897
* https://github.com/llvm/llvm-project/pull/168949

Original message:
Building on top of https://github.com/llvm/llvm-project/pull/148817,
introduce a new abstract LastActiveLane opcode that gets lowered to
Not(Mask) → FirstActiveLane(NotMask) → Sub(result, 1).

When folding the tail, update all extracts for uses outside the loop the
extract the value of the last actice lane.

See also https://github.com/llvm/llvm-project/issues/148603

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



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