[LLVMdev] LoadInst getPointerOperand()

Manish Gupta manishg at cs.ucsd.edu
Tue May 26 16:17:29 PDT 2015


Dear All,

For a LoadInst that looks like this:

%23 = load double* getelementptr inbounds ([3 x [3 x double]]* @_ZL2kx, i64
0, i64 1, i64 2), align 8, !tbaa !0

How can I know the pointer element used in LoadInst? For this case "@_ZL2kx"

I tried using Li->getPointerOperand() and I tried casting the pointer
operator to GEPInst, but it doesn't seem to work. Let me know if you have
any hints on this.

Thanks!
Manish
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150526/e4dd78f7/attachment.html>


More information about the llvm-dev mailing list