bkramer added a comment. I went a slightly different route in https://reviews.llvm.org/rL323383, but this would've worked too. The layering between CodeGen and TableGen is messy, we'll have to clean that up eventually :( Repository: rL LLVM https://reviews.llvm.org/D42507