eli.friedman added a comment. Looking a bit more, I think the infinite loop isn't possible because of the way instcombine works with PHI nodes and the reachable code restriction. Sorry about the false alarm. http://reviews.llvm.org/D21190