[all-commits] [llvm/llvm-project] f39409: [SLP] Scale extract cost of external uses with nul...
Alexey Bataev via All-commits
all-commits at lists.llvm.org
Tue Jun 2 13:35:39 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f394094f195b3d593336aab6b76ccd2b7b483e43
https://github.com/llvm/llvm-project/commit/f394094f195b3d593336aab6b76ccd2b7b483e43
Author: Alexey Bataev <a.bataev at outlook.com>
Date: 2026-06-02 (Tue, 02 Jun 2026)
Changed paths:
M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
M llvm/test/Transforms/SLPVectorizer/ARM/extract-cost-scale-nullptr-user.ll
Log Message:
-----------
[SLP] Scale extract cost of external uses with nullptr user
The NCD pre-pass from #199962 only records extract blocks for external
uses that have a real user, so uses with a nullptr user were left
unscaled, making the loop in the report look profitable and get wrongly
vectorized. For a nullptr user vectorizeTree() places the extract right
after the vectorized instruction (entry block) and RAUWs the scalar, so
scale those extracts by the entry block frequency, restoring the
pre-#199962 behavior for that case.
Reviewers:
Pull Request: https://github.com/llvm/llvm-project/pull/201193
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