<div dir="ltr">After some reading and experimentation I found out that a helper function from ValueTracking.h <div><br></div><div><span style="color:rgb(38,38,38);font-size:13px;line-height:16px">GetPointerBaseWithConstantOffset(LI->getPointerOperand(), LIOffs, TD);  gives me the desired output. If you have more info on the query please jump in. Will it work every single time or there are some corner cases. </span><br></div><div><span style="color:rgb(38,38,38);font-size:13px;line-height:16px"><br></span></div><div><span style="color:rgb(38,38,38);font-size:13px;line-height:16px">Thanks! Manish</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 26, 2015 at 4:17 PM, Manish Gupta <span dir="ltr"><<a href="mailto:manishg@cs.ucsd.edu" target="_blank">manishg@cs.ucsd.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Dear All, <div><br></div><div>For a LoadInst that looks like this:</div><div><br></div><div>%23 = load double* getelementptr inbounds ([3 x [3 x double]]* @_ZL2kx, i64 0, i64 1, i64 2), align 8, !tbaa !0<br></div><div><br></div><div>How can I know the pointer element used in LoadInst? For this case "@_ZL2kx"</div><div><br></div><div>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. </div><div><br></div><div>Thanks!</div><span class="HOEnZb"><font color="#888888"><div>Manish</div></font></span></div>
</blockquote></div><br></div>