author | phh |
Sat, 30 Nov 2019 14:33:05 -0800 | |
changeset 59330 | 5b96c12f909d |
parent 52092 | 4cffba2df537 |
permissions | -rw-r--r-- |
52092
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
1 |
/* |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
2 |
* Copyright (c) 2018, Red Hat, Inc. All rights reserved. |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
4 |
* |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
8 |
* |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
13 |
* accompanied this code). |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
14 |
* |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
18 |
* |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
21 |
* questions. |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
22 |
*/ |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
23 |
|
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
24 |
/** |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
25 |
* @test |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
26 |
* @bug 8210389 |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
27 |
* @summary C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
28 |
* |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
29 |
* @run main/othervm -Xcomp -XX:CompileOnly=VolatileLoadMemBarsOnlyUses VolatileLoadMemBarsOnlyUses |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
30 |
* |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
31 |
*/ |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
32 |
|
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
33 |
public class VolatileLoadMemBarsOnlyUses { |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
34 |
|
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
35 |
public static final int N = 400; |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
36 |
public static long instanceCount=-94L; |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
37 |
public static volatile byte byFld=-108; |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
38 |
|
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
39 |
public int mainTest(String[] strArr1) { |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
40 |
|
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
41 |
int i17=9, i19=1, i20=63, i21=-32916, i22=0, iArr[]=new int[N]; |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
42 |
boolean b1=false; |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
43 |
double d3=76.18241; |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
44 |
|
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
45 |
for (int i : iArr) { |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
46 |
for (i17 = 2; i17 < 63; i17++) { |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
47 |
if (b1) break; |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
48 |
byFld += (byte)(0.131F + (i17 * i17)); |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
49 |
} |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
50 |
for (i19 = 1; 63 > i19; ++i19) { |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
51 |
for (i21 = 1; i21 < 2; i21++) { |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
52 |
d3 = i22; |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
53 |
if (b1) continue; |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
54 |
i20 = i21; |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
55 |
} |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
56 |
d3 -= byFld; |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
57 |
instanceCount = 46725L; |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
58 |
} |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
59 |
switch ((((i22 >>> 1) % 4) * 5) + 91) { |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
60 |
case 98: |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
61 |
break; |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
62 |
case 110: |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
63 |
break; |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
64 |
case 105: |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
65 |
break; |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
66 |
case 103: |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
67 |
break; |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
68 |
default: |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
69 |
} |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
70 |
} |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
71 |
|
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
72 |
return i20; |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
73 |
} |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
74 |
public static void main(String[] strArr) { |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
75 |
VolatileLoadMemBarsOnlyUses _instance = new VolatileLoadMemBarsOnlyUses(); |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
76 |
for (int i = 0; i < 10; i++ ) { |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
77 |
_instance.mainTest(strArr); |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
78 |
} |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
79 |
} |
4cffba2df537
8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc
roland
parents:
diff
changeset
|
80 |
} |