Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mobile
Path: blob/master/test/hotspot/jtreg/compiler/loopstripmining/TestLoadOnBackedgeWithPrec.java
41152 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 8264360
27
* @summary Loop strip mining verification fails with "should be on the backedge"
28
*
29
* @run main/othervm -XX:-TieredCompilation -XX:-BackgroundCompilation TestLoadOnBackedgeWithPrec
30
*
31
*/
32
33
34
class a {
35
int g = 20;
36
float h = 2;
37
long b = 6;
38
}
39
40
public class TestLoadOnBackedgeWithPrec {
41
int c ;
42
a[] i = {new a()};
43
float j() {
44
a k = new a();
45
float l = 5;
46
for (int d = 0; d < 8; ++d) {
47
for (int e = 0; e < 9; ++e) {
48
k = k;
49
l *= k.g;
50
}
51
for (int f = 0; f < 9; ++f) {
52
new a();
53
}
54
{
55
a[] m = {
56
new a(), new a(), new a(),
57
new a(), new a(), new a(),
58
new a(), new a(), new a()};
59
c = i[0].g + k.g;
60
}
61
}
62
return k.h;
63
}
64
public static void main(String[] args) {
65
TestLoadOnBackedgeWithPrec n = new TestLoadOnBackedgeWithPrec();
66
for (int i = 0; i < 5_000; i++) {
67
n.j();
68
}
69
}
70
}
71
72
73