summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-02-17 07:02:17 +0000
committerChris Lattner <sabre@nondot.org>2004-02-17 07:02:17 +0000
commitd1289d0fcde64bdafe4f5dc3c195e70bec1c3ffc (patch)
treef4a47fd0c2231eac77445d408774e63e4c567cb4 /llvm/lib
parent6e540af8f7e67fdfde580bf229f3c6393701f4bb (diff)
downloadbcm5719-llvm-d1289d0fcde64bdafe4f5dc3c195e70bec1c3ffc.tar.gz
bcm5719-llvm-d1289d0fcde64bdafe4f5dc3c195e70bec1c3ffc.zip
Fix a bug in my previous refactoring change... arg!
llvm-svn: 11535
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/RegAllocLocal.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/RegAllocLocal.cpp b/llvm/lib/CodeGen/RegAllocLocal.cpp
index dc375cc54e6..f8e5086e6c5 100644
--- a/llvm/lib/CodeGen/RegAllocLocal.cpp
+++ b/llvm/lib/CodeGen/RegAllocLocal.cpp
@@ -492,7 +492,9 @@ MachineInstr *RA::reloadVirtReg(MachineBasicBlock &MBB, MachineInstr *MI,
const TargetRegisterClass *RC = MF->getSSARegMap()->getRegClass(VirtReg);
unsigned PhysReg = getFreeReg(RC);
- if (PhysReg == 0) { // No registers available...
+ if (PhysReg) { // PhysReg available!
+ PhysReg = getReg(MBB, MI, VirtReg);
+ } else { // No registers available...
/// If we can fold this spill into this instruction, do so now.
if (0) {
// TODO
OpenPOWER on IntegriCloud