projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
63dd4ff
)
Fix PR294
author
Chris Lattner
<sabre@nondot.org>
Tue, 16 Mar 2004 01:45:55 +0000
(
01:45
+0000)
committer
Chris Lattner
<sabre@nondot.org>
Tue, 16 Mar 2004 01:45:55 +0000
(
01:45
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12425
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/CodeGen/RegAllocSimple.cpp
patch
|
blob
|
history
diff --git
a/lib/CodeGen/RegAllocSimple.cpp
b/lib/CodeGen/RegAllocSimple.cpp
index cd48cd2af54a4dac9215e4f7cb743b5fbde73989..1b7f5471b423e415471dd23167e31fe494f50623 100644
(file)
--- 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 << "]: ";