[PATCH] D143345: [RFC][RISCV] Don't disassemble `addi`s with relocations as `mv`s

Luís Marques via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 15 15:55:51 PST 2023


luismarques added a comment.

In D143345#4130539 <https://reviews.llvm.org/D143345#4130539>, @luismarques wrote:

> I'm not sure I understand your second question, though (it's late here...). I assume it's more than just a curiosity and it has some relation to this patch but it's not clear to me what the implication is. Yes, without `-r` the disassemblies can be a bit puzzling at times, and you need to anticipate that some 0 immediates are misleading, and they won't actually be zero in the final binary. You have the same problem with `mv`s, just exacerbated because then you have to think that they aren't even true `mv` instructions at all. Is your point that when you do use `-r` it should be clear that the `mv`s aren't actually moves and the `addi`s aren't actually zero? Apologies if I'm being dense.

I assume it's the latter. It's true that with `-r` the spurious `mv`s are less of a problem, though I think it's still something to be avoided if we can.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143345/new/

https://reviews.llvm.org/D143345



More information about the llvm-commits mailing list