[PATCH] D71364: Fix no-assert ununsed variable.

Rumeet Dhindsa via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 11 09:45:41 PST 2019


rdhindsa created this revision.
rdhindsa added a reviewer: rupprecht.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
rdhindsa added a reviewer: echristo.

These variables are unused in the no-assert build.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D71364

Files:
  llvm/lib/Analysis/LoopInfo.cpp
  llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp


Index: llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
===================================================================
--- llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
+++ llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
@@ -910,7 +910,8 @@
     // instruction.
     for (auto &MI :
          iterator_range<MachineInstrBundleIterator<llvm::MachineInstr>>(
-             std::next(I), std::next(Paired)))
+             std::next(I), std::next(Paired))){
+      (void)MI;
       assert(all_of(MI.operands(),
                     [this, &RenameReg](const MachineOperand &MOP) {
                       return !MOP.isReg() || MOP.isDebug() ||
@@ -918,6 +919,7 @@
                     }) &&
              "Rename register used between paired instruction, trashing the "
              "content");
+    }
   }
 
   // Insert our new paired instruction after whichever of the paired
Index: llvm/lib/Analysis/LoopInfo.cpp
===================================================================
--- llvm/lib/Analysis/LoopInfo.cpp
+++ llvm/lib/Analysis/LoopInfo.cpp
@@ -367,6 +367,7 @@
 
   BasicBlock *Preheader = getLoopPreheader();
   BasicBlock *Latch = getLoopLatch();
+  (void)Latch;
   assert(Preheader && Latch &&
          "Expecting a loop with valid preheader and latch");
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71364.233395.patch
Type: text/x-patch
Size: 1295 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191211/29ca745c/attachment.bin>


More information about the llvm-commits mailing list