dberlin added a comment. Just to note, on the thread about this, Nuno said: "I just read the tests and they look good. I'll review the algorithm changes in the next few days, but feel free to commit the patch in the meantime." https://reviews.llvm.org/D29606