mkazantsev added a comment. Looking more into the code, I don't think that loop PRE needs any other legality checks than what we have now. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99926/new/ https://reviews.llvm.org/D99926