[all-commits] [llvm/llvm-project] aa2402: [VPlan] Unroll VPReplicateRecipe by VF. (#142433)

Florian Hahn via All-commits all-commits at lists.llvm.org
Thu Jun 26 03:19:30 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: aa2402931908317f5cc19b164ef17c5a74f2ae67
      https://github.com/llvm/llvm-project/commit/aa2402931908317f5cc19b164ef17c5a74f2ae67
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2025-06-26 (Thu, 26 Jun 2025)

  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/VPlanPatternMatch.h
    M llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
    M llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
    M llvm/lib/Transforms/Vectorize/VPlanTransforms.h
    M llvm/lib/Transforms/Vectorize/VPlanUnroll.cpp
    M llvm/test/Transforms/LoopVectorize/X86/fixed-order-recurrence.ll
    M llvm/test/Transforms/LoopVectorize/X86/interleave-ptradd-with-replicated-operand.ll
    M llvm/test/Transforms/LoopVectorize/X86/pr51366-sunk-instruction-used-outside-of-loop.ll
    M llvm/test/Transforms/LoopVectorize/first-order-recurrence.ll
    M llvm/test/Transforms/LoopVectorize/invariant-store-vectorization-2.ll
    M llvm/test/Transforms/LoopVectorize/iv_outside_user.ll
    M llvm/test/Transforms/LoopVectorize/load-deref-pred-align.ll
    M llvm/test/Transforms/LoopVectorize/struct-return-replicate.ll
    M llvm/test/Transforms/LoopVectorize/uniform-blend.ll

  Log Message:
  -----------
  [VPlan] Unroll VPReplicateRecipe by VF. (#142433)

Explicitly unroll VPReplicateRecipes outside replicate regions by VF,
replacing them by VF single-scalar recipes. Extracts for operands are
added as needed and the scalar results are combined to a vector using a
new BuildVector VPInstruction.

It also adds a few folds to simplify unnecessary extracts/BuildVectors.

It also adds a BuildStructVector opcode for handling of calls that have
struct return types.

VPReplicateRecipe in replicate regions can will be unrolled as follow
up, turing non-single-scalar VPReplicateRecipes into 'abstract', i.e.
not executable.

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



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