Bug fix. Must also match ResNo when matching an operand with a user.

llvm-svn: 45028
This commit is contained in:
Evan Cheng 2007-12-14 08:25:15 +00:00
parent f924f34b6b
commit 0fcf56f8f5
1 changed files with 1 additions and 1 deletions

View File

@ -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)