[PATCH] D92479: [RISCV] remove instruction mv a0, a0

luxufan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 3 22:30:43 PST 2020


StephenFan added a comment.

In D92479#2428454 <https://reviews.llvm.org/D92479#2428454>, @jrtc27 wrote:

> It's also wrong if the ADDI has FrameReg as its destination. A neater approach might be to always use the destination register (if there is one, using general instruction query information) as the destination for the ADD, keeping the scratch register for the movImm call. Then you'd only need special logic to work out whether you need to keep the (modified) existing instruction.

I agree that it is wrong if the ADDI has FrameReg as its destination. And I adapted your suggestion.


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

https://reviews.llvm.org/D92479



More information about the llvm-commits mailing list