[LLVMdev] Error: Type constraint application shouldn't fail!

Llopard Ivan ivanllopard at gmail.com
Fri Dec 2 06:13:55 PST 2011


Hi list,

I'm trying to match a particular pattern into the SDag which looks like 
this:

// non-commutative multiplication
def ncmul            : SDNode<"ISD::MUL"       , SDTIntBinOp,
                         [SDNPAssociative]>;

def mula_pat         : PatFrag<(ops node:$a, node:$b),
                                (add
                                  (ncmul
                                    (sext (i16 (extractelt node:$a, (i32 
0)))),
                                    (sext (i16 (extractelt node:$b, (i32 
1))))
                                  ),
                                  (ncmul
                                    (sext (i16 (extractelt node:$a, (i32 
1)))),
                                    (sext (i16 (extractelt node:$b, (i32 
0))))
                                  )
                                )
 >;

def ADDMULv  : InstSP< (outs IntRegs:$dst), (ins IntRegs:$a, IntRegs:$b),
                    "muladd $a, $b, $dst",
                    [(set (i32 IntRegs:$dst), (mula_pat (v2i16 
IntRegs:$a), (v2i16 IntRegs:$b)))]>;

IntRegs is class with a type list of [i32, v2i16]

But I get the following error when llvm building system try to generate 
the ISelector

llvm[3]: Building Sparc.td DAG instruction selector implementation with 
tblgen
vtInt:     (vt:Other)<<P:Predicate_vtInt>>
Type constraint application shouldn't fail!0  llvm-tblgen 0x081d6de7
1  llvm-tblgen 0x081d6b74
2              0x4001d400 __kernel_sigreturn + 0
3  libc.so.6   0x401b8a82 abort + 386
4  llvm-tblgen 0x0810a4ab
5  llvm-tblgen 0x0810a38f
6  llvm-tblgen 0x0810dd72
7  llvm-tblgen 0x080f8d98
8  llvm-tblgen 0x08176f49
9  llvm-tblgen 0x08184519
10 llvm-tblgen 0x081760e5
11 libc.so.6   0x401a1bd6 __libc_start_main + 230
12 llvm-tblgen 0x0804cb51

Any clue where it may come from ?


Ivan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20111202/3d9cb7c1/attachment.html>


More information about the llvm-dev mailing list