[LLVMdev] instruction CE_GEP

Le Anh Quang anhquangbk at googlemail.com
Thu Aug 28 13:38:24 PDT 2008


Hi all, 
 
I have a question with the "getelemptr" instruction.
E.g.: I have some GEP instructions in my program.
Some look like:
 
 <INST_GEP op0=26 op1=64 op2=429/>
.
<INST_GEP op0=341 op1=64 op2=101 op3=499 op4=0/>
 
The first instruction above in assembly file: 
%tmp60 = getelementptr [512 x i32]* @weights, i32 0, i32 %k.3.ph
Ok, we see it all: 
Index of @weights in value list = 26
Index of "i32 0" in value list = 64
Index of "i32 %k.3.ph" in value list = 429
 
But in the second instructions: 
%tmp67.1 = getelementptr [8 x [8 x i32]]* %inter, i32 0, i32 1, i32
%outc.0.reg2mem.0
As the first one, we see:
Index of %inter  in value list = 341
Index of "i32 0" in value list = 64
Index of "i32 1" in value list = 101
Index of "i32 %outc.0.reg2mem.0" in value list = 499
 
==> What is the last one, "op4=0" ? 
And the index of the second instruction in value list is less than 499. 
 
Thanks for any advice.
Quang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080828/157564f1/attachment.html>


More information about the llvm-dev mailing list