TableGen Type Inference

Can someone explain why TableGen can't figure this out?

VCVTDQ2PS128rm: (set:isVoid VR128:v4f32:$dst, (sint_to_fp:v4f32
(bitconvert:isInt (ld:v4i32 addr:iPTR:$src)<<P:Predicate_memop>>)))
llvm/tblgen: In VCVTDQ2PS128rm: Could not infer all types in pattern!

The pattern as written looks like this:

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

I'm trying to unify AVX/SSE converts in a reasonable way. Right now,
X86InstrSSE.td doesn't have patterns for sint_to_fp and fp_to_sint
with memory operands. I guess this is why, but I don't understand
why it's illegal.

                                 -Dave

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.

Dan

def bc_memopv4i32 : PatFrag<(ops node:$ptr), (bitconvert
                                             (memopv4i32 node:$ptr))>;

                              -Dave

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