diff --git a/test/hotspot/jtreg/compiler/c1/TestLoadIndexedMismatch.java b/test/hotspot/jtreg/compiler/c1/TestLoadIndexedMismatch.java index d16b6b0c684..2f983692f38 100644 --- a/test/hotspot/jtreg/compiler/c1/TestLoadIndexedMismatch.java +++ b/test/hotspot/jtreg/compiler/c1/TestLoadIndexedMismatch.java @@ -42,8 +42,8 @@ public class TestLoadIndexedMismatch { public static char work() { // LoadIndexed (B) byte b = ARR[0]; - // StringUTF16.charAt intrinsic, LoadIndexed (C) - char c = Helper.charAt(ARR, 0); + // StringUTF16.getChar intrinsic, LoadIndexed (C) + char c = Helper.getChar(ARR, 0); return c; } diff --git a/test/hotspot/jtreg/compiler/patches/java.base/java/lang/Helper.java b/test/hotspot/jtreg/compiler/patches/java.base/java/lang/Helper.java index 6d8b5be79bf..49cb89b6f7f 100644 --- a/test/hotspot/jtreg/compiler/patches/java.base/java/lang/Helper.java +++ b/test/hotspot/jtreg/compiler/patches/java.base/java/lang/Helper.java @@ -77,6 +77,11 @@ public class Helper { return dst; } + @jdk.internal.vm.annotation.ForceInline + public static char getChar(byte[] value, int index) { + return StringUTF16.getChar(value, index); + } + public static void putCharSB(byte[] val, int index, int c) { StringUTF16.putCharSB(val, index, c); }