Skip to content

Commit b59cae4

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

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
@@ -3962,12 +3962,13 @@ void AArch64FrameLowering::determineStackHazardSlot(
39623962
std::optional<int> FI = getLdStFrameID(MI, MFI);
39633963
if (!FI || FI < 0 || FI > int(SlotTypes.size()))
39643964
continue;
3965-
bool IsScalable = MFI.isScalableStackID(*FI);
3966-
bool IsPPR = IsScalable && isPPRAccess(MI);
3967-
if (IsScalable || AArch64InstrInfo::isFpOrNEON(MI)) {
3968-
SlotTypes[*FI] |= IsPPR ? SlotType::PPR : SlotType::ZPRorFPR;
3965+
if (MFI.isScalableStackID(*FI)) {
3966+
SlotTypes[*FI] |=
3967+
isPPRAccess(MI) ? SlotType::PPR : SlotType::ZPRorFPR;
39693968
} else {
3970-
SlotTypes[*FI] |= SlotType::GPR;
3969+
SlotTypes[*FI] |= AArch64InstrInfo::isFpOrNEON(MI)
3970+
? SlotType::ZPRorFPR
3971+
: SlotType::GPR;
39713972
}
39723973
}
39733974
}

0 commit comments

Comments
 (0)