mzolotukhin added a comment. Hi Evgeny, Why functionality from `lib/Analysis/LoopUnrollAnalyzer.cpp` isn't enough for your case? It should be able to predict that phis would be removed after unrolling (possibly along with other instructions). Michael Repository: rL LLVM https://reviews.llvm.org/D21720