[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:28:41 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()
----------------
alexey-bataev wrote:

Same, to avoid a call for `getOperandEntry`, which adds to compile time

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


More information about the llvm-commits mailing list