I see you've committed r222991 which checks that alloca dominates the exits. Let's polish this thing first and enable it by default, then we may return to more complicated cases. http://reviews.llvm.org/D6055