File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -485,10 +485,12 @@ void MachineSMEABI::emitAllocateLazySaveBuffer(
485485
486486 // 1. Allocate the lazy save buffer.
487487 if (Buffer == AArch64::NoRegister) {
488- // TODO This function grows the stack with a subtraction, which doesn't work
489- // on Windows. Some refactoring to share the functionality in
490- // LowerWindowsDYNAMIC_STACKALLOC will be required once the Windows ABI
491- // supports SME
488+ // TODO: On Windows, we allocate the lazy save buffer in SelectionDAG (so
489+ // Buffer != AArch64::NoRegister). This is done to reuse the existing
490+ // expansions (which can insert stack checks). This works, but it means we
491+ // will always allocate the lazy save buffer (even if the function contains
492+ // no lazy saves). If we want to handle Windows here, we'll need to
493+ // implement something similar to LowerWindowsDYNAMIC_STACKALLOC.
492494 assert (!Subtarget.isTargetWindows () &&
493495 " Lazy ZA save is not yet supported on Windows" );
494496 Buffer = MRI.createVirtualRegister (&AArch64::GPR64RegClass);
You can’t perform that action at this time.
0 commit comments