[LLVMdev] Generating unusual instruction

Dongrui She sarevokcc at gmail.com
Mon Jan 7 06:29:44 PST 2013


Hi,

Have you try to directly describe such patterns in tblgen file? Like this:
(brcond (i32 (cond_op RC:$rs, RC:$rt)), bb:$offset)

MIPS backend does that. I also do this in my own backend, and seem to be
working fine.


On Mon, Jan 7, 2013 at 11:55 AM, Vikram Singh <vsp1729 at gmail.com> wrote:

> I have seen that most of the targets do comparison and branching
> in two separate instructions e.g. 'cmpl' followed by 'br' in x86 or the
> like.
> LLVM IR is also in same manner.
>
> I want to implement comparison+branching in one instruction like
>
>        beq r1, r2, .label   #if r1==r2 then jump to .label
>
> How to merge two instruction into one.
>
> Regards
> Vikram Singh
>
>
>
> --
> View this message in context:
> http://llvm.1065342.n5.nabble.com/Generating-unusual-instruction-tp53192.html
> Sent from the LLVM - Dev mailing list archive at Nabble.com.
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>



-- 
Regards,
Dongrui
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130107/f8a918e7/attachment.html>


More information about the llvm-dev mailing list