Skip to content

Commit cc6a5ea

Browse files
committed
[M68k][NFC] Fix some unused variable warnings
Induced by variables that are only used in assertion statements. NFC.
1 parent 5a6ef95 commit cc6a5ea

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

llvm/lib/Target/M68k/M68kInstrInfo.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,7 @@ bool M68kInstrInfo::ExpandMOVX_RR(MachineInstrBuilder &MIB, MVT MVTDst,
361361

362362
assert(RCDst && RCSrc && "Wrong use of MOVX_RR");
363363
assert(RCDst != RCSrc && "You cannot use the same Reg Classes with MOVX_RR");
364+
(void)RCSrc;
364365

365366
// We need to find the super source register that matches the size of Dst
366367
unsigned SSrc = RI.getMatchingMegaReg(Src, RCDst);
@@ -407,6 +408,7 @@ bool M68kInstrInfo::ExpandMOVSZX_RR(MachineInstrBuilder &MIB, bool IsSigned,
407408

408409
assert(RCDst && RCSrc && "Wrong use of MOVSX_RR");
409410
assert(RCDst != RCSrc && "You cannot use the same Reg Classes with MOVSX_RR");
411+
(void)RCSrc;
410412

411413
// We need to find the super source register that matches the size of Dst
412414
unsigned SSrc = RI.getMatchingMegaReg(Src, RCDst);
@@ -746,6 +748,7 @@ void M68kInstrInfo::storeRegToStackSlot(
746748
const MachineFrameInfo &MFI = MBB.getParent()->getFrameInfo();
747749
assert(MFI.getObjectSize(FrameIndex) >= TRI->getSpillSize(*RC) &&
748750
"Stack slot is too small to store");
751+
(void)MFI;
749752

750753
unsigned Opc = getStoreRegOpcode(SrcReg, RC, TRI, Subtarget);
751754
DebugLoc DL = MBB.findDebugLoc(MI);
@@ -763,6 +766,7 @@ void M68kInstrInfo::loadRegFromStackSlot(MachineBasicBlock &MBB,
763766
const MachineFrameInfo &MFI = MBB.getParent()->getFrameInfo();
764767
assert(MFI.getObjectSize(FrameIndex) >= TRI->getSpillSize(*RC) &&
765768
"Stack slot is too small to load");
769+
(void)MFI;
766770

767771
unsigned Opc = getLoadRegOpcode(DstReg, RC, TRI, Subtarget);
768772
DebugLoc DL = MBB.findDebugLoc(MI);

llvm/lib/Target/M68k/MCTargetDesc/M68kMCCodeEmitter.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,10 +203,9 @@ void M68kMCCodeEmitter::encodeInstruction(const MCInst &MI,
203203
SmallVectorImpl<char> &CB,
204204
SmallVectorImpl<MCFixup> &Fixups,
205205
const MCSubtargetInfo &STI) const {
206-
unsigned Opcode = MI.getOpcode();
207-
208-
LLVM_DEBUG(dbgs() << "EncodeInstruction: " << MCII.getName(Opcode) << "("
209-
<< Opcode << ")\n");
206+
LLVM_DEBUG(dbgs() << "EncodeInstruction: " << MCII.getName(MI.getOpcode())
207+
<< "(" << Opcode << ")\n");
208+
(void)MCII;
210209

211210
// Try using the new method first.
212211
APInt EncodedInst(16, 0U);

0 commit comments

Comments
 (0)