[llvm] [AArch64][SME] Address post-commit comments on the MachineSMEABIPass (NFC) (PR #155588)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 27 03:15:29 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-aarch64
Author: Benjamin Maxwell (MacDue)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/155588.diff
1 Files Affected:
- (modified) llvm/lib/Target/AArch64/MachineSMEABIPass.cpp (+4-4)
``````````diff
diff --git a/llvm/lib/Target/AArch64/MachineSMEABIPass.cpp b/llvm/lib/Target/AArch64/MachineSMEABIPass.cpp
index b58dfdf32e4ab..5dfaa891193cf 100644
--- a/llvm/lib/Target/AArch64/MachineSMEABIPass.cpp
+++ b/llvm/lib/Target/AArch64/MachineSMEABIPass.cpp
@@ -139,8 +139,8 @@ StringRef getZAStateString(ZAState State) {
#undef MAKE_CASE
}
-static bool isZAorZT0RegOp(const TargetRegisterInfo &TRI,
- const MachineOperand &MO) {
+static bool isZAorZTRegOp(const TargetRegisterInfo &TRI,
+ const MachineOperand &MO) {
if (!MO.isReg() || !MO.getReg().isPhysical())
return false;
return any_of(TRI.subregs_inclusive(MO.getReg()), [](const MCPhysReg &SR) {
@@ -166,7 +166,7 @@ getZAStateBeforeInst(const TargetRegisterInfo &TRI, MachineInstr &MI,
return {ZAOffAtReturn ? ZAState::OFF : ZAState::ACTIVE, InsertPt};
for (auto &MO : MI.operands()) {
- if (isZAorZT0RegOp(TRI, MO))
+ if (isZAorZTRegOp(TRI, MO))
return {ZAState::ACTIVE, InsertPt};
}
@@ -266,7 +266,7 @@ void MachineSMEABI::collectNeededZAStates(SMEAttrs SMEFnAttrs) {
State.Blocks.resize(MF->getNumBlockIDs());
for (MachineBasicBlock &MBB : *MF) {
BlockInfo &Block = State.Blocks[MBB.getNumber()];
- if (&MBB == &MF->front()) {
+ if (MBB.isEntryBlock()) {
// Entry block:
Block.FixedEntryState = SMEFnAttrs.hasPrivateZAInterface()
? ZAState::CALLER_DORMANT
``````````
</details>
https://github.com/llvm/llvm-project/pull/155588
More information about the llvm-commits
mailing list