RFR: 8373134: C2: Min/Max users of Min/Max uses should be enqueued for GVN [v2]

Benoît Maillard bmaillard at openjdk.org
Thu Jan 8 15:48:21 UTC 2026


On Fri, 19 Dec 2025 08:33:48 GMT, Galder Zamarreño <galder at openjdk.org> wrote:

>> src/hotspot/share/opto/phaseX.cpp line 2609:
>> 
>>> 2607:     for (DUIterator_Fast i2max, i2 = use->fast_outs(i2max); i2 < i2max; i2++) {
>>> 2608:       Node* u = use->fast_out(i2);
>>> 2609:       if (u->Opcode() == use->Opcode()) {
>> 
>> So there are no Min(Max()) or Max(Min()) patterns we need to worry about?  I was expecting this line to be
>> 
>> if (u->is_MinMax()) {
>
> Good question. There could be some patterns but I couldn't think of any when I was working on this, so I limited it to the patterns that I knew for sure required this, e.g. Max(Max()), Min(Min()).

I took a quick look and I didn't find anything obvious.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28895#discussion_r2672883785


More information about the hotspot-compiler-dev mailing list