ivanbaev added a comment. Note that the code for BB DSE stays the same, it is just indented two spaces to the right. The new code begins at: // DSE across BB else if (InstDep.isNonLocal()) { ... and it includes helper FindUncondPredsIncludingSimpleLoops(). http://reviews.llvm.org/D13363