@@ -3235,22 +3235,6 @@ void CodeGenFunction::EmitFunctionProlog(const CGFunctionInfo &FI,
3235
3235
3236
3236
llvm::StructType *STy =
3237
3237
dyn_cast<llvm::StructType>(ArgI.getCoerceToType ());
3238
- if (ArgI.isDirect () && !ArgI.getCanBeFlattened () && STy &&
3239
- STy->getNumElements () > 1 ) {
3240
- [[maybe_unused]] llvm::TypeSize StructSize =
3241
- CGM.getDataLayout ().getTypeAllocSize (STy);
3242
- [[maybe_unused]] llvm::TypeSize PtrElementSize =
3243
- CGM.getDataLayout ().getTypeAllocSize (ConvertTypeForMem (Ty));
3244
- if (STy->containsHomogeneousScalableVectorTypes ()) {
3245
- assert (StructSize == PtrElementSize &&
3246
- " Only allow non-fractional movement of structure with"
3247
- " homogeneous scalable vector type" );
3248
-
3249
- ArgVals.push_back (ParamValue::forDirect (AI));
3250
- break ;
3251
- }
3252
- }
3253
-
3254
3238
Address Alloca = CreateMemTemp (Ty, getContext ().getDeclAlign (Arg),
3255
3239
Arg->getName ());
3256
3240
@@ -5414,21 +5398,6 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo,
5414
5398
5415
5399
llvm::StructType *STy =
5416
5400
dyn_cast<llvm::StructType>(ArgInfo.getCoerceToType ());
5417
- if (STy && ArgInfo.isDirect () && !ArgInfo.getCanBeFlattened ()) {
5418
- llvm::Type *SrcTy = ConvertTypeForMem (I->Ty );
5419
- [[maybe_unused]] llvm::TypeSize SrcTypeSize =
5420
- CGM.getDataLayout ().getTypeAllocSize (SrcTy);
5421
- [[maybe_unused]] llvm::TypeSize DstTypeSize =
5422
- CGM.getDataLayout ().getTypeAllocSize (STy);
5423
- if (STy->containsHomogeneousScalableVectorTypes ()) {
5424
- assert (SrcTypeSize == DstTypeSize &&
5425
- " Only allow non-fractional movement of structure with "
5426
- " homogeneous scalable vector type" );
5427
-
5428
- IRCallArgs[FirstIRArg] = I->getKnownRValue ().getScalarVal ();
5429
- break ;
5430
- }
5431
- }
5432
5401
5433
5402
// FIXME: Avoid the conversion through memory if possible.
5434
5403
Address Src = Address::invalid ();
0 commit comments