RFR: 8370405: C2: mismatched store from MergeStores wrongly scalarized in allocation elimination [v2]
Emanuel Peter
epeter at openjdk.org
Mon Nov 3 06:58:18 UTC 2025
On Thu, 30 Oct 2025 07:03:51 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:
>> Emanuel Peter has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 16 additional commits since the last revision:
>>
>> - Merge branch 'master' into JDK-8370405-alloc-elimination-and-MergeStores
>> - only verify primitive types
>> - Apply suggestions from code review
>> - more assert adjustment
>> - ignore debug flag
>> - id for tests, and fix up the assert
>> - pass int for short slot
>> - another test
>> - improve test
>> - wip new IR test
>> - ... and 6 more: https://git.openjdk.org/jdk/compare/6dd1ad30...b6e032c2
>
> Regardless, I think this patch makes sense. Bailing out of scalar elimination when we are doing it is better than when we are running EA, and we should generally try to do it if we can.
@merykitty @vnkozlov Thanks for the review and discussion!
@dougxc Thanks for checking for Graal and getting us a quick response :)
And thanks to Olivier Mattmann <[olivier.mattmann at bluewin.ch](mailto:olivier.mattmann at bluewin.ch)> for finding the bug!
@mhaessig I decided to file this RFE, in case someone wants to invest time in it:
[JDK-8371122](https://bugs.openjdk.org/browse/JDK-8371122) C2 Allocation Elimination: handle some mismatched accesses to arrays
-------------
PR Comment: https://git.openjdk.org/jdk/pull/27997#issuecomment-3479146291
More information about the hotspot-compiler-dev
mailing list