On Thu, 7 May 2026 08:35:51 GMT, Tobias Hartmann <[email protected]> wrote:

> [JDK-8381472](https://bugs.openjdk.org/browse/JDK-8381472) added a new fast 
> path for acmp that emits "unsafe" loads:
> https://github.com/openjdk/valhalla/blob/46dafa35ea274abed90c4c1475fbbff69bb14d6b/src/hotspot/share/opto/parse2.cpp#L2331-L2334
> 
> Although those loads are marked as unsafe themselves, they are still emitted 
> even if `InlineUnsafeOps` is false. The assert in 
> `Compile::flatten_alias_type` needs to be adjusted to account for this. Not 
> adding a regression test because this easily reproduces with an existing test 
> (in higher tiers).
> 
> Thanks,
> Tobias
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

This pull request has now been integrated.

Changeset: 31ee5a82
Author:    Tobias Hartmann <[email protected]>
URL:       
https://git.openjdk.org/valhalla/commit/31ee5a8259aaa0e009f0231c2763cdf614b89316
Stats:     2 lines in 2 files changed: 1 ins; 0 del; 1 mod

8383991: [lworld] C2: assert(InlineUnsafeOps || StressReflectiveCode) failed: 
indeterminate pointers come only from unsafe ops

Reviewed-by: mchevalier

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

PR: https://git.openjdk.org/valhalla/pull/2407

Reply via email to