Skip to content

Commit 831fe22

Browse files
committed
Tidy PPR/ZPR check
Change-Id: I30e2cf5ea7a1df932f145e685a3fbd39cd974d4d
1 parent 5ae6aec commit 831fe22

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

llvm/lib/Target/AArch64/AArch64FrameLowering.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4153,12 +4153,13 @@ void AArch64FrameLowering::determineStackHazardSlot(
41534153
std::optional<int> FI = getLdStFrameID(MI, MFI);
41544154
if (!FI || FI < 0 || FI > int(SlotTypes.size()))
41554155
continue;
4156-
bool IsScalable = MFI.isScalableStackID(*FI);
4157-
bool IsPPR = IsScalable && isPPRAccess(MI);
4158-
if (IsScalable || AArch64InstrInfo::isFpOrNEON(MI)) {
4159-
SlotTypes[*FI] |= IsPPR ? SlotType::PPR : SlotType::ZPRorFPR;
4156+
if (MFI.isScalableStackID(*FI)) {
4157+
SlotTypes[*FI] |=
4158+
isPPRAccess(MI) ? SlotType::PPR : SlotType::ZPRorFPR;
41604159
} else {
4161-
SlotTypes[*FI] |= SlotType::GPR;
4160+
SlotTypes[*FI] |= AArch64InstrInfo::isFpOrNEON(MI)
4161+
? SlotType::ZPRorFPR
4162+
: SlotType::GPR;
41624163
}
41634164
}
41644165
}

0 commit comments

Comments
 (0)