[llvm] 25e21a0 - Fix -Wunused-variable in -DLLVM_ENABLE_ASSERTIONS=Off builds after D65958 and D70450
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 11 11:04:46 PST 2019
Author: Fangrui Song
Date: 2019-12-11T11:04:03-08:00
New Revision: 25e21a09b3f6e9ce747555e61e7d1fbaa161056f
URL: https://github.com/llvm/llvm-project/commit/25e21a09b3f6e9ce747555e61e7d1fbaa161056f
DIFF: https://github.com/llvm/llvm-project/commit/25e21a09b3f6e9ce747555e61e7d1fbaa161056f.diff
LOG: Fix -Wunused-variable in -DLLVM_ENABLE_ASSERTIONS=Off builds after D65958 and D70450
Added:
Modified:
llvm/lib/Analysis/LoopInfo.cpp
llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Analysis/LoopInfo.cpp b/llvm/lib/Analysis/LoopInfo.cpp
index e67e1ae0875b..9a9063b3d4e2 100644
--- a/llvm/lib/Analysis/LoopInfo.cpp
+++ b/llvm/lib/Analysis/LoopInfo.cpp
@@ -366,8 +366,7 @@ BranchInst *Loop::getLoopGuardBranch() const {
return nullptr;
BasicBlock *Preheader = getLoopPreheader();
- BasicBlock *Latch = getLoopLatch();
- assert(Preheader && Latch &&
+ assert(Preheader && getLoopLatch() &&
"Expecting a loop with valid preheader and latch");
// Loop should be in rotate form.
diff --git a/llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp b/llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
index 1bf882b66824..296115c20066 100644
--- a/llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
+++ b/llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
@@ -906,6 +906,7 @@ AArch64LoadStoreOpt::mergePairedInsns(MachineBasicBlock::iterator I,
};
forAllMIsUntilDef(*I, RegToRename, TRI, LdStLimit, UpdateMIs);
+#if !defined(NDEBUG)
// Make sure the register used for renaming is not used between the paired
// instructions. That would trash the content before the new paired
// instruction.
@@ -919,6 +920,7 @@ AArch64LoadStoreOpt::mergePairedInsns(MachineBasicBlock::iterator I,
}) &&
"Rename register used between paired instruction, trashing the "
"content");
+#endif
}
// Insert our new paired instruction after whichever of the paired
More information about the llvm-commits
mailing list