diff --git a/llvm/lib/CodeGen/RegAllocGreedy.cpp b/llvm/lib/CodeGen/RegAllocGreedy.cpp index 54ccbf4a0560f219bee3b7d28c4bfdb8882752fd..178d468c572ce7af36e3d8421bfcd9b7f2aadc08 100644 --- a/llvm/lib/CodeGen/RegAllocGreedy.cpp +++ b/llvm/lib/CodeGen/RegAllocGreedy.cpp @@ -379,7 +379,7 @@ unsigned RAGreedy::trySpillInterferences(LiveInterval &VirtReg, SmallVectorImpl &NewVRegs) { NamedRegionTimer T("Spill Interference", TimerGroupName, TimePassesIsEnabled); unsigned BestPhys = 0; - float BestWeight; + float BestWeight = 0; Order.rewind(); while (unsigned PhysReg = Order.next()) {