Skip to content

Commit 6698571

Browse files
committed
Tidy PPR/ZPR check
Change-Id: I30e2cf5ea7a1df932f145e685a3fbd39cd974d4d
1 parent ad49ac1 commit 6698571

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
@@ -4081,12 +4081,13 @@ void AArch64FrameLowering::determineStackHazardSlot(
40814081
std::optional<int> FI = getLdStFrameID(MI, MFI);
40824082
if (!FI || FI < 0 || FI > int(SlotTypes.size()))
40834083
continue;
4084-
bool IsScalable = MFI.isScalableStackID(*FI);
4085-
bool IsPPR = IsScalable && isPPRAccess(MI);
4086-
if (IsScalable || AArch64InstrInfo::isFpOrNEON(MI)) {
4087-
SlotTypes[*FI] |= IsPPR ? SlotType::PPR : SlotType::ZPRorFPR;
4084+
if (MFI.isScalableStackID(*FI)) {
4085+
SlotTypes[*FI] |=
4086+
isPPRAccess(MI) ? SlotType::PPR : SlotType::ZPRorFPR;
40884087
} else {
4089-
SlotTypes[*FI] |= SlotType::GPR;
4088+
SlotTypes[*FI] |= AArch64InstrInfo::isFpOrNEON(MI)
4089+
? SlotType::ZPRorFPR
4090+
: SlotType::GPR;
40904091
}
40914092
}
40924093
}

0 commit comments

Comments
 (0)