[all-commits] [llvm/llvm-project] 67a0ff: [SLP][REVEC] Fix InsertElement scalar type in getE...

Alexey Bataev via All-commits all-commits at lists.llvm.org
Sat Apr 11 06:27:31 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 67a0ff69fbe9950a6a1ccf96c9a20126cee23fde
      https://github.com/llvm/llvm-project/commit/67a0ff69fbe9950a6a1ccf96c9a20126cee23fde
  Author: Alexey Bataev <a.bataev at outlook.com>
  Date:   2026-04-11 (Sat, 11 Apr 2026)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
    A llvm/test/Transforms/SLPVectorizer/X86/revec-scalar-insertelement.ll

  Log Message:
  -----------
  [SLP][REVEC] Fix InsertElement scalar type in getEntryCost

When SLPReVec is enabled, getValueType returns the vector result type
for InsertElement instructions rather than the scalar element type. This
caused getEntryCost to propagate an incorrect ScalarTy (e.g. <4 x float>
instead of float) into getScalarizationOverhead and getWidenedType,
triggering an assertion failure and producing wrong cost estimates.
Narrow ScalarTy to its element type when costing vectorized
InsertElement entries whose inserted operands are scalars.
Fixes #191175.

Reviewers: 

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



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