kasuga-fj wrote: If we were permitted to use the GEP source element type in the heuristic, the correct approach would be verifying that the type of the load/store equals `Ty` just before returning from `getIndexExpressionsFromGEP`... https://github.com/llvm/llvm-project/pull/144088