Hello, I would know how can I make a branch in llvm ir without a label of destination? For example: br i1 %1, label %bb, *NO LABEL HERE* * * Thanks! -- *Rafael Parizi* -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110905/5be7271c/attachment.html>
Rafael Baldiati Parizi wrote:> Hello, > I would know how can I make a branch in llvm ir without a label of > destination? > For example: > br i1 %1, label %bb, *NO LABEL HERE*Unlike an assembly "jmp" instruction, there is no fall-through behaviour in LLVM IR. Your choices for a branch are an unconditional branch which specifies one target block, or a conditional branch which specifies a target for true and a target for false. See http://llvm.org/docs/LangRef.html#i_br for details. Nick
On Mon, Sep 5, 2011 at 4:47 PM, Rafael Baldiati Parizi <parizi.computacao at gmail.com> wrote:> Hello, > I would know how can I make a branch in llvm ir without a label of > destination? > For example: > br i1 %1, label %bb, NO LABEL HEREWhat are you trying to do? -Eli
I have two values and I want see if them are equals. Then, I would a instruction like if Value1 != Value2, error without create a new block, continuing the execution in the same block, forcing the LLI to execute this. 2011/9/5 Eli Friedman <eli.friedman at gmail.com>> On Mon, Sep 5, 2011 at 4:47 PM, Rafael Baldiati Parizi > <parizi.computacao at gmail.com> wrote: > > Hello, > > I would know how can I make a branch in llvm ir without a label of > > destination? > > For example: > > br i1 %1, label %bb, NO LABEL HERE > > What are you trying to do? > > -Eli >-- *Rafael Parizi* -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110905/009d2577/attachment.html>