Skip to content

Commit 0aed315

Browse files
committed
Add comment
Change-Id: I29831358c352e68eb5838bb4d8f2e424ba415adb
1 parent b41ad79 commit 0aed315

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

llvm/lib/Target/AArch64/MachineSMEABIPass.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,11 @@ getInstNeededZAState(const TargetRegisterInfo &TRI, MachineInstr &MI,
252252
SMEAttrs SMEFnAttrs) {
253253
MachineBasicBlock::iterator InsertPt(MI);
254254

255+
// Note: InOutZAUsePseudo, RequiresZASavePseudo, and RequiresZT0SavePseudo are
256+
// intended to mark the position immediately before a call. Due to
257+
// SelectionDAG constraints, these markers occur after the ADJCALLSTACKDOWN,
258+
// so we use std::prev(InsertPt) to get the position before the call.
259+
255260
if (MI.getOpcode() == AArch64::InOutZAUsePseudo)
256261
return {ZAState::ACTIVE, std::prev(InsertPt)};
257262

0 commit comments

Comments
 (0)