[lworld] RFR: 8372697: [lworld] compiler/c2/irTests/scalarReplacement/ScalarReplacementWithGCBarrierTests.java fails with --enable-preview

Tobias Hartmann thartmann at openjdk.org
Tue Dec 2 09:31:32 UTC 2025


On Tue, 2 Dec 2025 09:20:57 GMT, Marc Chevalier <mchevalier at openjdk.org> wrote:

>> Right, adding it to every test doesn't feel like the way to go! I'm not too fussed about it, it was just a suggestion, feel free to disregard ;)
>
> I think it might not be doable indeed.
> 
> There is still the question of `"enable-valhalla", "true"` or `"enable-preview", "true"`. While the first version was to do an `enable-preview` (up to the difficulties of testing it...), after discussion with @TobiHartmann, `enable-valhalla` had upsides, which I fear I don't remember.
> 
> If we change the name to `enable-preview`, the way we check it might be... confusing, but fine for now. Also, the current solution makes it easier to update tests in the future when Valhalla won't be preview anymore.

I think `enable-valhalla` is good for now. `PreviewFeatures.isEnabled()` can not be used from within the IR framework and `enable-preview` is not really what we are checking (we are checking if boxing classes were migrated, which is Valhalla specific). We can still rename the flag if needed later.

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

PR Review Comment: https://git.openjdk.org/valhalla/pull/1767#discussion_r2580357275


More information about the valhalla-dev mailing list