diff options
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/Scalar/ScalarReplAggregates.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Transforms/Scalar/ScalarReplAggregates.cpp b/lib/Transforms/Scalar/ScalarReplAggregates.cpp index fbf309292d..b3d7ef6ec1 100644 --- a/lib/Transforms/Scalar/ScalarReplAggregates.cpp +++ b/lib/Transforms/Scalar/ScalarReplAggregates.cpp @@ -425,6 +425,12 @@ bool ConvertToScalarInfo::MergeInVectorType(VectorType *VInTy, Type *ElementTy = VectorTy->getElementType(); Type *InElementTy = VInTy->getElementType(); + // If they're the same alloc size, we'll be attempting to convert between + // them with a vector shuffle, which requires the element types to match. + if (TD.getTypeAllocSize(VectorTy) == TD.getTypeAllocSize(VInTy) && + ElementTy != InElementTy) + return false; + // Do not allow mixed integer and floating-point accesses from vectors of // different sizes. if (ElementTy->isFloatingPointTy() != InElementTy->isFloatingPointTy()) |