diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-02-07 08:29:53 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-02-07 08:29:53 +0000 |
commit | 15246738f2db3f63a20c1f2b9b19b08e21acffd9 (patch) | |
tree | 5cf20617d300bafc843214f93e697d084d3c1534 /lib | |
parent | 33d4f7792f92eb7652ec3410c88b02ddb5aa7861 (diff) |
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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/X86/X86InstrInfo.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Target/X86/X86InstrInfo.cpp b/lib/Target/X86/X86InstrInfo.cpp index 1253631297..18c5d2f841 100644 --- a/lib/Target/X86/X86InstrInfo.cpp +++ b/lib/Target/X86/X86InstrInfo.cpp @@ -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 |