[LoopInterchange] Replace exit conditions of interchanged loops with counters
In the transformation phase of LoopInterchange, the exit condition of
the inner loop is reused by cloning the instructions involved in it and
moving them into a new BB. Handling all PHI nodes correctly in this way
is difficult, and it has caused several bugs.
Instead, this patch introduces a new way to control the interchanged
loops: add a new variable that works just as a loop counter, and compute
the exit condition from it and the original BTC. The induction variables
that were used only to compute the original exit conditions are deleted.
This makes the logic simpler, since the computation of the original exit
condition no longer needs to be moved.
Part of #235496
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>