This fixes Benchmarks/Prolangs-C/unix-smail

llvm-svn: 30198
This commit is contained in:
Chris Lattner 2006-09-08 19:11:11 +00:00
parent 9b1a6ebf20
commit 050c64c51d
1 changed files with 2 additions and 0 deletions

View File

@ -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