jayfoad wrote: Allowing arbitrary widths for the RHS of G_PTR_ADD makes me very uncomfortable. I would much prefer enforcing that the RHS has the same bitwidth as the index size of the pointer's address space. See also #81473. https://github.com/llvm/llvm-project/pull/84335