]> granicus.if.org Git - llvm/commitdiff
Inline variable into assert to fix unused variable warning.
authorRichard Trieu <rtrieu@google.com>
Sat, 1 Jun 2019 03:32:20 +0000 (03:32 +0000)
committerRichard Trieu <rtrieu@google.com>
Sat, 1 Jun 2019 03:32:20 +0000 (03:32 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362285 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/LoopPredication.cpp

index dfecacfcb7842e5de34848e30803ac629659a354..62a79426e25e11c92b2abd3ec5976452bcea6c4e 100644 (file)
@@ -821,9 +821,9 @@ Optional<LoopICmp> LoopPredication::parseLoopLatchICmp() {
     return None;
   }
   BasicBlock *TrueDest = BI->getSuccessor(0);
-  BasicBlock *FalseDest = BI->getSuccessor(1);
-  assert((TrueDest == L->getHeader() || FalseDest == L->getHeader()) &&
-         "One of the latch's destinations must be the header");
+  assert(
+      (TrueDest == L->getHeader() || BI->getSuccessor(1) == L->getHeader()) &&
+      "One of the latch's destinations must be the header");
 
   auto *ICI = dyn_cast<ICmpInst>(BI->getCondition());
   if (!ICI || !BI->isConditional()) {