From: Evan Cheng Date: Fri, 14 Dec 2007 08:25:15 +0000 (+0000) Subject: Bug fix. Must also match ResNo when matching an operand with a user. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=7c07aebd19ea07c6219c36c9e96a5d7a6052ba95;p=oota-llvm.git Bug fix. Must also match ResNo when matching an operand with a user. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45028 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp index ec84b705bbf..2b8965ba151 100644 --- a/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp +++ b/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp @@ -326,7 +326,7 @@ void ScheduleDAG::EmitCopyFromReg(SDNode *Node, unsigned ResNo, } else { for (unsigned i = 0, e = Use->getNumOperands(); i != e; ++i) { SDOperand Op = Use->getOperand(i); - if (Op.Val != Node) + if (Op.Val != Node || Op.ResNo != ResNo) continue; MVT::ValueType VT = Node->getValueType(Op.ResNo); if (VT != MVT::Other && VT != MVT::Flag)