In some cases, e.g. ADD32ri, no transformation is made. Guide against it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46849 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng 2008-02-07 08:29:53 +00:00
parent 33d4f7792f
commit 15246738f2

View File

@ -1011,6 +1011,8 @@ X86InstrInfo::convertToThreeAddress(MachineFunction::iterator &MFI,
}
}
if (!NewMI) return 0;
NewMI->copyKillDeadInfo(MI);
LV.instructionChanged(MI, NewMI); // Update live variables
MFI->insert(MBBI, NewMI); // Insert the new inst