[all-commits] [llvm/llvm-project] 80c43b: [VPlan] Add ExtractLane VPInst to extract across m...

Florian Hahn via All-commits all-commits at lists.llvm.org
Sun Jul 27 00:08:48 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 80c43b6c07f25792718dc2ee3490b9d817c65b1f
      https://github.com/llvm/llvm-project/commit/80c43b6c07f25792718dc2ee3490b9d817c65b1f
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2025-07-27 (Sun, 27 Jul 2025)

  Changed paths:
    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/VPlanRecipes.cpp
    M llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
    M llvm/lib/Transforms/Vectorize/VPlanUnroll.cpp
    M llvm/test/Transforms/LoopVectorize/AArch64/single-early-exit-interleave.ll
    M llvm/test/Transforms/LoopVectorize/single-early-exit-interleave-hint.ll
    M llvm/test/Transforms/LoopVectorize/single-early-exit-interleave.ll
    M llvm/test/Transforms/LoopVectorize/vector-loop-backedge-elimination-early-exit.ll

  Log Message:
  -----------
  [VPlan] Add ExtractLane VPInst to extract across multiple parts. (#148817)

This patch adds a new ExtractLane VPInstruction which extracts across
multiple parts using a wide index, to be used in combination with
FirstActiveLane.

The patch updates early-exit codegen to use it instead ExtractElement,
which is only per-part. With this change, interleaving should work
correctly with early-exit loops.

The patch removes the restrictions added in 6f43754e9 (#145877), but
does not yet automatically select interleave counts > 1 for early-exit
loops.

I'll share a patch as follow-up. The cost of extracting a lane adds
non-trivial overhead in the exit block, so that should be considered
when picking the interleave count.

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



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