[LLVMdev] GetElementPtrInst question

Eduardo erocha.ssa at gmail.com
Sun Dec 2 07:37:00 PST 2012


Hi all,

How can I create an llvm::GetElementPtrInst in which the pointer and
the index are in registers previously loaded with llvm::LoadInst ? I
mean, the generated instruction will be like this:

  %1 = getelementptr i8* %myreg1, i32 %myreg2

here, %myreg1 and %myreg2 are previously created by load instructions
(llvm::LoadInst).

Please, let me know if there is an example of something similar.

Thanks for the help,
Eduardo



More information about the llvm-dev mailing list