LocalStackSlotAllocation: Swap order of check
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Thu, 10 Sep 2020 16:08:41 +0000 (12:08 -0400)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Wed, 16 Sep 2020 16:56:40 +0000 (12:56 -0400)
llvm/lib/CodeGen/LocalStackSlotAllocation.cpp

index 204fb55..ec3cce3 100644 (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.