GlobalISel: fix unused warnings in release builds.

llvm-svn: 371385
This commit is contained in:
Tim Northover 2019-09-09 10:36:58 +00:00
parent 36147adc0b
commit 06d93e0a25
1 changed files with 4 additions and 0 deletions

View File

@ -386,9 +386,11 @@ bool CombinerHelper::findPostIndexCandidate(MachineInstr &MI, Register &Addr,
auto &MF = *MI.getParent()->getParent();
const auto &TLI = *MF.getSubtarget().getTargetLowering();
#ifndef NDEBUG
unsigned Opcode = MI.getOpcode();
assert(Opcode == TargetOpcode::G_LOAD || Opcode == TargetOpcode::G_SEXTLOAD ||
Opcode == TargetOpcode::G_ZEXTLOAD || Opcode == TargetOpcode::G_STORE);
#endif
Base = MI.getOperand(1).getReg();
MachineInstr *BaseDef = MRI.getUniqueVRegDef(Base);
@ -451,9 +453,11 @@ bool CombinerHelper::findPreIndexCandidate(MachineInstr &MI, Register &Addr,
auto &MF = *MI.getParent()->getParent();
const auto &TLI = *MF.getSubtarget().getTargetLowering();
#ifndef NDEBUG
unsigned Opcode = MI.getOpcode();
assert(Opcode == TargetOpcode::G_LOAD || Opcode == TargetOpcode::G_SEXTLOAD ||
Opcode == TargetOpcode::G_ZEXTLOAD || Opcode == TargetOpcode::G_STORE);
#endif
Addr = MI.getOperand(1).getReg();
MachineInstr *AddrDef = getOpcodeDef(TargetOpcode::G_GEP, Addr, MRI);