mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-15 23:31:37 +00:00
Cleanup some code to better use an early return style in preparation for adding
more cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129876 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2575a9c606
commit
5fc1282c18
@ -337,16 +337,20 @@ void ConvertToScalarInfo::MergeInType(const Type *In, uint64_t Offset,
|
|||||||
unsigned EltSize = In->getPrimitiveSizeInBits()/8;
|
unsigned EltSize = In->getPrimitiveSizeInBits()/8;
|
||||||
if (IsLoadOrStore && EltSize == AllocaSize)
|
if (IsLoadOrStore && EltSize == AllocaSize)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// If we're accessing something that could be an element of a vector, see
|
// If we're accessing something that could be an element of a vector, see
|
||||||
// if the implied vector agrees with what we already have and if Offset is
|
// if the implied vector agrees with what we already have and if Offset is
|
||||||
// compatible with it.
|
// compatible with it.
|
||||||
if (Offset % EltSize == 0 && AllocaSize % EltSize == 0 &&
|
if (Offset % EltSize == 0 && AllocaSize % EltSize == 0) {
|
||||||
(VectorTy == 0 ||
|
if (!VectorTy) {
|
||||||
cast<VectorType>(VectorTy)->getElementType()
|
|
||||||
->getPrimitiveSizeInBits()/8 == EltSize)) {
|
|
||||||
if (VectorTy == 0)
|
|
||||||
VectorTy = VectorType::get(In, AllocaSize/EltSize);
|
VectorTy = VectorType::get(In, AllocaSize/EltSize);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned CurrentEltSize = cast<VectorType>(VectorTy)->getElementType()
|
||||||
|
->getPrimitiveSizeInBits()/8;
|
||||||
|
if (EltSize == CurrentEltSize)
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user