commuteInstruction() does not always create a new MI!

llvm-svn: 28592
This commit is contained in:
Evan Cheng 2006-05-31 18:03:39 +00:00
parent ee54532a92
commit 5b6029f577

View File

@ -402,8 +402,10 @@ void ScheduleDAG::EmitNode(SDNode *Node,
DEBUG(std::cerr << "Sched: COMMUTING FAILED!\n");
else {
DEBUG(std::cerr << "Sched: COMMUTED TO: " << *NewMI);
delete MI;
MI = NewMI;
if (MI != NewMI) {
delete MI;
MI = NewMI;
}
}
}