spatel added a comment. Assuming we're not too far off from adding IR intrinsics to represent rotate ops (https://reviews.llvm.org/D49242), would transforming to those intrinsics in IR take care of the motivating problem? Repository: rL LLVM https://reviews.llvm.org/D47735