LocalStackSlotAllocation: Swap order of check

This commit is contained in:
Matt Arsenault 2020-09-10 12:08:41 -04:00
parent 7a72eeae37
commit cc3396a954

View File

@ -117,7 +117,7 @@ bool LocalStackSlotPass::runOnMachineFunction(MachineFunction &MF) {
// If the target doesn't want/need this pass, or if there are no locals
// to consider, early exit.
if (!TRI->requiresVirtualBaseRegisters(MF) || LocalObjectCount == 0)
if (LocalObjectCount == 0 || !TRI->requiresVirtualBaseRegisters(MF))
return true;
// Make sure we have enough space to store the local offsets.