From 050c64c51d207047a7db27120dbb32dee51412a7 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 8 Sep 2006 19:11:11 +0000 Subject: [PATCH] This fixes Benchmarks/Prolangs-C/unix-smail llvm-svn: 30198 --- llvm/lib/CodeGen/RegAllocLocal.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/llvm/lib/CodeGen/RegAllocLocal.cpp b/llvm/lib/CodeGen/RegAllocLocal.cpp index 2b249b2f825c..8e7c1fe2a021 100644 --- a/llvm/lib/CodeGen/RegAllocLocal.cpp +++ b/llvm/lib/CodeGen/RegAllocLocal.cpp @@ -596,6 +596,8 @@ void RA::AllocateBasicBlock(MachineBasicBlock &MBB) { if (MO.isRegister() && MO.isDef() && MO.getReg() && MRegisterInfo::isPhysicalRegister(MO.getReg())) { unsigned Reg = MO.getReg(); + if (PhysRegsUsed[Reg] == -2) continue; // Something like ESP. + PhysRegsEverUsed[Reg] = true; spillPhysReg(MBB, MI, Reg, true); // Spill any existing value in the reg PhysRegsUsed[Reg] = 0; // It is free and reserved now