mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-01 15:17:25 +00:00
Fix MergeInVectorType to check for vector types with the same alloc
size but different element types, so that it filters out the cases that CreateShuffleVectorCast doesn't handle. This fixes rdar://9786827. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135721 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user