RFR: 8373134: C2: Min/Max users of Min/Max uses should be enqueued for GVN [v6]
Galder Zamarreño
galder at openjdk.org
Fri Jan 9 15:59:44 UTC 2026
On Thu, 8 Jan 2026 15:49:55 GMT, Benoît Maillard <bmaillard at openjdk.org> wrote:
>> Galder Zamarreño has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 13 commits:
>>
>> - Merge branch 'master' into topic.uses-min-max
>> - Module also needed in the wrapper test class
>> - It's the templated test that needs the module
>> - Add missing module to test
>> - Merge branch 'master' into topic.uses-min-max
>> - Test Float16
>> - Only apply to uses that match original IR node
>> - Merge branch 'master' into topic.uses-min-max
>> - Use is_MinMax() instead of spelling out individual Min/Max opcodes
>> - Refactor MaxNode to MinMaxNode and add is_MinMax() query
>> - ... and 3 more: https://git.openjdk.org/jdk/compare/067fd3cb...7229e345
>
> src/hotspot/share/opto/phaseX.cpp line 2605:
>
>> 2603: }
>> 2604: }
>> 2605: // Check for max(a, max(b, c)) patterns
>
> Suggestion:
>
> // Check for Max/Min(A, Max/Min(B, C)) where A == B or A == C
>
> Nit: I find it nice when we have the exact same string as in the comment where the optimization actually takes place, so we can just find it with `ctrl+f` easily.
Yeah sure, makes sense. I've integrated the change.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28895#discussion_r2676713054
More information about the hotspot-compiler-dev
mailing list