getConstantEvolutionLoopExitValue and ComputeExitCountExhaustively
assumed all phi nodes in the loop header have the same order of incoming
values. This is not correct, and this commit changes
getConstantEvolutionLoopExitValue and ComputeExitCountExhaustively
to lookup the backedge value of a phi node using the loop's latch block.
Unfortunately, there is still some code duplication
getConstantEvolutionLoopExitValue and ComputeExitCountExhaustively.
At some point in the future we should extract out a helper class /
method that can evolve constant evolution phi nodes across iterations.
Fixes 25060. Thanks to Mattias Eriksson for the spot-on analysis!
Depends on D13457.