[llvm-branch-commits] [llvm-branch] r118518 - /llvm/branches/Apple/whitney/lib/Target/ARM/ARMFastISel.cpp

Daniel Dunbar daniel at zuster.org
Tue Nov 9 09:27:51 PST 2010


Author: ddunbar
Date: Tue Nov  9 11:27:51 2010
New Revision: 118518

URL: http://llvm.org/viewvc/llvm-project?rev=118518&view=rev
Log:
Merge r117848:
--
Author: Eric Christopher <echristo at apple.com>
Date:   Sat Oct 30 21:25:26 2010 +0000

    Make sure we have a legal type (and simple) before continuing.

Modified:
    llvm/branches/Apple/whitney/lib/Target/ARM/ARMFastISel.cpp

Modified: llvm/branches/Apple/whitney/lib/Target/ARM/ARMFastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/whitney/lib/Target/ARM/ARMFastISel.cpp?rev=118518&r1=118517&r2=118518&view=diff
==============================================================================
--- llvm/branches/Apple/whitney/lib/Target/ARM/ARMFastISel.cpp (original)
+++ llvm/branches/Apple/whitney/lib/Target/ARM/ARMFastISel.cpp Tue Nov  9 11:27:51 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-branch-commits mailing list