diff --git a/bolt/BinaryFunction.cpp b/bolt/BinaryFunction.cpp index 0784c2351714..c224bbcd2eeb 100644 --- a/bolt/BinaryFunction.cpp +++ b/bolt/BinaryFunction.cpp @@ -480,6 +480,9 @@ bool BinaryFunction::disassemble(ArrayRef FunctionData) { break; } + // Convert instruction to a shorter version that could be relaxed if needed. + MIA->shortenInstruction(Instruction); + if (MIA->isBranch(Instruction) || MIA->isCall(Instruction)) { uint64_t InstructionTarget = 0; if (MIA->evaluateBranch(Instruction,