jfb added a comment. I cleaned up the code, it passes all the tests and does what I wanted to achieve for the one Chrome usecase. @qcolombet would you mind taking another look? http://reviews.llvm.org/D15157