On Tue, 2 Jun 2026 08:46:43 GMT, Manuel Hässig <[email protected]> wrote:

> C1 has rudimentary conditional expression elimination and graph 
> canonicalization. However, those optimizations on If nodes currently fold 
> substitutability checks to pointer comparisons loosing value object semantics 
> for acmp. This PR fixes this.
> 
> Testing:
>  - [x] tier1,tier2,tier3,valhalla-comp-stress with `--enable-preview`
> 
> A lot of credit for this PR goes to @TobiHartmann who developed the inital 
> fix.
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

That looks good to me, but I'm not familiar with at all C1 so I'd prefer to let 
someone else approve. But I'm convinced by the explanation!

`c1_Optimizer.cpp` needs copyright update.

test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestC1AcmpCEE.java line 26:

> 24: 
> 25: /*
> 26:  * @test

Would a `@bug` make sense here?

test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestC1AcmpCEE.java line 34:

> 32:  *                   -XX:CompileCommand=inline,${test.main.class}::helper*
> 33:  *                   ${test.main.class}
> 34:  * @run main/othervm ${test.main.class}

Do we need main/othervm when there are no more flags?

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

PR Review: 
https://git.openjdk.org/valhalla/pull/2500#pullrequestreview-4408508116
PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2500#discussion_r3340229750
PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2500#discussion_r3340227257

Reply via email to