diff options
author | Chris Lattner <sabre@nondot.org> | 2004-03-16 01:45:55 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-03-16 01:45:55 +0000 |
commit | e0b49952f664b383d83131e20f526906d4d214af (patch) | |
tree | 20b3e2c0bba46057202b2e4eb12bfaf058375fa4 /llvm/lib/CodeGen/RegAllocSimple.cpp | |
parent | 804dc659b6f7c21fdb7075b198777467969e9306 (diff) | |
download | bcm5719-llvm-e0b49952f664b383d83131e20f526906d4d214af.tar.gz bcm5719-llvm-e0b49952f664b383d83131e20f526906d4d214af.zip |
Fix PR294
llvm-svn: 12425
Diffstat (limited to 'llvm/lib/CodeGen/RegAllocSimple.cpp')
-rw-r--r-- | llvm/lib/CodeGen/RegAllocSimple.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/RegAllocSimple.cpp b/llvm/lib/CodeGen/RegAllocSimple.cpp index cd48cd2af54..1b7f5471b42 100644 --- a/llvm/lib/CodeGen/RegAllocSimple.cpp +++ b/llvm/lib/CodeGen/RegAllocSimple.cpp @@ -172,7 +172,8 @@ void RegAllocSimple::AllocateBasicBlock(MachineBasicBlock &MBB) { for (int i = MI->getNumOperands() - 1; i >= 0; --i) { MachineOperand &op = MI->getOperand(i); - if (op.isRegister() && MRegisterInfo::isVirtualRegister(op.getReg())) { + if (op.isRegister() && op.getReg() && + MRegisterInfo::isVirtualRegister(op.getReg())) { unsigned virtualReg = (unsigned) op.getReg(); DEBUG(std::cerr << "op: " << op << "\n"); DEBUG(std::cerr << "\t inst[" << i << "]: "; |