Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mobile
Path: blob/master/test/hotspot/jtreg/compiler/loopopts/TestLostDependencyOnZeroTripGuard.java
41149 views
1
/*
2
* Copyright (c) 2021, Red Hat, Inc. All rights reserved.
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
*
5
* This code is free software; you can redistribute it and/or modify it
6
* under the terms of the GNU General Public License version 2 only, as
7
* published by the Free Software Foundation.
8
*
9
* This code is distributed in the hope that it will be useful, but WITHOUT
10
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12
* version 2 for more details (a copy is included in the LICENSE file that
13
* accompanied this code).
14
*
15
* You should have received a copy of the GNU General Public License version
16
* 2 along with this work; if not, write to the Free Software Foundation,
17
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18
*
19
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20
* or visit www.oracle.com if you need additional information or have any
21
* questions.
22
*/
23
24
/**
25
* @test
26
* @bug 8263971
27
* @summary C2 crashes with SIGFPE with -XX:+StressGCM and -XX:+StressIGVN
28
*
29
* @run main/othervm -Xcomp -XX:-TieredCompilation -XX:CompileOnly=TestLostDependencyOnZeroTripGuard -XX:+UnlockDiagnosticVMOptions
30
* -XX:+IgnoreUnrecognizedVMOptions -XX:+StressGCM -XX:StressSeed=886771365 TestLostDependencyOnZeroTripGuard
31
* @run main/othervm -Xcomp -XX:-TieredCompilation -XX:CompileOnly=TestLostDependencyOnZeroTripGuard -XX:+UnlockDiagnosticVMOptions
32
* -XX:+IgnoreUnrecognizedVMOptions -XX:+StressGCM TestLostDependencyOnZeroTripGuard
33
*
34
*/
35
36
public class TestLostDependencyOnZeroTripGuard {
37
38
public static final int N = 400;
39
40
public int iArrFld[]=new int[N];
41
42
public void mainTest(String[] strArr1) {
43
44
int i=57657, i1=577, i2=6, i3=157, i4=12, i23=61271;
45
boolean bArr[]=new boolean[N];
46
47
for (i = 9; 379 > i; i++) {
48
i2 = 1;
49
do {
50
i1 <<= i3;
51
} while (++i2 < 68);
52
for (i23 = 68; i23 > 3; i23--) {
53
bArr[i23 + 1] = true;
54
try {
55
i1 = (-42360 / i23);
56
iArrFld[i + 1] = (i4 % 15384);
57
} catch (ArithmeticException a_e) {}
58
}
59
}
60
}
61
62
public static void main(String[] strArr) {
63
TestLostDependencyOnZeroTripGuard _instance = new TestLostDependencyOnZeroTripGuard();
64
for (int i = 0; i < 10; i++ ) {
65
_instance.mainTest(strArr);
66
}
67
}
68
}
69
70