[llvm] [SLP] Check for extracts, being replaced by original scalars, for user nodes (PR #149572)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 11 10:27:54 PDT 2025
================
@@ -13784,7 +13929,8 @@ BoUpSLP::getEntryCost(const TreeEntry *E, ArrayRef<Value *> VectorizedVals,
case Instruction::Trunc:
case Instruction::FPTrunc:
case Instruction::BitCast: {
- auto SrcIt = MinBWs.find(getOperandEntry(E, 0));
+ auto SrcIt =
+ MinBWs.empty() ? MinBWs.end() : MinBWs.find(getOperandEntry(E, 0));
----------------
alexey-bataev wrote:
To avoid a call for `getOperandEntry`
https://github.com/llvm/llvm-project/pull/149572
More information about the llvm-commits
mailing list