diff options
author | Fangrui Song <maskray@google.com> | 2019-12-11 10:59:45 -0800 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2019-12-11 11:04:03 -0800 |
commit | 25e21a09b3f6e9ce747555e61e7d1fbaa161056f (patch) | |
tree | 9e3b066e6b538d303700e1222476214013dbe24c /llvm/lib | |
parent | a75463c4717269dcf17a3aae0fd609c5ecc75f9a (diff) | |
download | bcm5719-llvm-25e21a09b3f6e9ce747555e61e7d1fbaa161056f.tar.gz bcm5719-llvm-25e21a09b3f6e9ce747555e61e7d1fbaa161056f.zip |
Fix -Wunused-variable in -DLLVM_ENABLE_ASSERTIONS=Off builds after D65958 and D70450
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Analysis/LoopInfo.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/LoopInfo.cpp b/llvm/lib/Analysis/LoopInfo.cpp index e67e1ae0875..9a9063b3d4e 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 1bf882b6682..296115c2006 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 |