<div dir="ltr">Ok, thank you. I have also one question about getelementptr. In different versions of clang I see that sometimes array[i][i] is preceded by two getelementptr instructions and sometimes only by one - with an already complex index.<br></div><div class="gmail_extra"><br><div class="gmail_quote">2017-09-01 12:50 GMT+02:00 David Chisnall <span dir="ltr"><<a href="mailto:David.Chisnall@cl.cam.ac.uk" target="_blank">David.Chisnall@cl.cam.ac.uk</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 1 Sep 2017, at 11:44, Anastasiya Ruzhanskaya via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br>
><br>
> Hello,<br>
> I wonder if the getelementptr can have other successors than load, store in some other cases when I directly print or directly return the result. every time I would like to assign the result - it will have a load/store successor?<br>
> So, basically the overall question is to clarify the possible successors of getelementptr.<br>
<br>
</div></div>Any instruction that may take a pointer operand might be a user of a GEP. For example, consider this C function:<br>
<br>
int x(struct S *s)<br>
{<br>
y(&s->field);<br>
}<br>
<br>
Here, there will be a GEP to get the address of the field and then the user will be a call (or possibly invoke) instruction.<br>
<span class="HOEnZb"><font color="#888888"><br>
David<br>
<br>
</font></span></blockquote></div><br></div>