This is a prep step for widening induction variables of a nested loop in LoopFlatten if this is posssible, to avoid having to perform certain overflow checks. Since IndVarSimplify may already widen induction variables, we want to run LoopFlatten just before IndVarSimplify. This is a minor reshuffle as both passes were already close after each other.
This is separated out from D88880, which is about making LoopFlatten triggeron 64-bit targets too and is the motivation of this work.
PS. No pipeline pass manager test were changed, because LoopFlatten isn't enabled by default yet.
I think this one would be better put into a new LoopPassManager, LPM3, if flattening is enabled. I think that's how it's meant to work.