yinma added a comment. Changing finding better chain algorithm may hide the problem fixed by this patch, but for our test case, changing the FindBetterChain algorithm doesn't help. http://reviews.llvm.org/D18336