diff options
author | Chris Lattner <sabre@nondot.org> | 2006-09-08 20:21:31 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-09-08 20:21:31 +0000 |
commit | 0c5b8dac794b23ac7f84acdc6d2661edb28ed5c8 (patch) | |
tree | 9fd605e6bde00b21bb9ad5119bfed8ab6a0400d4 /lib/CodeGen/RegAllocLocal.cpp | |
parent | cc406328bf0aaa5f25e268deed5b38be7d4dc7a5 (diff) |
Non-allocatable physregs can be killed and dead, but don't treat them as
safe for later allocation. This fixes McCat/18-imp with llc-beta.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30204 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegAllocLocal.cpp')
-rw-r--r-- | lib/CodeGen/RegAllocLocal.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/CodeGen/RegAllocLocal.cpp b/lib/CodeGen/RegAllocLocal.cpp index 8e7c1fe2a0..5b9186dbe3 100644 --- a/lib/CodeGen/RegAllocLocal.cpp +++ b/lib/CodeGen/RegAllocLocal.cpp @@ -580,6 +580,9 @@ void RA::AllocateBasicBlock(MachineBasicBlock &MBB) { unsigned &PhysRegSlot = getVirt2PhysRegMapSlot(VirtReg); PhysReg = PhysRegSlot; PhysRegSlot = 0; + } else if (PhysRegsUsed[PhysReg] == -2) { + // Unallocatable register dead, ignore. + continue; } if (PhysReg) { @@ -669,6 +672,9 @@ void RA::AllocateBasicBlock(MachineBasicBlock &MBB) { PhysReg = PhysRegSlot; assert(PhysReg != 0); PhysRegSlot = 0; + } else if (PhysRegsUsed[PhysReg] == -2) { + // Unallocatable register dead, ignore. + continue; } if (PhysReg) { |