jmolloy accepted this revision. jmolloy added a comment. This revision is now accepted and ready to land. It's a bit awkward that you need to copy the LastOpt loop from below, but I can't see a simpler way to do this. LGTM. https://reviews.llvm.org/D26858