[PATCH] D21720: Unroll for uncountable loops
    Evgeny Stupachenko via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Mar  9 18:20:04 PST 2017
    
    
  
evstupac added a comment.
> In any case, there is definitely a more-general case we can handle here, but it is the following: there needs to either be a cycle PHI, or a use of an otherwise-unused instruction variable that repeats in a fixed pattern, such that unrolling the loop by the length of that pattern allows us to eliminate the PHI. i&C and i%C have that property. Is there anything else?
"i/C" could also be optimized when "i" starts from "k*C". However we'll need to lower it (replace with new IV) in later optimizations (for example LSR).
What about cases 1. and 2. ?
Repository:
  rL LLVM
https://reviews.llvm.org/D21720
    
    
More information about the llvm-commits
mailing list