RKSimon accepted this revision. RKSimon added a comment. LGTM - I'm keen to see this tested/working for a wider range of x86 (btver2, slm, znver1 etc.) and other targets but this is a good first step. Repository: rL LLVM https://reviews.llvm.org/D44519