Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/jdk17u
Path: blob/master/test/hotspot/jtreg/compiler/regalloc/TestGCMRecalcPressureNodes.java
64474 views
1
/*
2
* Copyright (C) 2021 THL A29 Limited, a Tencent company. 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
/**
26
* @test
27
* @bug 8272570
28
* @summary crash in PhaseCFG::global_code_motion
29
* @requires vm.compiler2.enabled
30
*
31
* @run main/othervm -Xbatch TestGCMRecalcPressureNodes
32
*/
33
34
public class TestGCMRecalcPressureNodes {
35
public boolean bo0;
36
public boolean bo1;
37
public void foo() {
38
int sh12 = 61;
39
for (int i = 0; i < 50; i++) {
40
sh12 *= 34;
41
}
42
Math.tan(1.0);
43
bo0 = true;
44
bo1 = true;
45
}
46
public static void main(String[] args) {
47
TestGCMRecalcPressureNodes instance = new TestGCMRecalcPressureNodes();
48
for (int i = 0; i < 50000; i++) {
49
instance.foo();
50
}
51
}
52
}
53
54
55