Skip to content

Commit 25e21a0

Browse files
committed
Fix -Wunused-variable in -DLLVM_ENABLE_ASSERTIONS=Off builds after D65958 and D70450
1 parent a75463c commit 25e21a0

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

llvm/lib/Analysis/LoopInfo.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,7 @@ BranchInst *Loop::getLoopGuardBranch() const {
366366
return nullptr;
367367

368368
BasicBlock *Preheader = getLoopPreheader();
369-
BasicBlock *Latch = getLoopLatch();
370-
assert(Preheader && Latch &&
369+
assert(Preheader && getLoopLatch() &&
371370
"Expecting a loop with valid preheader and latch");
372371

373372
// Loop should be in rotate form.

llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -906,6 +906,7 @@ AArch64LoadStoreOpt::mergePairedInsns(MachineBasicBlock::iterator I,
906906
};
907907
forAllMIsUntilDef(*I, RegToRename, TRI, LdStLimit, UpdateMIs);
908908

909+
#if !defined(NDEBUG)
909910
// Make sure the register used for renaming is not used between the paired
910911
// instructions. That would trash the content before the new paired
911912
// instruction.
@@ -919,6 +920,7 @@ AArch64LoadStoreOpt::mergePairedInsns(MachineBasicBlock::iterator I,
919920
}) &&
920921
"Rename register used between paired instruction, trashing the "
921922
"content");
923+
#endif
922924
}
923925

924926
// Insert our new paired instruction after whichever of the paired

0 commit comments

Comments
 (0)