[LLVMdev] [TableGen] How to specify multiple types to one register class.

Lei Mou lei.mou.uu at gmail.com
Thu May 24 08:17:40 PDT 2012


Hi Tom,

Thank you very much! After following your suggestion, the errors are
gone, and the instruction selector works as expected. :-)

Regards,
Lei Mou

> Hi,
>
> Typing RegCRF as [i32, f32] should work.  What type inference error were
> you getting when you tried this?  If a register class can hold more than
> one type, sometimes you need to explicitly tell tablegen what types to
> expect e.g. for your load instruction you might need this pattern:
>
> (set (f32 RegCRF:$d), (load (i32 RegCRF:$a)))
>
> -Tom
>
>> Regards,
>> Lei Mou
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>>
>




More information about the llvm-dev mailing list