[LLVMdev] Basic block with two return instructions
kennethuil at gmail.com
Fri Feb 5 08:58:58 PST 2010
On Fri, Feb 5, 2010 at 10:56 AM, Russell Wallace
<russell.wallace at gmail.com> wrote:
> When I generate a simple function with a single basic block with two
> return instructions, I had expected that if it did anything at all, it
> would use the first one, but it actually seems to ignore the first one
> and take the value of the second one.
> I'm guessing what's going on here is something like "a basic block
> must end in exactly one terminator instruction, having two of them is
> undefined behavior and the code generator is entitled to do anything
> including make demons fly out of your nose"; is this correct?
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
That's pretty much been my experience. Usually, something crashes
when I try it though.
More information about the llvm-dev