[lworld] RFR: 8367518: TestRedundantLea.java fails in Valhalla

Christian Hagedorn chagedorn at openjdk.org
Mon Sep 22 11:48:37 UTC 2025


On Mon, 22 Sep 2025 10:52:07 GMT, Manuel Hässig <mhaessig at openjdk.org> wrote:

> After merging `TestRedundantLea.java` into valhalla it turned out that the `StringInflate` and `StoreN*` subtests fail. This PR fixes that by bringing over two commits from mainline that fix problems with this test, which already fixes `StringInflate`.
> 
> The problem with the `StoreN` cases is that with valhalla C2 does not generate spills that the peephole can remove. To still test removing spills I came up with a new test case specifically for spills.
> 
> Testing:
>  - [x] tier1,tier2 plus some stress testing

Looks good, thanks for fixing this and adding an additional test case!

test/hotspot/jtreg/compiler/codegen/TestRedundantLea.java line 369:

> 367: 
> 368:     @Test
> 369:     // TODO: Make tests more precise

I guess that was already there for mainline but I'm wondering, is there a tracking issue for that?

test/hotspot/jtreg/compiler/codegen/TestRedundantLea.java line 383:

> 381:     @IR(counts = {IRNode.MEM_TO_REG_SPILL_COPY, ">=20"},
> 382:         phase = {CompilePhase.FINAL_CODE},
> 383:         applyIf ={"OptoPeephole", "false"})

Suggestion:

        applyIf = {"OptoPeephole", "false"})

test/hotspot/jtreg/compiler/codegen/TestRedundantLea.java line 386:

> 384:     @IR(counts = {IRNode.MEM_TO_REG_SPILL_COPY, ">=18"},
> 385:         phase = {CompilePhase.FINAL_CODE},
> 386:         applyIf ={"OptoPeephole", "true"})

Suggestion:

        applyIf = {"OptoPeephole", "true"})

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

Marked as reviewed by chagedorn (Committer).

PR Review: https://git.openjdk.org/valhalla/pull/1605#pullrequestreview-3252158074
PR Review Comment: https://git.openjdk.org/valhalla/pull/1605#discussion_r2367875967
PR Review Comment: https://git.openjdk.org/valhalla/pull/1605#discussion_r2367879273
PR Review Comment: https://git.openjdk.org/valhalla/pull/1605#discussion_r2367878921


More information about the valhalla-dev mailing list