We saw in JDK-8370405, that MergeStores introduces mismatched stores, and that prevents allocation removal.
As a quick-fix, we could just move process_for_merge_stores_igvn to a later point.
This would allow allocation elimination to have a chance to work. And if it still fails, we can still do MergeStores.
Long-term, we might want to allow allocation elimination to deal with some mismatched stores.
We might also want to refactor MergeStores and the eventual MergeLoads JDK-8345485 not to work with IGVN, and so work even later. But that is more work, and we can do that later.
As a quick-fix, we could just move process_for_merge_stores_igvn to a later point.
This would allow allocation elimination to have a chance to work. And if it still fails, we can still do MergeStores.
Long-term, we might want to allow allocation elimination to deal with some mismatched stores.
We might also want to refactor MergeStores and the eventual MergeLoads JDK-8345485 not to work with IGVN, and so work even later. But that is more work, and we can do that later.
- relates to
 - 
                    
JDK-8371122 C2 Allocation Elimination: handle some mismatched accesses to arrays
-         
     - Open
 
 -