A RISC-V mv rd, rs instruction is an alias/pseudoinstruction for addi rd, rs, 0.
When disassembling object files we'll commonly encounter many (arguably) spurious mvs: addis with unresolved relocations. The immediate operand isn't actually zero, though that is obscured by the relocation, so IMO it shouldn't be disassembled as a mv. I'd argue that even if such a relocation happens to resolve to zero it's still semantically not a mv, but that is a minor point.
This patch tries to address that situation by detecting when those addis have relocations and not printing them as mvs.
Please let me know if you agree with (1) my reasoning and (2) the overall approach of this patch.
If there is a rough agreement I'll further improve the patch, including optimizing the search for the relocations and not introducing a separate printInst method.
Do we have an llvm::find_if that uses ranges?