[MIPS GlobalISel] Fix -Wunused-variable in -DLLVM_ENABLE_ASSERTIONS=off builds after D63541

llvm-svn: 364003
This commit is contained in:
Fangrui Song 2019-06-21 01:51:50 +00:00
parent 679669a77e
commit ddd056c984
2 changed files with 4 additions and 2 deletions

View File

@ -370,6 +370,7 @@ bool MipsInstructionSelector::select(MachineInstr &I,
case G_FPTOSI: { case G_FPTOSI: {
unsigned FromSize = MRI.getType(I.getOperand(1).getReg()).getSizeInBits(); unsigned FromSize = MRI.getType(I.getOperand(1).getReg()).getSizeInBits();
unsigned ToSize = MRI.getType(I.getOperand(0).getReg()).getSizeInBits(); unsigned ToSize = MRI.getType(I.getOperand(0).getReg()).getSizeInBits();
(void)ToSize;
assert((ToSize == 32) && "Unsupported integer size for G_FPTOSI"); assert((ToSize == 32) && "Unsupported integer size for G_FPTOSI");
assert((FromSize == 32 || FromSize == 64) && assert((FromSize == 32 || FromSize == 64) &&
"Unsupported floating point size for G_FPTOSI"); "Unsupported floating point size for G_FPTOSI");

View File

@ -171,9 +171,9 @@ MipsRegisterBankInfo::getInstrMapping(const MachineInstr &MI) const {
&Mips::ValueMappings[Mips::DPRIdx]}); &Mips::ValueMappings[Mips::DPRIdx]});
break; break;
case G_FPTOSI: { case G_FPTOSI: {
unsigned SizeInt = MRI.getType(MI.getOperand(0).getReg()).getSizeInBits();
unsigned SizeFP = MRI.getType(MI.getOperand(1).getReg()).getSizeInBits(); unsigned SizeFP = MRI.getType(MI.getOperand(1).getReg()).getSizeInBits();
assert((SizeInt == 32) && "Unsupported integer size"); assert((MRI.getType(MI.getOperand(0).getReg()).getSizeInBits() == 32) &&
"Unsupported integer size");
assert((SizeFP == 32 || SizeFP == 64) && "Unsupported floating point size"); assert((SizeFP == 32 || SizeFP == 64) && "Unsupported floating point size");
OperandsMapping = getOperandsMapping({ OperandsMapping = getOperandsMapping({
&Mips::ValueMappings[Mips::GPRIdx], &Mips::ValueMappings[Mips::GPRIdx],
@ -185,6 +185,7 @@ MipsRegisterBankInfo::getInstrMapping(const MachineInstr &MI) const {
case G_SITOFP: { case G_SITOFP: {
unsigned SizeInt = MRI.getType(MI.getOperand(1).getReg()).getSizeInBits(); unsigned SizeInt = MRI.getType(MI.getOperand(1).getReg()).getSizeInBits();
unsigned SizeFP = MRI.getType(MI.getOperand(0).getReg()).getSizeInBits(); unsigned SizeFP = MRI.getType(MI.getOperand(0).getReg()).getSizeInBits();
(void)SizeInt;
assert((SizeInt == 32) && "Unsupported integer size"); assert((SizeInt == 32) && "Unsupported integer size");
assert((SizeFP == 32 || SizeFP == 64) && "Unsupported floating point size"); assert((SizeFP == 32 || SizeFP == 64) && "Unsupported floating point size");
OperandsMapping = OperandsMapping =