[LLVMdev] Branch-like intrinsic
Chris Lattner
sabre at nondot.org
Mon Apr 14 15:11:04 PDT 2008
On Mon, 14 Apr 2008, Edward Lee wrote:
> Is there a way to implement an intrinsic that looks like a conditional
> branch so that it has 2 edges to 2 basic blocks?
No. All control flow operators must be terminator instructions.
> Taking a step back, I'm trying to make a special branch where Passes
> treat it just like a regular conditional branch except that it's
> condition is opaque to everyone, so it isn't removed by optimizations.
> Additionally, the special branch would codegen (to x86) to something
> other than the regular branch instructions.
Why not something like:
%x = llvm.myintrinsic()
br i1 %x, label %T, label %F
?
-Chris
--
http://nondot.org/sabre/
http://llvm.org/
More information about the llvm-dev
mailing list