diff --git a/compiler/src/org.graalvm.compiler.core.aarch64.test/src/org/graalvm/compiler/core/aarch64/test/AArch64ArrayAddressTest.java b/compiler/src/org.graalvm.compiler.core.aarch64.test/src/org/graalvm/compiler/core/aarch64/test/AArch64ArrayAddressTest.java index 28b9cddca8ce..e65e13454fbc 100644 --- a/compiler/src/org.graalvm.compiler.core.aarch64.test/src/org/graalvm/compiler/core/aarch64/test/AArch64ArrayAddressTest.java +++ b/compiler/src/org.graalvm.compiler.core.aarch64.test/src/org/graalvm/compiler/core/aarch64/test/AArch64ArrayAddressTest.java @@ -25,6 +25,7 @@ */ package org.graalvm.compiler.core.aarch64.test; +import org.graalvm.compiler.api.directives.GraalDirectives; import org.graalvm.compiler.lir.LIRInstruction; import org.graalvm.compiler.lir.aarch64.AArch64ArithmeticOp.ExtendedAddShiftOp; import org.junit.Test; @@ -155,7 +156,7 @@ public void testLoadAndStoreObject() { public static int useArrayInLoop(int[] arr) { int ret = 0; for (int i = 0; i < arr.length; i++) { - ret += arr[i]; + ret += GraalDirectives.opaque(arr[i]); } return ret; }