[LLVMdev] Problem selecting the correct registers for a calling convention

Tim Northover
Tue, 27 Nov 2012 15:50:38 -0000

Hi Job,

> This issue is basically that I cannot find a way to distinguish two i16
> arguments from one i32. Is there a way to do this in LLVM? Preferably using
> tablegen, of course:-)

I think the property you want is "isSplit" (or, from the TableGen side
CCIfSplit).

This gets applied to the first of those i16s that are produced.
Unfortunately I can't think of much you can do from TableGen to swap
the registers around (CCIfSplit is useful if the i32 would have to
start at an even-numbered register, for example). But in the C++
ISelLowering code you can use that flag to deal with the two registers
together in a sane way.

Tim.