diff options
author | Chris Lattner <sabre@nondot.org> | 2006-09-08 19:11:11 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-09-08 19:11:11 +0000 |
commit | cc406328bf0aaa5f25e268deed5b38be7d4dc7a5 (patch) | |
tree | 4f12f6a2e0cd4109b7cade463aff5aedca074bf1 /lib/CodeGen/RegAllocLocal.cpp | |
parent | 45d5788123bdb5c59979a3189d4587c84e41a12d (diff) |
This fixes Benchmarks/Prolangs-C/unix-smail
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30198 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegAllocLocal.cpp')
-rw-r--r-- | lib/CodeGen/RegAllocLocal.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/RegAllocLocal.cpp b/lib/CodeGen/RegAllocLocal.cpp index 2b249b2f82..8e7c1fe2a0 100644 --- a/lib/CodeGen/RegAllocLocal.cpp +++ b/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 |