mkazantsev abandoned this revision. mkazantsev added a comment. Abandoning due to underlying code massive rework done in https://reviews.llvm.org/rL324195. The bug was fixed with this patch. The tests merged separately as NFC. https://reviews.llvm.org/D41939