For RISCV branch instructions, we need to preserve relocation types when linker relaxation enabled, so then linker could modify offset when the branch offsets changed.
If we preserve relocation types by define shouldForceRelocation, IsResolved will always false which will make RISCV MC Branch Relaxation always relax 16-bit branches to 32-bit form which is not we really want.
RISCV MC Branch Relaxation is needed because RISCV could perform 32-bit to 16-bit transformation in MC layer.
Can we add test to check that the relocation is actually recorded. same tests you had in https://reviews.llvm.org/D44971 make sense.