Skip to content

Commit ca74899

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

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
@@ -4088,12 +4088,13 @@ void AArch64FrameLowering::determineStackHazardSlot(
40884088
std::optional<int> FI = getLdStFrameID(MI, MFI);
40894089
if (!FI || FI < 0 || FI > int(SlotTypes.size()))
40904090
continue;
4091-
bool IsScalable = MFI.isScalableStackID(*FI);
4092-
bool IsPPR = IsScalable && isPPRAccess(MI);
4093-
if (IsScalable || AArch64InstrInfo::isFpOrNEON(MI)) {
4094-
SlotTypes[*FI] |= IsPPR ? SlotType::PPR : SlotType::ZPRorFPR;
4091+
if (MFI.isScalableStackID(*FI)) {
4092+
SlotTypes[*FI] |=
4093+
isPPRAccess(MI) ? SlotType::PPR : SlotType::ZPRorFPR;
40954094
} else {
4096-
SlotTypes[*FI] |= SlotType::GPR;
4095+
SlotTypes[*FI] |= AArch64InstrInfo::isFpOrNEON(MI)
4096+
? SlotType::ZPRorFPR
4097+
: SlotType::GPR;
40974098
}
40984099
}
40994100
}

0 commit comments

Comments
 (0)