Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mobile
Path: blob/master/test/hotspot/jtreg/compiler/longcountedloops/TestDeadLongPhi.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 8263189
27
* @summary C2: assert(!had_error) failed: bad dominance
28
*
29
* @run main/othervm -Xcomp -XX:-TieredCompilation -XX:CompileOnly=TestDeadLongPhi TestDeadLongPhi
30
*
31
*/
32
33
public class TestDeadLongPhi {
34
static int N = 400;
35
static long instanceCount;
36
37
public static void main(String[] strArr) {
38
for (int i = 0; i < 10 ; i++) {
39
mainTest();
40
}
41
}
42
43
static void mainTest() {
44
vMeth();
45
}
46
47
static void vMeth() {
48
int i17 = 89, i18, i19 = 44, i20 = 2, iArr3[] = new int[N];
49
long l2, lArr[] = new long[N];
50
byte by = 22;
51
init(iArr3, 131);
52
for (i18 = 2; i18 < 350; ++i18) {
53
i17 /= 8;
54
for (l2 = 5; l2 > i18; l2 -= 2) {
55
switch ((i18 % 3)) {
56
case 8:
57
iArr3[i18] |= i17;
58
break;
59
case 9:
60
i20 += (((l2) + by) - i19);
61
i19 += instanceCount;
62
case 10:
63
}
64
}
65
}
66
}
67
68
public static void init(int[] a, int seed) {
69
for (int j = 0; j < a.length; j++) {
70
a[j] = (j % 2 == 0) ? seed + j : seed - j;
71
}
72
}
73
74
}
75
76
77