diff options
author | Chris Lattner <sabre@nondot.org> | 2009-04-09 16:50:43 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-04-09 16:50:43 +0000 |
commit | 0c8382ce9a96e36325b17d242fd1af16564d8a85 (patch) | |
tree | 1dcaa96a64621cc151cf9515b104f9aa44b517b6 /lib/CodeGen/MachineInstr.cpp | |
parent | 685cb17c9827f6e1c22dbc9d976b572045a0b6ed (diff) |
reg0 references are not real registers. This fixes a crash on the
attached testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68712 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineInstr.cpp')
-rw-r--r-- | lib/CodeGen/MachineInstr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp index 965c2a2c5d..ade8683ec7 100644 --- a/lib/CodeGen/MachineInstr.cpp +++ b/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); |