Index: llvm/lib/MC/MCExpr.cpp =================================================================== --- llvm/lib/MC/MCExpr.cpp +++ llvm/lib/MC/MCExpr.cpp @@ -761,7 +761,7 @@ Addrs, InSet)) { // Check if both are Target Expressions, see if we can compare them. if (const MCTargetExpr *L = dyn_cast(ABE->getLHS())) - if (const MCTargetExpr *R = cast(ABE->getRHS())) { + if (const MCTargetExpr *R = dyn_cast(ABE->getRHS())) { switch (ABE->getOpcode()) { case MCBinaryExpr::EQ: Res = MCValue::get((L->isEqualTo(R)) ? -1 : 0);