diff --git a/llvm/lib/Transforms/IPO/SampleProfile.cpp b/llvm/lib/Transforms/IPO/SampleProfile.cpp index 0c8d8624f71b..96fdd7632dc6 100644 --- a/llvm/lib/Transforms/IPO/SampleProfile.cpp +++ b/llvm/lib/Transforms/IPO/SampleProfile.cpp @@ -1345,7 +1345,7 @@ bool SampleProfileLoader::inlineHotFunctionsWithPriority( if (CalledFunction == &F) continue; if (I->isIndirectCall()) { - uint64_t Sum; + uint64_t Sum = 0; auto CalleeSamples = findIndirectCallFunctionSamples(*I, Sum); uint64_t SumOrigin = Sum; Sum *= Candidate.CallsiteDistribution;