[Target/PPC] Fold inside an assertion.

Pointed out by dblaikie.
This commit is contained in:
Davide Italiano 2020-06-15 12:08:15 -07:00
parent 695c7d6313
commit e51e82745e
1 changed files with 2 additions and 3 deletions

View File

@ -242,9 +242,8 @@ PPCMCCodeEmitter::getMemRI34PCRelEncoding(const MCInst &MI, unsigned OpNo,
const MCSymbolRefExpr *SRE = cast<MCSymbolRefExpr>(LHS);
(void)SRE;
const MCConstantExpr *CE = cast<MCConstantExpr>(RHS);
(void)CE;
assert(isInt<34>(CE->getValue()) && "Value must fit in 34 bits.");
assert(isInt<34>(cast<MCConstantExpr>(RHS)->getValue()) &&
"Value must fit in 34 bits.");
// Currently these are the only valid PCRelative Relocations.
assert((SRE->getKind() == MCSymbolRefExpr::VK_PCREL ||