RFR: 8369646: Detection of redundant conversion patterns in add_users_of_use_to_worklist is too restrictive [v4]

Benoît Maillard bmaillard at openjdk.org
Tue Nov 4 08:44:17 UTC 2025


On Thu, 30 Oct 2025 12:23:18 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Benoît Maillard has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Add -XX:+StressIGVN to run without fixed seed
>
> src/hotspot/share/opto/phaseX.cpp line 2568:
> 
>> 2566:   // ConvI2F->ConvF2I->ConvI2F
>> 2567:   // Note: there may be other 3-nodes conversion chains that would require to be added here, but these
>> 2568:   // are the only ones that are known to trigger missed optimizations otherwise
> 
> You may want to update the description, and give a bit of extra information. Because you are saying `n` does not have to be a conversion, but it may be that `n` is about to be replaced with a conversion, right?

Yes, in some cases `add_users_of_use_to_worklist` is called with the node about to be replaced as argument `n`. The point is that we might replace `n` with a node that already has other uses, and we only want to notify the uses for which there is a potential change.
But this is in no way specific to this one optimization, so I think adding something here would cause more confusion than anything else. Perhaps we should update the description of `add_users_of_use_to_worklist` then?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27900#discussion_r2489271376


More information about the hotspot-compiler-dev mailing list