[llvm] 8d8a496 - LocalStackSlotAllocation: Swap order of check
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 16 09:56:47 PDT 2020
Author: Matt Arsenault
Date: 2020-09-16T12:56:40-04:00
New Revision: 8d8a496356dbdf4fcc17caa69fe489d8d87068ac
URL: https://github.com/llvm/llvm-project/commit/8d8a496356dbdf4fcc17caa69fe489d8d87068ac
DIFF: https://github.com/llvm/llvm-project/commit/8d8a496356dbdf4fcc17caa69fe489d8d87068ac.diff
LOG: LocalStackSlotAllocation: Swap order of check
Added:
Modified:
llvm/lib/CodeGen/LocalStackSlotAllocation.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/LocalStackSlotAllocation.cpp b/llvm/lib/CodeGen/LocalStackSlotAllocation.cpp
index 204fb556d810..ec3cce3fa1f1 100644
--- a/llvm/lib/CodeGen/LocalStackSlotAllocation.cpp
+++ b/llvm/lib/CodeGen/LocalStackSlotAllocation.cpp
@@ -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.
More information about the llvm-commits
mailing list