Skip to content

Commit 142af7d

Browse files
committed
Update comment
Change-Id: I5dca6eaca8613a33e89a5cec9cc7d2c0f9cc7fb5
1 parent 9799316 commit 142af7d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

llvm/lib/Target/AArch64/MachineSMEABIPass.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -549,10 +549,12 @@ void MachineSMEABI::emitAllocateLazySaveBuffer(
549549

550550
// 1. Allocate the lazy save buffer.
551551
if (Buffer == AArch64::NoRegister) {
552-
// TODO This function grows the stack with a subtraction, which doesn't work
553-
// on Windows. Some refactoring to share the functionality in
554-
// LowerWindowsDYNAMIC_STACKALLOC will be required once the Windows ABI
555-
// supports SME
552+
// TODO: On Windows, we allocate the lazy save buffer in SelectionDAG (so
553+
// Buffer != AArch64::NoRegister). This is done to reuse the existing
554+
// expansions (which can insert stack checks). This works, but it means we
555+
// will always allocate the lazy save buffer (even if the function contains
556+
// no lazy saves). If we want to handle Windows here, we'll need to
557+
// implement something similar to LowerWindowsDYNAMIC_STACKALLOC.
556558
assert(!Subtarget->isTargetWindows() &&
557559
"Lazy ZA save is not yet supported on Windows");
558560
Buffer = MRI->createVirtualRegister(&AArch64::GPR64RegClass);

0 commit comments

Comments
 (0)