[LLVMdev] Basic block with two return instructions
russell.wallace at gmail.com
Fri Feb 5 08:56:29 PST 2010
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?
More information about the llvm-dev