nikic added a comment. I think it would make more sense to add support for this to APInt. These operations are well-defined and supported in IR, so APInt should support them as well. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74621/new/ https://reviews.llvm.org/D74621