summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/ExprTypeConvert.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/ExprTypeConvert.cpp b/llvm/lib/Transforms/ExprTypeConvert.cpp
index 85f9bb0714c..dee0c2026e8 100644
--- a/llvm/lib/Transforms/ExprTypeConvert.cpp
+++ b/llvm/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);
OpenPOWER on IntegriCloud