[llvm-commits] [llvm] r132789 -	/llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
    Eli Friedman 
    eli.friedman at gmail.com
       
    Thu Jun  9 11:55:00 PDT 2011
    
    
  
Author: efriedma
Date: Thu Jun  9 13:55:00 2011
New Revision: 132789
URL: http://llvm.org/viewvc/llvm-project?rev=132789&view=rev
Log:
Add a check to make sure we don't crash with strange configurations where we do fast-isel, then try to fold instructions. PR10092.
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=132789&r1=132788&r2=132789&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86InstrInfo.cpp Thu Jun  9 13:55:00 2011
@@ -2392,6 +2392,10 @@
       return 0;
     }
 
+  // Conservatively fail out for loads without a memoperand.
+  if (LoadMI->memoperands_empty())
+    return 0;
+
   // Determine the alignment of the load.
   unsigned Alignment = 0;
   if (LoadMI->hasOneMemOperand())
    
    
More information about the llvm-commits
mailing list