Fix -Wunused-variable in -DLLVM_ENABLE_ASSERTIONS=Off builds after D65958 and D70450

This commit is contained in:
Fangrui Song 2019-12-11 10:59:45 -08:00
parent 109f24d25c
commit 92bbe401b0
2 changed files with 3 additions and 2 deletions

View File

@ -366,8 +366,7 @@ BranchInst *Loop::getLoopGuardBranch() const {
return nullptr;
BasicBlock *Preheader = getLoopPreheader();
BasicBlock *Latch = getLoopLatch();
assert(Preheader && Latch &&
assert(Preheader && getLoopLatch() &&
"Expecting a loop with valid preheader and latch");
// Loop should be in rotate form.

View File

@ -906,6 +906,7 @@ AArch64LoadStoreOpt::mergePairedInsns(MachineBasicBlock::iterator I,
};
forAllMIsUntilDef(*I, RegToRename, TRI, LdStLimit, UpdateMIs);
#if !defined(NDEBUG)
// Make sure the register used for renaming is not used between the paired
// instructions. That would trash the content before the new paired
// instruction.
@ -919,6 +920,7 @@ AArch64LoadStoreOpt::mergePairedInsns(MachineBasicBlock::iterator I,
}) &&
"Rename register used between paired instruction, trashing the "
"content");
#endif
}
// Insert our new paired instruction after whichever of the paired