[all-commits] [llvm/llvm-project] 9a3015: [SLP]Do not reuse internal gathers of splat subtre...

Alexey Bataev via All-commits all-commits at lists.llvm.org
Tue Sep 22 09:55:16 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9a301518b5cc4f434267f5942aac522ea142b352
      https://github.com/llvm/llvm-project/commit/9a301518b5cc4f434267f5942aac522ea142b352
  Author: Alexey Bataev <a.bataev at outlook.com>
  Date:   2026-09-22 (Tue, 22 Sep 2026)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
    M llvm/test/Transforms/SLPVectorizer/AArch64/splat-gather-subtree-reuse.ll

  Log Message:
  -----------
  [SLP]Do not reuse internal gathers of splat subtrees as shuffle sources

The splat gather subtrees are speculative: the keep/drop check may
delete them and does not track reuse of their internal gathers by other
gathers.
Such reuse inflated the reusing gather's cost (a shuffle of the
subtree's operand gather was charged even when a plain buildvector is
cheaper), which distorted the main tree's trim decisions and dropped
the whole profitable tree instead of the unprofitable subtrees.

Fixes the perf regression from #220250.

Reviewers: 

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



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