SjoerdMeijer added a comment. I studied the test cases, which make sense. So this is a nit: I think it would be good if you take the reader by the hand here, and explicitly state why and what corner cases you're testing. https://reviews.llvm.org/D48832