forked from OSchip/llvm-project
Make sure we have a legal type (and simple) before continuing.
llvm-svn: 117848
This commit is contained in:
parent
c940bcf564
commit
04b0a3e651
|
@ -939,8 +939,11 @@ bool ARMFastISel::SelectBranch(const Instruction *I) {
|
||||||
// TODO: Factor this out.
|
// TODO: Factor this out.
|
||||||
if (const CmpInst *CI = dyn_cast<CmpInst>(BI->getCondition())) {
|
if (const CmpInst *CI = dyn_cast<CmpInst>(BI->getCondition())) {
|
||||||
if (CI->hasOneUse() && (CI->getParent() == I->getParent())) {
|
if (CI->hasOneUse() && (CI->getParent() == I->getParent())) {
|
||||||
|
EVT VT;
|
||||||
const Type *Ty = CI->getOperand(0)->getType();
|
const Type *Ty = CI->getOperand(0)->getType();
|
||||||
EVT VT = TLI.getValueType(Ty);
|
if (!isTypeLegal(Ty, VT))
|
||||||
|
return false;
|
||||||
|
|
||||||
bool isFloat = (Ty->isDoubleTy() || Ty->isFloatTy());
|
bool isFloat = (Ty->isDoubleTy() || Ty->isFloatTy());
|
||||||
if (isFloat && !Subtarget->hasVFP2())
|
if (isFloat && !Subtarget->hasVFP2())
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue