[all-commits] [llvm/llvm-project] c9dd14: [VPlan] Compute interleave count for VPlan. (#149702)

Florian Hahn via All-commits all-commits at lists.llvm.org
Tue Aug 5 01:43:17 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c9dd14d1d4c357ad29e0e5c446f1bb8f596ab9c0
      https://github.com/llvm/llvm-project/commit/c9dd14d1d4c357ad29e0e5c446f1bb8f596ab9c0
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2025-08-05 (Tue, 05 Aug 2025)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
    M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
    M llvm/test/Transforms/LoopVectorize/AArch64/predication_costs.ll
    M llvm/test/Transforms/LoopVectorize/SystemZ/load-store-scalarization-cost.ll

  Log Message:
  -----------
  [VPlan] Compute interleave count for VPlan. (#149702)

Move selectInterleaveCount to LoopVectorizationPlanner and retrieve some
information directly from VPlan. Register pressure was already computed
for a VPlan, and with this patch we now also check for reductions
directly on VPlan, as well as checking how many load and store
operations remain in the loop.

This should be mostly NFC, but we may compute slightly different
interleave counts, except for some edge cases, e.g. where dead loads
have been removed. This shouldn't happen in practice, and the patch
doesn't cause changes across a large test corpus on AArch64.

Computing the interleave count based on VPlan allows for making better
decisions in presence of VPlan optimizations, for example when
operations on interleave groups are narrowed.

Note that there are a few test changes for tests that were still
checking the legacy cost-model output when it was computed in
selectInterleaveCount.

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



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