When the branch target is out of the range represented by the current
branch instruction's immediate, branch relaxation is required. There
are three types of immediate for branch instructions on LoongArch,
including simm16, simm21 and simm26. And the real branch target
address is PC + sext(simmXX << 2). In addition, the indirect branch
way is implemented to support larger branch target.
BranchRelaxation pass calls RenumberBlocks to renumber all of the
machine basic blocks in the function. So the machine basic blocks
number changed in some test cases.
We can directly use MI.getOpcode() here (at least for now).