<div class="gmail_quote">2009/10/27 Marc Brünink <span dir="ltr"><<a href="mailto:marc@bruenink.de">marc@bruenink.de</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi all,<br>
<br>
I just noticed that LICM does not hoist/sink the following store out of the loop:<br>
<br>
int array[20];<br>
int i;<br>
for (i = 0; i<100; i++) {<br>
array [0] = 0;<br>
}<br>
<br>
The getElementPtr instruction is hoisted out of the loop; the store is not. Did I miss something obvious? Bitcode file attached.<br>
Generated using LLVM 2.5 and<br>
llvm-gcc -c -emit-llvm test_loop.c -o - | opt -licm -o test.bc -f<br></blockquote><div><br></div></div>Thanks for the report. Since this still happens with LLVM at the top of SVN, I filed it as <a href="http://llvm.org/PR5319">http://llvm.org/PR5319</a> . Please add yourself to the cc list there.<br>
<br>Nick Lewycky<br><br>