[LLVMdev] TableGen Type Inference

Eli Friedman eli.friedman at gmail.com
Fri Jun 5 18:42:16 PDT 2009


On Fri, Jun 5, 2009 at 4:04 PM, David Greene<dag at cray.com> wrote:
> On Friday 05 June 2009 17:41, Dan Gohman wrote:
>> How is bc_memopv4i32 defined?  The bitconvert in the tablegen
>> output is marked isInt, which means it's the node that didn't get
>> inferred.
>
> def bc_memopv4i32 : PatFrag<(ops node:$ptr), (bitconvert
>                                             (memopv4i32 node:$ptr))>;

That would explain it: it isn't clever enough to deduce the type of
the bitconvert, so you'll have to write something like the following:

[(set VR128:$dst, (v4f32 (sint_to_fp (v4i32 (bc_memopv4i32 addr:$src)))))]

-Eli




More information about the llvm-dev mailing list