On Wed, 12 Nov 2025 22:02:07 GMT, Chen Liang <[email protected]> wrote:

> Use the raw value get as witness, because the flat value get may ignore 
> garbage value and cause infinite loop as a result. Waiting for a test case.

test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestCompareAndExchange.java 
line 98:

> 96:     @Test
> 97:     public Object test70(Object expected, Object x) {
> 98:         return U.compareAndExchangeFlatValue(this, TEST63_VT_OFFSET, 4, 
> SmallValue.class, expected, x);

Aren't existing tests using `compareAndExchangeFlatValue` in 
`test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestIntrinsics.java` 
sufficient? If not, I'd suggest adding your test case there.

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

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/1734#discussion_r2613077745

Reply via email to