RFR: 8351468: C2: array fill optimization assigns wrong type to intrinsic call [v4]

Roberto Castañeda Lozano rcastanedalo at openjdk.org
Mon Mar 24 10:09:37 UTC 2025


On Mon, 24 Mar 2025 09:31:51 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Roberto Castañeda Lozano has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Relax test cases
>
> src/hotspot/share/opto/loopTransform.cpp line 3579:
> 
>> 3577:   if (msg == nullptr && store->as_Mem()->is_mismatched_access()) {
>> 3578:     msg = "mismatched store";
>> 3579:   }
> 
> What effect does this have?
> 
> Ah, it seems to have to do with these comments in your PR:
> `Additionally, the changeset makes it easier to reason about correctness by explicitly disabling the optimization for mismatched stores (where the type of the value to be stored differs from the element type of the destination array). Such stores were not optimized before, but only due to pattern matching limitations.`
> 
> It may be good to leave additional comments in the code here, saying that this is a limitation, and maybe improved in the future. Up to you.

I agree, done in commit c0b3cf96.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/24005#discussion_r2009857132


More information about the hotspot-compiler-dev mailing list