summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-09-08 20:21:31 +0000
committerChris Lattner <sabre@nondot.org>2006-09-08 20:21:31 +0000
commitb2e7316b2dd6c96489a672a00aaba6f63b096551 (patch)
tree644a4923524b6dc5d031a657d755a0e9f1b2a21f /llvm/lib/CodeGen
parent050c64c51d207047a7db27120dbb32dee51412a7 (diff)
downloadbcm5719-llvm-b2e7316b2dd6c96489a672a00aaba6f63b096551.tar.gz
bcm5719-llvm-b2e7316b2dd6c96489a672a00aaba6f63b096551.zip
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. llvm-svn: 30204
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/RegAllocLocal.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/RegAllocLocal.cpp b/llvm/lib/CodeGen/RegAllocLocal.cpp
index 8e7c1fe2a02..5b9186dbe35 100644
--- a/llvm/lib/CodeGen/RegAllocLocal.cpp
+++ b/llvm/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) {
OpenPOWER on IntegriCloud