[PATCH] D74937: [AMDGPU] Implement copyPhysReg for 16 bit subregs

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 20 17:23:24 PST 2020


arsenm added a comment.

In D74937#1885675 <https://reviews.llvm.org/D74937#1885675>, @rampitec wrote:

> In D74937#1885659 <https://reviews.llvm.org/D74937#1885659>, @arsenm wrote:
>
> > I don't think copies of these should ever be produced (at leasts for the high half) since the high half is not really addressable, and only appears that way to some instructions. Where are copies coming from?
>
>
> First, hi16 registers are used by load_hi instructions, that is their destination. And then RA can happily copy anything to anything. For sanity we need to know how to copy any register.


The high result isn't what's encoded though, so they really are writing the 32-bit register. They only read the low 16-bits. I think the correct way to model this is a 32-bit write but only a 16-bit read


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

https://reviews.llvm.org/D74937





More information about the llvm-commits mailing list