[all-commits] [llvm/llvm-project] bb3c16: [SLP]Drop unprofitable splat gather subtrees
Alexey Bataev via All-commits
all-commits at lists.llvm.org
Wed Sep 9 05:20:37 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: bb3c1628511349afbc0a0a82ec690a2da7020b63
https://github.com/llvm/llvm-project/commit/bb3c1628511349afbc0a0a82ec690a2da7020b63
Author: Alexey Bataev <a.bataev at outlook.com>
Date: 2026-09-09 (Wed, 09 Sep 2026)
Changed paths:
M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
M llvm/test/Transforms/SLPVectorizer/AArch64/splat-gather-subtree-drop.ll
M llvm/test/Transforms/SLPVectorizer/AArch64/splat-gather-subtree-store-chain.ll
M llvm/test/Transforms/SLPVectorizer/X86/lookahead.ll
M llvm/test/Transforms/SLPVectorizer/X86/reorder_phi.ll
Log Message:
-----------
[SLP]Drop unprofitable splat gather subtrees
The keep/drop check ran only when trimming changed something and
ignored the splat emission cost on both sides. Run it in both paths
with the actual costs: keep the subtree if its price plus extracts plus
the reusing gathers' current costs is not worse than re-emitting those
gathers without it. Exclude splat roots from the main trimming loop.
Fixes the perf regression from #220250, reported in https://github.com/llvm/llvm-project/pull/220250?email_source=notifications&email_token=ABI45DSHUYRFN4NA4DILB5T5NZTZTA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKNJWG4ZTSMBZGUYKM4TFMFZW63VMON2GC5DFL5RWQYLOM5S2KZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-5567390950.
Reviewers: RKSimon, bababuck
Pull Request: https://github.com/llvm/llvm-project/pull/221717
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