rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. LGTM This looks like a strict improvement on what we did before, even though it doesn't perfectly handle all of Hubert's testcases. http://reviews.llvm.org/D8308