RFR: 8349142: [JMH] compiler.MergeLoadBench.getCharBV fails

Shaojin Wen swen at openjdk.org
Fri Jan 31 15:51:52 UTC 2025


On Fri, 31 Jan 2025 15:26:28 GMT, SendaoYan <syan at openjdk.org> wrote:

> Hi all,
> 
> There are two JMH tests fails after [JDK-8344168](https://bugs.openjdk.org/browse/JDK-8344168) merged. This PR fix the JMH tests fails same as https://github.com/oracle/graal/pull/10602, just cast the second argument of VarHandle.get from long to int.
> Change has been verified locally, test-fix only, no risk.

test/micro/org/openjdk/bench/vm/compiler/MergeLoadBench.java line 320:

> 318:         long sum = 0;
> 319:         for (int i = 0; i < longs.length; i++) {
> 320:             char c = (char) CHAR_B.get(bytes4, (int)(Unsafe.ARRAY_BYTE_BASE_OFFSET + i * 2));

char c = (char) CHAR_B.get(bytes4, i * 2);

it should be changed like this

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23393#discussion_r1937520426


More information about the hotspot-compiler-dev mailing list