Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mobile
Path: blob/master/test/hotspot/jtreg/compiler/regalloc/VolatileLoadMemBarsOnlyUses.java
41149 views
1
/*
2
* Copyright (c) 2018, 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 8210389
27
* @summary C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
28
*
29
* @run main/othervm -Xcomp -XX:CompileOnly=VolatileLoadMemBarsOnlyUses VolatileLoadMemBarsOnlyUses
30
*
31
*/
32
33
public class VolatileLoadMemBarsOnlyUses {
34
35
public static final int N = 400;
36
public static long instanceCount=-94L;
37
public static volatile byte byFld=-108;
38
39
public int mainTest(String[] strArr1) {
40
41
int i17=9, i19=1, i20=63, i21=-32916, i22=0, iArr[]=new int[N];
42
boolean b1=false;
43
double d3=76.18241;
44
45
for (int i : iArr) {
46
for (i17 = 2; i17 < 63; i17++) {
47
if (b1) break;
48
byFld += (byte)(0.131F + (i17 * i17));
49
}
50
for (i19 = 1; 63 > i19; ++i19) {
51
for (i21 = 1; i21 < 2; i21++) {
52
d3 = i22;
53
if (b1) continue;
54
i20 = i21;
55
}
56
d3 -= byFld;
57
instanceCount = 46725L;
58
}
59
switch ((((i22 >>> 1) % 4) * 5) + 91) {
60
case 98:
61
break;
62
case 110:
63
break;
64
case 105:
65
break;
66
case 103:
67
break;
68
default:
69
}
70
}
71
72
return i20;
73
}
74
public static void main(String[] strArr) {
75
VolatileLoadMemBarsOnlyUses _instance = new VolatileLoadMemBarsOnlyUses();
76
for (int i = 0; i < 10; i++ ) {
77
_instance.mainTest(strArr);
78
}
79
}
80
}
81
82