@@ -3221,12 +3221,10 @@ void CodeGenFunction::EmitFunctionProlog(const CGFunctionInfo &FI,
3221
3221
3222
3222
llvm::StructType *STy =
3223
3223
dyn_cast<llvm::StructType>(ArgI.getCoerceToType ());
3224
- llvm::TypeSize StructSize;
3225
- llvm::TypeSize PtrElementSize;
3226
3224
if (ArgI.isDirect () && !ArgI.getCanBeFlattened () && STy &&
3227
3225
STy->getNumElements () > 1 ) {
3228
- StructSize = CGM.getDataLayout ().getTypeAllocSize (STy);
3229
- PtrElementSize =
3226
+ llvm::TypeSize StructSize = CGM.getDataLayout ().getTypeAllocSize (STy);
3227
+ llvm::TypeSize PtrElementSize =
3230
3228
CGM.getDataLayout ().getTypeAllocSize (ConvertTypeForMem (Ty));
3231
3229
if (STy->containsHomogeneousScalableVectorTypes ()) {
3232
3230
assert (StructSize == PtrElementSize &&
@@ -5310,12 +5308,11 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo,
5310
5308
5311
5309
llvm::StructType *STy =
5312
5310
dyn_cast<llvm::StructType>(ArgInfo.getCoerceToType ());
5313
- llvm::Type *SrcTy = ConvertTypeForMem (I->Ty );
5314
- llvm::TypeSize SrcTypeSize;
5315
- llvm::TypeSize DstTypeSize;
5316
5311
if (STy && ArgInfo.isDirect () && !ArgInfo.getCanBeFlattened ()) {
5317
- SrcTypeSize = CGM.getDataLayout ().getTypeAllocSize (SrcTy);
5318
- DstTypeSize = CGM.getDataLayout ().getTypeAllocSize (STy);
5312
+ llvm::Type *SrcTy = ConvertTypeForMem (I->Ty );
5313
+ llvm::TypeSize SrcTypeSize =
5314
+ CGM.getDataLayout ().getTypeAllocSize (SrcTy);
5315
+ llvm::TypeSize DstTypeSize = CGM.getDataLayout ().getTypeAllocSize (STy);
5319
5316
if (STy->containsHomogeneousScalableVectorTypes ()) {
5320
5317
assert (SrcTypeSize == DstTypeSize &&
5321
5318
" Only allow non-fractional movement of structure with "
0 commit comments