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 | 6ae9eb1566685241eb8eced2b0ebfb8dbb3d5b3f (patch) | |
tree | 0cd9eca751355e1e28ec94c43e98dbba8de2ec8b /lib/CodeGen | |
parent | 63dd4ff809edf16552aecdb082a52ef9364d16aa (diff) | |
download | external_llvm-6ae9eb1566685241eb8eced2b0ebfb8dbb3d5b3f.zip external_llvm-6ae9eb1566685241eb8eced2b0ebfb8dbb3d5b3f.tar.gz external_llvm-6ae9eb1566685241eb8eced2b0ebfb8dbb3d5b3f.tar.bz2 |
Fix PR294
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12425 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/RegAllocSimple.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/RegAllocSimple.cpp b/lib/CodeGen/RegAllocSimple.cpp index cd48cd2..1b7f547 100644 --- a/lib/CodeGen/RegAllocSimple.cpp +++ b/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 << "]: "; |