commuteInstruction() does not always create a new MI!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28592 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng 2006-05-31 18:03:39 +00:00
parent 8874aaef1d
commit 4c6f2f9e92

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;
}
}
}