[SeparateConstOffsetFromGEP] Rebuild GEP indices at their definition point (#223546)
When a constant offset is split out of a GEP index, the rebuilt index
replaces the original one. Rebuilding the index immediately before the
GEP amounts to sinking the index computation, increasing live ranges and
register pressure. This change attempts to rebuild the index at the
definition point of the original index instead. The same insertion point
is used for the `idxprom` cast created by
`canonicalizeArrayIndicesToIndexSize` too.
GitOrigin-RevId: 2c59a938b358dc5b518e50424423f4a6eff2e8d7
13 files changed