sanjoy accepted this revision. sanjoy added a comment. This revision is now accepted and ready to land. lgtm Btw, this looks like a good reason to change `accumulateConstantOffset` to return an `Optional<APInt>` of the right bitwidth. https://reviews.llvm.org/D24772