[all-commits] [llvm/llvm-project] 199ade: [VPlan] Use VPlan-based costs for pointer inductio...

Florian Hahn via All-commits all-commits at lists.llvm.org
Mon Sep 14 13:40:46 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 199ade2027a2f0b20504d288db6388aa11332a40
      https://github.com/llvm/llvm-project/commit/199ade2027a2f0b20504d288db6388aa11332a40
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2026-09-14 (Mon, 14 Sep 2026)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
    M llvm/lib/Transforms/Vectorize/VPlan.h
    M llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
    M llvm/test/Transforms/LoopVectorize/AArch64/force-target-instruction-cost.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/predication_costs.ll
    M llvm/test/Transforms/LoopVectorize/ARM/mve-icmpcost.ll
    M llvm/test/Transforms/LoopVectorize/WebAssembly/memory-interleave.ll
    M llvm/test/Transforms/LoopVectorize/X86/CostModel/vpinstruction-cost.ll
    M llvm/test/Transforms/LoopVectorize/induction-cost.ll
    M llvm/test/Transforms/LoopVectorize/phi-cost.ll

  Log Message:
  -----------
  [VPlan] Use VPlan-based costs for pointer inductions. (#223394)

Drop the last legacy induction fallback in precomputeCosts, completing
the migration of induction costs to be VPlan-based.

The fallback charged the cost of the IV phi. The cost of the GEP
incrementing the IV was considered free.

VPWidenPointerInduction::computeCost now charges the cost of the phi
plus a TODO to also consider cost of the increment and wide pointer add.

For scalarized pointer inductions, we do not charge any cost for the
scalar GEPs, like before, assuming they can be folded into the
addressing mode.

Test changes are due to the fact that scalarized pointer inductions do
not require an extra phi (on most platforms, phis are considered free,
so not many tests are impacted).

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



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