================ @@ -4294,24 +4396,32 @@ static int64_t determineSVEStackObjectOffsets(MachineFrameInfo &MFI, report_fatal_error( "Alignment of scalable vectors > 16 bytes is not yet supported"); + int64_t &Offset = OffsetForObject(FI, ZPROffset, PPROffset); Offset = alignTo(Offset + MFI.getObjectSize(FI), Alignment); if (AssignOffsets) Assign(FI, -Offset); } - return Offset; + PPROffset = alignTo(PPROffset, Align(16U)); + ZPROffset = alignTo(ZPROffset, Align(16U)); + + if (&ZPROffset != &PPROffset) { + // SplitSVEObjects (PPRs and ZPRs allocated to separate areas). + return SVEStackSizes{ZPROffset, PPROffset}; + } + // When SplitSVEObjects is disabled just attribute all the stack to ZPRs. + // Determining the split is not necessary. + return SVEStackSizes{ZPROffset, 0}; ---------------- sdesmalen-arm wrote:
When you use an instance of the return type (`SVEStackSizes`) instead of `ZPRStack` and `PPRStack`, then you can just return that struct at the end of this function. https://github.com/llvm/llvm-project/pull/142391 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits