@jdoerfert, looks you are right, our patches are similar. But seems that your patch will not work when edge splitting is called from GVN, as currently LoopInfo analysis for GVN is not turned on. Is it so? http://reviews.llvm.org/D5539