[llvm-commits] [llvm] r117848 - /llvm/trunk/lib/Target/ARM/ARMFastISel.cpp

Eric Christopher echristo at apple.com
Sat Oct 30 14:25:27 PDT 2010


Author: echristo
Date: Sat Oct 30 16:25:26 2010
New Revision: 117848

URL: http://llvm.org/viewvc/llvm-project?rev=117848&view=rev
Log:
Make sure we have a legal type (and simple) before continuing.

Modified:
    llvm/trunk/lib/Target/ARM/ARMFastISel.cpp

Modified: llvm/trunk/lib/Target/ARM/ARMFastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMFastISel.cpp?rev=117848&r1=117847&r2=117848&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMFastISel.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMFastISel.cpp Sat Oct 30 16:25:26 2010
@@ -939,8 +939,11 @@
   // TODO: Factor this out.
   if (const CmpInst *CI = dyn_cast<CmpInst>(BI->getCondition())) {
     if (CI->hasOneUse() && (CI->getParent() == I->getParent())) {
+      EVT VT;
       const Type *Ty = CI->getOperand(0)->getType();
-      EVT VT = TLI.getValueType(Ty);
+      if (!isTypeLegal(Ty, VT))
+        return false;
+
       bool isFloat = (Ty->isDoubleTy() || Ty->isFloatTy());
       if (isFloat && !Subtarget->hasVFP2())
         return false;





More information about the llvm-commits mailing list