When a loop has multiple reductions, each with an intermediate invariant
store, the order in which those reductions are processed is not considered.
This can result in the invariant stores outside the loop not preserving the
original order.
This patch sorts VPReductionPHIRecipes by the order in which they have
stores in the original loop before running
InnerLoopVectorizer::fixReduction function, and it helps to maintain
the correct order of stores.
Fixes https://github.com/llvm/llvm-project/issues/64047
Depends on D157630
Is it worth also having a test where you're storing to different pointers, given that they could alias? We should still maintain the order in that case too.