diff options
author | 2017-12-21 10:13:35 -0800 | |
---|---|---|
committer | 2018-01-08 13:52:21 -0800 | |
commit | ee74149e9209eabf5928bb0df9a7cf8e194f9677 (patch) | |
tree | 11bd46e585316173f2eb3da25b6a02cf92e07fff | |
parent | 812d4d4091b07c83a340e775325b7f42c8521574 (diff) |
Force JIT on reduction with many variables.
Rationale:
This method exposed a few bugs with SIMDization, so it
is important we make sure this loops is vectorized under JIT.
Bug: 70559970
Test: 623
Change-Id: I1be82f934d9c929ce390c30e278cb86491b5564d
-rw-r--r-- | test/623-checker-loop-regressions/expected.txt | 1 | ||||
-rw-r--r-- | test/623-checker-loop-regressions/src/Main.java | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/test/623-checker-loop-regressions/expected.txt b/test/623-checker-loop-regressions/expected.txt index b0aad4deb5..805857dc65 100644 --- a/test/623-checker-loop-regressions/expected.txt +++ b/test/623-checker-loop-regressions/expected.txt @@ -1 +1,2 @@ +JNI_OnLoad called passed diff --git a/test/623-checker-loop-regressions/src/Main.java b/test/623-checker-loop-regressions/src/Main.java index 29f3817afb..4e2b241fd7 100644 --- a/test/623-checker-loop-regressions/src/Main.java +++ b/test/623-checker-loop-regressions/src/Main.java @@ -19,6 +19,8 @@ */ public class Main { + private static native void ensureJitCompiled(Class<?> cls, String methodName); + /// CHECK-START: int Main.earlyExitFirst(int) loop_optimization (before) /// CHECK-DAG: Phi loop:<<Loop:B\d+>> outer_loop:none /// CHECK-DAG: Phi loop:<<Loop>> outer_loop:none @@ -583,6 +585,8 @@ public class Main { } public static void main(String[] args) { + System.loadLibrary(args[0]); + expectEquals(10, earlyExitFirst(-1)); for (int i = 0; i <= 10; i++) { expectEquals(i, earlyExitFirst(i)); @@ -746,6 +750,9 @@ public class Main { expectEquals(153, doNotMoveSIMD()); + // This test exposed SIMDization issues on x86 and x86_64 + // so we make sure the test runs with JIT enabled. + ensureJitCompiled(Main.class, "reduction32Values"); { int[] a1 = new int[100]; int[] a2 = new int[100]; |