From 60fd2b5f3ec567da45849acc82352baec0d5eb7d Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sun, 30 Mar 2025 13:15:20 -0700 Subject: [PATCH] [Vectorize] Use DenseMap::insert_range (NFC) --- llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp index 3fc5e716e3757..dd392056a07ee 100644 --- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp +++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp @@ -5415,7 +5415,7 @@ void LoopVectorizationCostModel::collectInstsToScalarize(ElementCount VF) { if (!isScalarAfterVectorization(&I, VF) && !VF.isScalable() && !useEmulatedMaskMemRefHack(&I, VF) && computePredInstDiscount(&I, ScalarCosts, VF) >= 0) { - ScalarCostsVF.insert(ScalarCosts.begin(), ScalarCosts.end()); + ScalarCostsVF.insert_range(ScalarCosts); // Check if we decided to scalarize a call. If so, update the widening // decision of the call to CM_Scalarize with the computed scalar cost. for (const auto &[I, Cost] : ScalarCosts) {