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

Tobias Hartmann thartmann at openjdk.org
Mon Jan 12 12:22:27 UTC 2026


On Mon, 12 Jan 2026 09:52:47 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()) {
>
> I've been looking at this PR again, having seen the issue in [JDK-8374896](https://bugs.openjdk.org/browse/JDK-8374896), and that scenario is exactly the one @dean-long mentions. I think fixing [JDK-8374896](https://bugs.openjdk.org/browse/JDK-8374896) can be done in the PR for that issue, and the fix is likely the one @dean-long suggests above. Agree @TobiHartmann @dean-long?

Agreed.

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

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


More information about the hotspot-compiler-dev mailing list