[LLVMdev] Fwd: LLVM IR Branchs
Duncan Sands
baldrick at free.fr
Wed Sep 14 07:30:20 PDT 2011
Hi Rafael,
> Sorry, %3 instead of %4.
>
> 2011/9/14 Rafael Baldiati Parizi <parizi.computacao at gmail.com
> <mailto:parizi.computacao at gmail.com>>
>
> Hello,
> I created a new block for execution to continue, but I got the case in which
> a statement defined in a block is used in another, not dominate all uses.
> For example:
>
> entry:
> %n_addr = alloca i32, align 4
> %retval = alloca i32
> %"alloca point" = bitcast i32 0 to i32
> store i32 %n, i32* %n_addr
> %0 = call i32 (i8*, ...)* @printf(i8* noalias getelementptr inbounds
> ([20 x i8]* @.str, i32 0, i32 0)) nounwind
> %1 = load i32* %n_addr, align 4
> %2 = and i32 %1, 1
> * %3* = icmp eq i32 %2, 0
> .....
> br label %new_block
>
> new_block:
> %4 = call i32 (i8*, ...)* @printf(i8* noalias getelementptr inbounds ([10
> x i8]* @.str1, i32 0, i32 0), i32 *%3*) nounwind
since the entry block dominates all others, there is no problem here. I assume
the real code is more complicated, or the message wasn't about %3.
Ciao, Duncan.
More information about the llvm-dev
mailing list