Skip to content

Commit

Permalink
Use opaque in AArch64ArrayAddressTest.useArrayIntLoop to prevent furt…
Browse files Browse the repository at this point in the history
…her optimization
  • Loading branch information
Stefan Anzinger committed Jan 7, 2020
1 parent 641cfa5 commit cf39369
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit cf39369

Please sign in to comment.