ConstantHoist currently only hoists GEPs if there is no notional overindexing. However, I don't see in what way overindexing is supposed to be relevant to this transform. I believe the only part it cares about is that the GEP has constant indices (which is already checked by accumulateConstantOffset).
In the attached test case this makes ConstantHoist apply to the GEP with trailing 10 index, which is nominally out of bounds. (The corresponding store may not even be UB, though even if it were there is no reason why this transform should care.)