[llvm] Fix after #153735 (PR #153749)

Mircea Trofin via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 14 23:14:04 PDT 2025


https://github.com/mtrofin created https://github.com/llvm/llvm-project/pull/153749

None

>From d56d3d7998f5d26af9173603ba0fcd0bba3cee3d Mon Sep 17 00:00:00 2001
From: Mircea Trofin <mtrofin at google.com>
Date: Thu, 14 Aug 2025 23:13:37 -0700
Subject: [PATCH] Fix after #153735

---
 llvm/lib/IR/ProfDataUtils.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/lib/IR/ProfDataUtils.cpp b/llvm/lib/IR/ProfDataUtils.cpp
index 489fbfef00e4d..c90a1efb9a54a 100644
--- a/llvm/lib/IR/ProfDataUtils.cpp
+++ b/llvm/lib/IR/ProfDataUtils.cpp
@@ -276,7 +276,7 @@ SmallVector<uint32_t> downscaleWeights(ArrayRef<uint64_t> Weights,
                                                 : *llvm::max_element(Weights);
   assert(MaxCount > 0 && "Bad max count");
   uint64_t Scale = calculateCountScale(MaxCount);
-  SmallVector<unsigned, 4> DownscaledWeights;
+  SmallVector<unsigned> DownscaledWeights;
   for (const auto &ECI : Weights)
     DownscaledWeights.push_back(scaleBranchCount(ECI, Scale));
   return DownscaledWeights;



More information about the llvm-commits mailing list