RFR: 8357816: Add test from JDK-8350576

Marc Chevalier mchevalier at openjdk.org
Thu Jun 12 12:08:28 UTC 2025


On Thu, 12 Jun 2025 09:08:24 GMT, Benoît Maillard <duke at openjdk.org> wrote:

> This PR adds a jtreg test for [JDK-8350576](https://bugs.openjdk.org/browse/JDK-8350576). The test consists of a code sample produced by the fuzzer, and it contains a loop that is supposed to get optimized.
> 
> Thanks!
> 
> ### Testing
> 
> - [x] [GitHub Actions](https://github.com/benoitmaillard/jdk/actions?query=branch%3AJDK-8357816)
> - [ ] tier1
> - [x] Ran the test with a debug build prior to the fix (JDK 25 build 16) and made sure it failed as a sanity check
> 
> Shout out to @TobiHartmann for helping out with jtreg

test/hotspot/jtreg/compiler/loopopts/LoopReductionHasControlOrBadInput.java line 29:

> 27:  * @summary Optimization bails out and hits an assert:
> 28:  *          assert(false) failed: reduction has ctrl or bad vector_input
> 29:  * @run main/othervm -XX:CompileCommand=compileonly,compiler.loopopts.LoopReductionHasControlOrBadInput::* -Xbatch -XX:-TieredCompilation compiler.loopopts.LoopReductionHasControlOrBadInput

Learning from @eme64: You should probably add another `@run` without parameters to catch more things in the future.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25774#discussion_r2142563279


More information about the hotspot-compiler-dev mailing list