[LLVMdev] Help: Instruction Pattern Matching question
Anton Korobeynikov
anton at korobeynikov.info
Tue Jul 14 01:33:10 PDT 2009
> (outs ptr_rc: $dest), (ins: $ptr_rc:$ptr1, Int32RC:$src)
> "myadd1 $dst, $ptr1, $src1",
> [(set $ptr_rc:$dst,(add $ptr_rc:ptr1, Int32RC:$src))]>;
>
> it is giving me error like impossible to select.
> Could anybody help me resolve this issue. Any example would be highly appreciated.
I assume that both ptr_rc and Int32RC are register classes of type
i32. There are no register classes at isel time => it's not possible
to distinguish operation within 'normal' i32 register class Int32RC
and pointer register class.
That's why tablegen asserts - it's seeing two identically operations.
Surely the second one is impossible to select.
--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University
More information about the llvm-dev
mailing list