[LLVMdev] Making a CopyToReg/CopyFromReg into a zext/sext?
Matt Arsenault
Matthew.Arsenault at amd.com
Tue Jan 27 13:37:33 PST 2015
On 01/27/2015 01:23 PM, Ryan Taylor wrote:
> Ok, thanks. Interchangeably makes sense, I'm not quite clear on the
> distinction. If I had a move class and MI for those registers in the
> InstrInfo.td file then it matches the MI based on the register classes
> of input, output. That doesn't help me with sign.
>
> So, can you point me in the general direction of where I should be
> looking to fix this? I thought they had a similar issue with the R600
> trying to copy between different register types and they put in an
> explicit hook in ISelDAGToDAG?
>
> Thanks.
CopyFromReg and CopyToReg aren't the same thing, I just started saying
one instead of the other. I'm not sure what to do without knowing where
/ why the register copy is to a different sized register in the first
place. I would expect that when you are creating such a CopyToReg, you
would have the extension type and then CopyToReg of the extended type.
R600 doesn't have any moves that could be confused with extensions.
There are only 32-bit moves, and adjacent pairs of 32-bit registers can
act as a 64-bit register for some instructions. Extensions are mostly
just copies into a suitable register pair.
More information about the llvm-dev
mailing list