[llvm] r362285 - Inline variable into assert to fix unused variable warning.
Richard Trieu via llvm-commits
llvm-commits at lists.llvm.org
Fri May 31 20:32:20 PDT 2019
Author: rtrieu
Date: Fri May 31 20:32:20 2019
New Revision: 362285
URL: http://llvm.org/viewvc/llvm-project?rev=362285&view=rev
Log:
Inline variable into assert to fix unused variable warning.
Modified:
llvm/trunk/lib/Transforms/Scalar/LoopPredication.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/LoopPredication.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopPredication.cpp?rev=362285&r1=362284&r2=362285&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopPredication.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopPredication.cpp Fri May 31 20:32:20 2019
@@ -821,9 +821,9 @@ Optional<LoopICmp> LoopPredication::pars
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()) {
More information about the llvm-commits
mailing list