[all-commits] [llvm/llvm-project] 2a6b09: [LV] Use type from InsertPos for cost computation ...

Florian Hahn via All-commits all-commits at lists.llvm.org
Fri Oct 18 19:13:37 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2a6b09e0d3d3c1a05d3d5165202a6e68900974b1
      https://github.com/llvm/llvm-project/commit/2a6b09e0d3d3c1a05d3d5165202a6e68900974b1
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2024-10-18 (Fri, 18 Oct 2024)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
    M llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
    M llvm/test/Transforms/LoopVectorize/X86/interleave-cost.ll

  Log Message:
  -----------
  [LV] Use type from InsertPos for cost computation of interleave groups.

Previously the legacy cost model would pick the type for the cost
computation depending on the order of the members in the input IR.
This is incompatible with the VPlan-based cost model (independent of
original IR order) and also doesn't match code-gen, which uses the type
of the insert position.

Update the legacy cost model to use the type (and address space) from
the Group's insert position.

This brings the legacy cost model in line with the legacy cost model and
fixes a divergence between both models.

Note that the X86 cost model seems to assign different costs to groups
with i64 and double types. Added a TODO to check.

Fixes https://github.com/llvm/llvm-project/issues/112922.



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