[PATCH] D91705: Fix unused variables in release build

Mikhail Goncharov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 18 06:18:57 PST 2020


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGf45c052c9e62: Fix unused variables in release build (authored by goncharov).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91705/new/

https://reviews.llvm.org/D91705

Files:
  llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp


Index: llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp
===================================================================
--- llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp
+++ llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp
@@ -1569,7 +1569,7 @@
       auto Next = ++MachineBasicBlock::iterator(VPST);
       assert(getVPTInstrPredicate(*Next) != ARMVCC::None &&
              "The instruction after a VPST must be predicated");
-
+      (void)Next;
       MachineInstr *VprDef = RDA->getUniqueReachingMIDef(VPST, ARM::VPR);
       if (VprDef && VCMPOpcodeToVPT(VprDef->getOpcode()) &&
           !LoLoop.ToRemove.contains(VprDef)) {
@@ -1578,13 +1578,11 @@
         // the same values at the VPST
         if (RDA->hasSameReachingDef(VCMP, VPST, VCMP->getOperand(1).getReg()) &&
             RDA->hasSameReachingDef(VCMP, VPST, VCMP->getOperand(2).getReg())) {
-          bool IntermediateInstrsUseVPR =
-              std::any_of(++MachineBasicBlock::iterator(VCMP),
-                          MachineBasicBlock::iterator(VPST), hasVPRUse);
           // If the instruction after the VCMP is predicated then a different
           // code path is expected to have merged the VCMP and VPST already.
           // This assertion protects against changes to that behaviour
-          assert(!IntermediateInstrsUseVPR &&
+          assert(!std::any_of(++MachineBasicBlock::iterator(VCMP),
+                              MachineBasicBlock::iterator(VPST), hasVPRUse) &&
                  "Instructions between the VCMP and VPST are not expected to "
                  "be predicated");
           ReplaceVCMPWithVPT(VCMP, VPST);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91705.306087.patch
Type: text/x-patch
Size: 1617 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201118/00ea9971/attachment.bin>


More information about the llvm-commits mailing list