[LLVMdev] question about licm

songlh songlh at cs.wisc.edu
Tue Feb 10 20:53:41 PST 2015


hi,

   I applied licm with basicaa on the following codes:

   int j = atoi(argc[1]);
   int lower[] = {10, 9, 8, 7, 6, 5, 4, 3, 2, 1};
   int upper[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};

   for(i = lower[j]; a[i] < 100 && i < upper[j]; i ++);

   I notice that upper[j] is not hoisted out from the loop. Is this 
because j could be larger than 10?

   Thanks a lot!

   Best,

                                              Linhai



More information about the llvm-dev mailing list