@@ -3235,22 +3235,6 @@ void CodeGenFunction::EmitFunctionProlog(const CGFunctionInfo &FI,
32353235
32363236 llvm::StructType *STy =
32373237 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-
32543238 Address Alloca = CreateMemTemp (Ty, getContext ().getDeclAlign (Arg),
32553239 Arg->getName ());
32563240
@@ -5414,21 +5398,6 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo,
54145398
54155399 llvm::StructType *STy =
54165400 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- }
54325401
54335402 // FIXME: Avoid the conversion through memory if possible.
54345403 Address Src = Address::invalid ();
0 commit comments