summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-04-09 23:33:34 +0000
committerChris Lattner <sabre@nondot.org>2009-04-09 23:33:34 +0000
commit66ab904f5a6933ccf8c520d7a587fadf2bc79b2f (patch)
tree1c9e1ac23b3ae399e82ff4a87893578154fac71d
parentef84c4b434ebd74aa44f2ac1206b8236463cb139 (diff)
downloadbcm5719-llvm-66ab904f5a6933ccf8c520d7a587fadf2bc79b2f.tar.gz
bcm5719-llvm-66ab904f5a6933ccf8c520d7a587fadf2bc79b2f.zip
ignore register zero in isRegTiedToUseOperand, following the example of
isRegTiedToDefOperand. Thanks to Bob for pointing this out! llvm-svn: 68734
-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 d3b2e9a91c8..a227f25190a 100644
--- a/llvm/lib/CodeGen/MachineInstr.cpp
+++ b/llvm/lib/CodeGen/MachineInstr.cpp
@@ -698,7 +698,7 @@ bool MachineInstr::isRegTiedToUseOperand(unsigned DefOpIdx, unsigned *UseOpIdx){
if (getOpcode() == TargetInstrInfo::INLINEASM) {
assert(DefOpIdx >= 2);
const MachineOperand &MO = getOperand(DefOpIdx);
- if (!MO.isReg() || !MO.isDef())
+ if (!MO.isReg() || !MO.isDef() || MO.getReg() == 0)
return false;
// Determine the actual operand no corresponding to this index.
unsigned DefNo = 0;
OpenPOWER on IntegriCloud