<div dir="ltr">Unfortunately since in this example function arguments are array of pointers, __restrict doesn't help.<div>Yes, using 2 stores into same location is intentional. <br><br><div class="gmail_quote">On Mon, Oct 11, 2010 at 12:20 PM, Duncan Sands <span dir="ltr"><<a href="mailto:baldrick@free.fr">baldrick@free.fr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi Artiom,<br>
<div class="im"><br>
> I have following C code:<br>
><br>
>     void factorial(float **a, float **b)<br>
>     {<br>
>        b[2][2] = a[0][2];<br>
>        b[2][2] = a[0][1];<br>
>     }<br>
</div>...<br>
<div class="im">> Assuming that a and b arrays contains pointers that are not aliased,<br>
> is it possible to remove the first store by using some C or LLVM IR specific<br>
> declarations?<br>
<br>
</div>try this:<br>
<br>
void factorial(float ** __restrict a, float ** __restrict b)<br>
<div class="im">{<br>
   b[2][2] = a[0][2];<br>
   b[2][2] = a[0][1];<br>
}<br>
<br>
</div>Ciao,<br>
<br>
Duncan.<br>
<br>
PS: Did you mean to use b[2][2] in both lines?<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Artiom<br>
</div></div>