This fixes Benchmarks/Prolangs-C/unix-smail

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30198 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2006-09-08 19:11:11 +00:00
parent 45d5788123
commit cc406328bf

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