Skip to content

Commit a74a801

Browse files
authored
[AArch64][SME] Address post-commit comments on the MachineSMEABIPass (NFC) (#155588)
1 parent 870866f commit a74a801

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

llvm/lib/Target/AArch64/MachineSMEABIPass.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ StringRef getZAStateString(ZAState State) {
139139
#undef MAKE_CASE
140140
}
141141

142-
static bool isZAorZT0RegOp(const TargetRegisterInfo &TRI,
143-
const MachineOperand &MO) {
142+
static bool isZAorZTRegOp(const TargetRegisterInfo &TRI,
143+
const MachineOperand &MO) {
144144
if (!MO.isReg() || !MO.getReg().isPhysical())
145145
return false;
146146
return any_of(TRI.subregs_inclusive(MO.getReg()), [](const MCPhysReg &SR) {
@@ -166,7 +166,7 @@ getZAStateBeforeInst(const TargetRegisterInfo &TRI, MachineInstr &MI,
166166
return {ZAOffAtReturn ? ZAState::OFF : ZAState::ACTIVE, InsertPt};
167167

168168
for (auto &MO : MI.operands()) {
169-
if (isZAorZT0RegOp(TRI, MO))
169+
if (isZAorZTRegOp(TRI, MO))
170170
return {ZAState::ACTIVE, InsertPt};
171171
}
172172

@@ -266,7 +266,7 @@ void MachineSMEABI::collectNeededZAStates(SMEAttrs SMEFnAttrs) {
266266
State.Blocks.resize(MF->getNumBlockIDs());
267267
for (MachineBasicBlock &MBB : *MF) {
268268
BlockInfo &Block = State.Blocks[MBB.getNumber()];
269-
if (&MBB == &MF->front()) {
269+
if (MBB.isEntryBlock()) {
270270
// Entry block:
271271
Block.FixedEntryState = SMEFnAttrs.hasPrivateZAInterface()
272272
? ZAState::CALLER_DORMANT

0 commit comments

Comments
 (0)