diff --git a/lib/Transforms/ExprTypeConvert.cpp b/lib/Transforms/ExprTypeConvert.cpp index 85f9bb0714c..dee0c2026e8 100644 --- a/lib/Transforms/ExprTypeConvert.cpp +++ b/lib/Transforms/ExprTypeConvert.cpp @@ -274,6 +274,7 @@ bool ExpressionConvertableToType(Value *V, const Type *Ty, // if (GEP->getNumOperands() == 2 && GEP->getOperand(1)->getType() == Type::LongTy && + PTy->getElementType()->isSized() && TD.getTypeSize(PTy->getElementType()) == TD.getTypeSize(GEP->getType()->getElementType())) { const PointerType *NewSrcTy = PointerType::get(PVTy);