[llvm-commits] [llvm] r46849 - /llvm/trunk/lib/Target/X86/X86InstrInfo.cpp

Evan Cheng evan.cheng at apple.com
Thu Feb 7 00:29:53 PST 2008


Author: evancheng
Date: Thu Feb  7 02:29:53 2008
New Revision: 46849

URL: http://llvm.org/viewvc/llvm-project?rev=46849&view=rev
Log:
In some cases, e.g. ADD32ri, no transformation is made. Guide against it.

Modified:
    llvm/trunk/lib/Target/X86/X86InstrInfo.cpp

Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.cpp?rev=46849&r1=46848&r2=46849&view=diff

==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86InstrInfo.cpp Thu Feb  7 02:29:53 2008
@@ -1011,6 +1011,8 @@
   }
   }
 
+  if (!NewMI) return 0;
+
   NewMI->copyKillDeadInfo(MI);
   LV.instructionChanged(MI, NewMI);  // Update live variables
   MFI->insert(MBBI, NewMI);          // Insert the new inst    





More information about the llvm-commits mailing list