[llvm] [SLP] Fix cost estimation of external uses with wrong VF (PR #148185)
Gaƫtan Bossu via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 15 00:39:15 PDT 2025
================
@@ -14632,6 +14630,11 @@ InstructionCost BoUpSLP::getTreeCost(ArrayRef<Value *> VectorizedVals,
}
SmallDenseSet<std::pair<Value *, Value *>, 8> CheckedScalarUser;
for (ExternalUser &EU : ExternalUses) {
+ LLVM_DEBUG(dbgs() << "SLP: Computing cost for external use of TreeEntry "
+ << EU.E.Idx << " in lane " << EU.Lane << "\n");
+ LLVM_DEBUG(dbgs() << " User:" << *EU.User << "\n");
----------------
gbossu wrote:
When I wrote that code, I was under the impression that `EU.User` cannot be null, because well, it's an external use we have identified and we want to cost. It also triggered no test failure, so I guess we are lacking some coverage. But looking at the code gathering external users, it is obvious that `EU.User` is sometimes set to `nullptr`. My bad. And thanks Alexey for fixing this quickly.
https://github.com/llvm/llvm-project/pull/148185
More information about the llvm-commits
mailing list