eugenis added a comment. Could you elaborate on why this is necessary? It looks like the code generated in scanTypeCheckedLoadUsers could be just as well generated by the frontend. I must be missing something. This pass runs before LowerBitSets, right? http://reviews.llvm.org/D21121