summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-04-09 16:50:43 +0000
committerChris Lattner <sabre@nondot.org>2009-04-09 16:50:43 +0000
commita725028d41bd1c339dfc75de9e8c98d2e3987155 (patch)
treee594fde9bb9294814604d668455bbaf55de74c9c /llvm/lib
parentf8cb51c20e48e5fb8d3b40238057b0249c3c4d27 (diff)
downloadbcm5719-llvm-a725028d41bd1c339dfc75de9e8c98d2e3987155.tar.gz
bcm5719-llvm-a725028d41bd1c339dfc75de9e8c98d2e3987155.zip
reg0 references are not real registers. This fixes a crash on the
attached testcase. llvm-svn: 68712
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/MachineInstr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp
index 965c2a2c5d2..ade8683ec79 100644
--- a/llvm/lib/CodeGen/MachineInstr.cpp
+++ b/llvm/lib/CodeGen/MachineInstr.cpp
@@ -739,7 +739,7 @@ bool MachineInstr::isRegReDefinedByTwoAddr(unsigned DefIdx) const{
bool MachineInstr::isRegTiedToDefOperand(unsigned UseOpIdx, unsigned *DefOpIdx){
if (getOpcode() == TargetInstrInfo::INLINEASM) {
const MachineOperand &MO = getOperand(UseOpIdx);
- if (!MO.isReg() || !MO.isUse())
+ if (!MO.isReg() || !MO.isUse() || MO.getReg() == 0)
return false;
assert(UseOpIdx > 0);
const MachineOperand &UFMO = getOperand(UseOpIdx-1);
OpenPOWER on IntegriCloud