jmmartinez wrote: Since we have more or less a similar snippet for load/stores and now this one, can you try to move this common transformation to a helper taking a callback ? Otherwise the change seems fine for me. https://github.com/llvm/llvm-project/pull/207830