[llvm] [SLP] Check for extracts, being replaced by original scalars, for user nodes (PR #149572)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 8 12:14:32 PDT 2025


================
@@ -14231,7 +14377,8 @@ BoUpSLP::getEntryCost(const TreeEntry *E, ArrayRef<Value *> VectorizedVals,
         Type *SrcSclTy = E->getMainOp()->getOperand(0)->getType();
         auto *SrcTy = getWidenedType(SrcSclTy, VL.size());
         if (SrcSclTy->isIntegerTy() && ScalarTy->isIntegerTy()) {
-          auto SrcIt = MinBWs.find(getOperandEntry(E, 0));
+          auto SrcIt = MinBWs.empty() ? MinBWs.end()
----------------
topperc wrote:

Why do we need to check empty? Won't find return MinBWs.end() if it is empty?

https://github.com/llvm/llvm-project/pull/149572


More information about the llvm-commits mailing list