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

This commit is contained in:
Fangrui Song 2021-03-30 12:52:56 -07:00
parent c2ebad8d55
commit 73adc05ced
1 changed files with 1 additions and 0 deletions

View File

@ -760,6 +760,7 @@ bool AArch64LegalizerInfo::legalizeRotate(MachineInstr &MI,
// is 64b with an extension.
Register AmtReg = MI.getOperand(2).getReg();
LLT AmtTy = MRI.getType(AmtReg);
(void)AmtTy;
assert(AmtTy.isScalar() && "Expected a scalar rotate");
assert(AmtTy.getSizeInBits() < 64 && "Expected this rotate to be legal");
auto NewAmt = Helper.MIRBuilder.buildSExt(LLT::scalar(64), AmtReg);