[LLVMdev] LICM

Marc Brünink marc at bruenink.de
Tue Oct 27 05:31:18 PDT 2009


Hi all,

I just noticed that LICM does not hoist/sink the following store out of 
the loop:

         int array[20];
         int i;
         for (i = 0; i<100; i++) {
                 array [0] = 0;
         }

The getElementPtr instruction is hoisted out of the loop; the store is 
not. Did I miss something obvious? Bitcode file attached.
Generated using LLVM 2.5 and
llvm-gcc -c -emit-llvm test_loop.c  -o - | opt  -licm -o test.bc -f

Thanks
Marc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.bc
Type: application/octet-stream
Size: 624 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20091027/c0ceeabf/attachment.obj>


More information about the llvm-dev mailing list