[all-commits] [llvm/llvm-project] ad9909: [SLP]Fix perfect diamond match with extractelement...

Alexey Bataev via All-commits all-commits at lists.llvm.org
Mon Mar 24 06:29:41 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ad9909dd7301bc5a70bbb84ffd20ab696c926c1c
      https://github.com/llvm/llvm-project/commit/ad9909dd7301bc5a70bbb84ffd20ab696c926c1c
  Author: Alexey Bataev <a.bataev at outlook.com>
  Date:   2025-03-24 (Mon, 24 Mar 2025)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
    M llvm/test/Transforms/SLPVectorizer/X86/buildvector-with-reuses.ll
    M llvm/test/Transforms/SLPVectorizer/X86/reduction-transpose.ll

  Log Message:
  -----------
  [SLP]Fix perfect diamond match with extractelements in scalars

Need to drop all previous estimations/vectorizations, when found
a perfect diamond match. This improves cost estimation and improves code
emission.
Also, need to adjust getScalarizationOverhead cost for non-poison input
vector. Currently, it does not allow to estimate it correctly, so
instead use conservative element-by-element insertelement cost for each
unique scalar.

Reviewers: RKSimon, hiraditya

Reviewed By: RKSimon

Pull Request: https://github.com/llvm/llvm-project/pull/132466



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