[all-commits] [llvm/llvm-project] 4f9332: [CostModel][X86] Improve cost estimation of insert...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Tue Dec 10 08:29:18 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4f933277a53d61f7df42e70ec8ec465652019f7f
      https://github.com/llvm/llvm-project/commit/4f933277a53d61f7df42e70ec8ec465652019f7f
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2024-12-10 (Tue, 10 Dec 2024)

  Changed paths:
    M llvm/lib/Target/X86/X86TargetTransformInfo.cpp
    M llvm/test/Analysis/CostModel/X86/shuffle-concat_subvector-codesize.ll
    M llvm/test/Analysis/CostModel/X86/shuffle-concat_subvector-latency.ll
    M llvm/test/Analysis/CostModel/X86/shuffle-concat_subvector-sizelatency.ll
    M llvm/test/Analysis/CostModel/X86/shuffle-concat_subvector.ll
    M llvm/test/Analysis/CostModel/X86/shuffle-insert_subvector-codesize.ll
    M llvm/test/Analysis/CostModel/X86/shuffle-insert_subvector-latency.ll
    M llvm/test/Analysis/CostModel/X86/shuffle-insert_subvector-sizelatency.ll
    M llvm/test/Analysis/CostModel/X86/shuffle-insert_subvector.ll
    M llvm/test/Transforms/VectorCombine/X86/shuffle-of-casts.ll
    M llvm/test/Transforms/VectorCombine/X86/shuffle-of-intrinsics.ll

  Log Message:
  -----------
  [CostModel][X86] Improve cost estimation of insert_subvector shuffle patterns of legalized types (#119363)

In cases where the base/sub vector type in an insert_subvector pattern legalize to the same width through splitting, we can assume that the shuffle becomes free as the legalized vectors will not overlap.

Note this isn't true if the vectors have been widened during legalization (e.g. v2f32 insertion into v4f32 would legalize to v4f32 into v4f32).

Noticed while working on adding processShuffleMasks handling for SK_PermuteTwoSrc.



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