Skip to content

Commit 2b34781

Browse files
committed
Tidy PPR/ZPR check
Change-Id: I30e2cf5ea7a1df932f145e685a3fbd39cd974d4d
1 parent ec3cec6 commit 2b34781

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
@@ -4019,12 +4019,13 @@ void AArch64FrameLowering::determineStackHazardSlot(
40194019
std::optional<int> FI = getLdStFrameID(MI, MFI);
40204020
if (!FI || FI < 0 || FI > int(SlotTypes.size()))
40214021
continue;
4022-
bool IsScalable = MFI.isScalableStackID(*FI);
4023-
bool IsPPR = IsScalable && isPPRAccess(MI);
4024-
if (IsScalable || AArch64InstrInfo::isFpOrNEON(MI)) {
4025-
SlotTypes[*FI] |= IsPPR ? SlotType::PPR : SlotType::ZPRorFPR;
4022+
if (MFI.isScalableStackID(*FI)) {
4023+
SlotTypes[*FI] |=
4024+
isPPRAccess(MI) ? SlotType::PPR : SlotType::ZPRorFPR;
40264025
} else {
4027-
SlotTypes[*FI] |= SlotType::GPR;
4026+
SlotTypes[*FI] |= AArch64InstrInfo::isFpOrNEON(MI)
4027+
? SlotType::ZPRorFPR
4028+
: SlotType::GPR;
40284029
}
40294030
}
40304031
}

0 commit comments

Comments
 (0)