<div dir="ltr"><div>Hi,</div><div><br></div><div>Have you try to directly describe such patterns in tblgen file? Like this:</div><div>(brcond (i32 (cond_op RC:$rs, RC:$rt)), bb:$offset)</div><div>
<br></div><div>MIPS backend does that. I also do this in my own backend, and seem to be working fine.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jan 7, 2013 at 11:55 AM, Vikram Singh <span dir="ltr"><<a href="mailto:vsp1729@gmail.com" target="_blank">vsp1729@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I have seen that most of the targets do comparison and branching<br>
in two separate instructions e.g. 'cmpl' followed by 'br' in x86 or the<br>
like.<br>
LLVM IR is also in same manner.<br>
<br>
I want to implement comparison+branching in one instruction like<br>
<br>
beq r1, r2, .label #if r1==r2 then jump to .label<br>
<br>
How to merge two instruction into one.<br>
<br>
Regards<br>
Vikram Singh<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://llvm.1065342.n5.nabble.com/Generating-unusual-instruction-tp53192.html" target="_blank">http://llvm.1065342.n5.nabble.com/Generating-unusual-instruction-tp53192.html</a><br>
Sent from the LLVM - Dev mailing list archive at Nabble.com.<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Regards,<div>Dongrui</div>
</div></div>