[LLVMdev] the generation of getelementptr instruction

Wenbin Zhang zhangwen at cse.ohio-state.edu
Wed Jul 21 23:35:26 PDT 2010


Hi all,
I'm reading the language reference of LLVM here: http://llvm.org/docs/LangRef.html#i_getelementptr

In the first example, it shows that the generated IR is supposed to be something like:
%reg = getelementptr %ST* %s, i32 1, i32 2, i32 1, i32 5, i32 13
But when I copied the code and compile it myself (using v2.7), I got five getelementptr instructions, which are just like the equivalent code given later in the document. In the case above, why the resulting IRs are different? Thanks a lot.Regards,--Wenbin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100722/e03b22aa/attachment.html>


More information about the llvm-dev mailing list