Inline variable into assert to fix unused variable warning.

llvm-svn: 362285
This commit is contained in:
Richard Trieu 2019-06-01 03:32:20 +00:00
parent 19afdf74bb
commit 4e875464df
1 changed files with 3 additions and 3 deletions

View 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()) {