[PATCH] D38494: [ScalarEvolution] Handling for ICmp occuring in the evolution chain.

Sanjoy Das via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 3 21:24:00 PDT 2017


sanjoy added a comment.

In https://reviews.llvm.org/D38494#887853, @junryoungju wrote:

>   int values[11];
>   int i = 0;
>   do {
>  
>   values[i] = i != 10;
>   } while (i++ != 10);
>
>
> will be removed. from LoopDeletion.
>
>   int values[11];
>   int i = 0;
>   do {
>  
>   values[i] = i != 10;
>   } while (i++ != 10);
>  
>  
>   print(values[10]);
>
>
> will not be even optimized.
>  (this is what I thought)


But LoopDeletion is not the only user of SCEV.  E.g. see https://reviews.llvm.org/rL314266


https://reviews.llvm.org/D38494





More information about the llvm-commits mailing list