aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/ExprTypeConvert.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms/ExprTypeConvert.cpp')
-rw-r--r--lib/Transforms/ExprTypeConvert.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/ExprTypeConvert.cpp b/lib/Transforms/ExprTypeConvert.cpp
index eea8607ed0..d7caa2e86a 100644
--- a/lib/Transforms/ExprTypeConvert.cpp
+++ b/lib/Transforms/ExprTypeConvert.cpp
@@ -756,7 +756,8 @@ static bool OperandConvertableToType(User *U, Value *V, const Type *Ty,
}
// Must move the same amount of data...
- if (TD.getTypeSize(ElTy) != TD.getTypeSize(I->getOperand(0)->getType()))
+ if (!ElTy->isSized() ||
+ TD.getTypeSize(ElTy) != TD.getTypeSize(I->getOperand(0)->getType()))
return false;
// Can convert store if the incoming value is convertable...