Fix a compile-time regression introduced by my heuristic-changing patch. I forgot
[oota-llvm.git] / lib / CodeGen / RegAllocLinearScan.cpp
index 4df172d40c7f61abb3b7fb75fbb36de85fd24d5f..ad830b25352bf3f4639ff10e325b66230f874401 100644 (file)
@@ -852,7 +852,7 @@ void RALinScan::assignRegOrStackSlotAtInterval(LiveInterval* cur)
     // All registers must have inf weight. Just grab one!
     minReg = BestPhysReg ? BestPhysReg : *RC->allocation_order_begin(*mf_);
     if (cur->weight == HUGE_VALF ||
-        li_->getApproximateInstructionCount(*cur) == 1)
+        li_->getApproximateInstructionCount(*cur) == 0)
       // Spill a physical register around defs and uses.
       li_->spillPhysRegAroundRegDefsUses(*cur, minReg, *vrm_);
   }