RFR: 8359603: Missed optimization in PhaseIterGVN for redundant ConvX2Y->ConvY2X->ConvX2Y sequences due to missing notification in PhaseIterGVN::add_users_of_use_to_worklist [v3]

Benoît Maillard bmaillard at openjdk.org
Mon Jul 28 12:25:56 UTC 2025


On Wed, 23 Jul 2025 08:49:38 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

>> Benoît Maillard has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8359603: Reduce number of iterations in tests
>
> src/hotspot/share/opto/phaseX.cpp line 2565:
> 
>> 2563:   // ConvF2I->ConvI2F->ConvF2I
>> 2564:   // ConvF2L->ConvL2F->ConvF2L
>> 2565:   // ConvI2F->ConvF2I->ConvI2F
> 
> Another thought: Since this is an incomplete list of variations (especially missing, for example, the I2D version while the I2F version is here), should we leave a comment about not being able to trigger issues with the other versions? Otherwise, it could suggest that it was just forgotten.

The notification issue that is solved here only happens with optimizations that have this chain pattern with three nodes (checking the input of the input) and this is specific to conversions that have a loss of precision. ConvI2D is not here because the `ConvI2D->ConvD2I` gets optimized to a NOP already (`ConvD2INode::Identity`). But there are also chains for which there is a known optimization and for which I was not able to trigger a missed optimization, so it would make sense to have mention this in any case.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26368#discussion_r2236184320


More information about the hotspot-compiler-dev mailing list