From: Eric Christopher Date: Sat, 30 Oct 2010 21:25:26 +0000 (+0000) Subject: Make sure we have a legal type (and simple) before continuing. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=76d61478dff97d10ed01ae071f9fff1a24001009;p=oota-llvm.git Make sure we have a legal type (and simple) before continuing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117848 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/ARM/ARMFastISel.cpp b/lib/Target/ARM/ARMFastISel.cpp index 8a5b73eef80..5d85187a7b4 100644 --- a/lib/Target/ARM/ARMFastISel.cpp +++ b/lib/Target/ARM/ARMFastISel.cpp @@ -939,8 +939,11 @@ bool ARMFastISel::SelectBranch(const Instruction *I) { // TODO: Factor this out. if (const CmpInst *CI = dyn_cast(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;