Skip to content

Commit a933f43

Browse files
author
duke
committedMay 16, 2024
Automatic merge of jdk:master into master
2 parents fa2d046 + ab8d7b0 commit a933f43

File tree

6 files changed

+539
-26
lines changed

6 files changed

+539
-26
lines changed
 

‎src/hotspot/share/opto/castnode.cpp

+3-16
Original file line numberDiff line numberDiff line change
@@ -213,13 +213,7 @@ const Type* CastIINode::Value(PhaseGVN* phase) const {
213213

214214
// Similar to ConvI2LNode::Value() for the same reasons
215215
// see if we can remove type assertion after loop opts
216-
// But here we have to pay extra attention:
217-
// Do not narrow the type of range check dependent CastIINodes to
218-
// avoid corruption of the graph if a CastII is replaced by TOP but
219-
// the corresponding range check is not removed.
220-
if (!_range_check_dependency) {
221-
res = widen_type(phase, res, T_INT);
222-
}
216+
res = widen_type(phase, res, T_INT);
223217

224218
return res;
225219
}
@@ -239,11 +233,11 @@ Node *CastIINode::Ideal(PhaseGVN *phase, bool can_reshape) {
239233
if (progress != nullptr) {
240234
return progress;
241235
}
242-
if (can_reshape && !_range_check_dependency && !phase->C->post_loop_opts_phase()) {
236+
if (can_reshape && !phase->C->post_loop_opts_phase()) {
243237
// makes sure we run ::Value to potentially remove type assertion after loop opts
244238
phase->C->record_for_post_loop_opts_igvn(this);
245239
}
246-
if (!_range_check_dependency) {
240+
if (!_type->is_int()->empty()) {
247241
return optimize_integer_cast(phase, T_INT);
248242
}
249243
return nullptr;
@@ -254,13 +248,6 @@ Node* CastIINode::Identity(PhaseGVN* phase) {
254248
if (progress != this) {
255249
return progress;
256250
}
257-
if (_range_check_dependency) {
258-
if (phase->C->post_loop_opts_phase()) {
259-
return this->in(1);
260-
} else {
261-
phase->C->record_for_post_loop_opts_igvn(this);
262-
}
263-
}
264251
return this;
265252
}
266253

‎src/hotspot/share/opto/compile.cpp

+40-10
Original file line numberDiff line numberDiff line change
@@ -3464,6 +3464,10 @@ void Compile::final_graph_reshaping_main_switch(Node* n, Final_Reshape_Counts& f
34643464
}
34653465
break;
34663466
}
3467+
case Op_CastII: {
3468+
remove_range_check_cast(n->as_CastII());
3469+
}
3470+
break;
34673471
#ifdef _LP64
34683472
case Op_CmpP:
34693473
// Do this transformation here to preserve CmpPNode::sub() and
@@ -3615,16 +3619,6 @@ void Compile::final_graph_reshaping_main_switch(Node* n, Final_Reshape_Counts& f
36153619

36163620
#endif
36173621

3618-
#ifdef ASSERT
3619-
case Op_CastII:
3620-
// Verify that all range check dependent CastII nodes were removed.
3621-
if (n->isa_CastII()->has_range_check()) {
3622-
n->dump(3);
3623-
assert(false, "Range check dependent CastII node was not removed");
3624-
}
3625-
break;
3626-
#endif
3627-
36283622
case Op_ModI:
36293623
if (UseDivMod) {
36303624
// Check if a%b and a/b both exist
@@ -3633,6 +3627,8 @@ void Compile::final_graph_reshaping_main_switch(Node* n, Final_Reshape_Counts& f
36333627
// Replace them with a fused divmod if supported
36343628
if (Matcher::has_match_rule(Op_DivModI)) {
36353629
DivModINode* divmod = DivModINode::make(n);
3630+
divmod->add_prec_from(n);
3631+
divmod->add_prec_from(d);
36363632
d->subsume_by(divmod->div_proj(), this);
36373633
n->subsume_by(divmod->mod_proj(), this);
36383634
} else {
@@ -3653,6 +3649,8 @@ void Compile::final_graph_reshaping_main_switch(Node* n, Final_Reshape_Counts& f
36533649
// Replace them with a fused divmod if supported
36543650
if (Matcher::has_match_rule(Op_DivModL)) {
36553651
DivModLNode* divmod = DivModLNode::make(n);
3652+
divmod->add_prec_from(n);
3653+
divmod->add_prec_from(d);
36563654
d->subsume_by(divmod->div_proj(), this);
36573655
n->subsume_by(divmod->mod_proj(), this);
36583656
} else {
@@ -3673,6 +3671,8 @@ void Compile::final_graph_reshaping_main_switch(Node* n, Final_Reshape_Counts& f
36733671
// Replace them with a fused unsigned divmod if supported
36743672
if (Matcher::has_match_rule(Op_UDivModI)) {
36753673
UDivModINode* divmod = UDivModINode::make(n);
3674+
divmod->add_prec_from(n);
3675+
divmod->add_prec_from(d);
36763676
d->subsume_by(divmod->div_proj(), this);
36773677
n->subsume_by(divmod->mod_proj(), this);
36783678
} else {
@@ -3693,6 +3693,8 @@ void Compile::final_graph_reshaping_main_switch(Node* n, Final_Reshape_Counts& f
36933693
// Replace them with a fused unsigned divmod if supported
36943694
if (Matcher::has_match_rule(Op_UDivModL)) {
36953695
UDivModLNode* divmod = UDivModLNode::make(n);
3696+
divmod->add_prec_from(n);
3697+
divmod->add_prec_from(d);
36963698
d->subsume_by(divmod->div_proj(), this);
36973699
n->subsume_by(divmod->mod_proj(), this);
36983700
} else {
@@ -3894,6 +3896,34 @@ void Compile::final_graph_reshaping_main_switch(Node* n, Final_Reshape_Counts& f
38943896
}
38953897
}
38963898

3899+
void Compile::remove_range_check_cast(CastIINode* cast) {
3900+
if (cast->has_range_check()) {
3901+
// Range check CastII nodes feed into an address computation subgraph. Remove them to let that subgraph float freely.
3902+
// For memory access or integer divisions nodes that depend on the cast, record the dependency on the cast's control
3903+
// as a precedence edge, so they can't float above the cast in case that cast's narrowed type helped eliminate a
3904+
// range check or a null divisor check.
3905+
assert(cast->in(0) != nullptr, "All RangeCheck CastII must have a control dependency");
3906+
ResourceMark rm;
3907+
Unique_Node_List wq;
3908+
wq.push(cast);
3909+
for (uint next = 0; next < wq.size(); ++next) {
3910+
Node* m = wq.at(next);
3911+
for (DUIterator_Fast imax, i = m->fast_outs(imax); i < imax; i++) {
3912+
Node* use = m->fast_out(i);
3913+
if (use->is_Mem() || use->is_div_or_mod(T_INT) || use->is_div_or_mod(T_LONG)) {
3914+
use->ensure_control_or_add_prec(cast->in(0));
3915+
} else if (!use->is_CFG() && !use->is_Phi()) {
3916+
wq.push(use);
3917+
}
3918+
}
3919+
}
3920+
cast->subsume_by(cast->in(1), this);
3921+
if (cast->outcnt() == 0) {
3922+
cast->disconnect_inputs(this);
3923+
}
3924+
}
3925+
}
3926+
38973927
//------------------------------final_graph_reshaping_walk---------------------
38983928
// Replacing Opaque nodes with their input in final_graph_reshaping_impl(),
38993929
// requires that the walk visits a node's inputs before visiting the node.

‎src/hotspot/share/opto/compile.hpp

+3
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ class Block;
5353
class Bundle;
5454
class CallGenerator;
5555
class CallStaticJavaNode;
56+
class CastIINode;
5657
class CloneMap;
5758
class CompilationFailureInfo;
5859
class ConnectionGraph;
@@ -1314,6 +1315,8 @@ class Compile : public Phase {
13141315
BasicType out_bt, BasicType in_bt);
13151316

13161317
static Node* narrow_value(BasicType bt, Node* value, const Type* type, PhaseGVN* phase, bool transform_res);
1318+
1319+
void remove_range_check_cast(CastIINode* cast);
13171320
};
13181321

13191322
#endif // SHARE_OPTO_COMPILE_HPP

‎src/hotspot/share/opto/node.cpp

+12
Original file line numberDiff line numberDiff line change
@@ -2878,6 +2878,15 @@ void Node::ensure_control_or_add_prec(Node* c) {
28782878
}
28792879
}
28802880

2881+
void Node::add_prec_from(Node* n) {
2882+
for (uint i = n->req(); i < n->len(); i++) {
2883+
Node* prec = n->in(i);
2884+
if (prec != nullptr) {
2885+
add_prec(prec);
2886+
}
2887+
}
2888+
}
2889+
28812890
bool Node::is_dead_loop_safe() const {
28822891
if (is_Phi()) {
28832892
return true;
@@ -2901,6 +2910,9 @@ bool Node::is_dead_loop_safe() const {
29012910
return false;
29022911
}
29032912

2913+
bool Node::is_div_or_mod(BasicType bt) const { return Opcode() == Op_Div(bt) || Opcode() == Op_Mod(bt) ||
2914+
Opcode() == Op_UDiv(bt) || Opcode() == Op_UMod(bt); }
2915+
29042916
//=============================================================================
29052917
//------------------------------yank-------------------------------------------
29062918
// Find and remove

‎src/hotspot/share/opto/node.hpp

+7
Original file line numberDiff line numberDiff line change
@@ -1143,6 +1143,7 @@ class Node {
11431143

11441144
// Set control or add control as precedence edge
11451145
void ensure_control_or_add_prec(Node* c);
1146+
void add_prec_from(Node* n);
11461147

11471148
// Visit boundary uses of the node and apply a callback function for each.
11481149
// Recursively traverse uses, stopping and applying the callback when
@@ -1254,6 +1255,8 @@ class Node {
12541255
// Whether this is a memory phi node
12551256
bool is_memory_phi() const { return is_Phi() && bottom_type() == Type::MEMORY; }
12561257

1258+
bool is_div_or_mod(BasicType bt) const;
1259+
12571260
//----------------- Printing, etc
12581261
#ifndef PRODUCT
12591262
public:
@@ -2023,6 +2026,10 @@ Op_IL(URShift)
20232026
Op_IL(LShift)
20242027
Op_IL(Xor)
20252028
Op_IL(Cmp)
2029+
Op_IL(Div)
2030+
Op_IL(Mod)
2031+
Op_IL(UDiv)
2032+
Op_IL(UMod)
20262033

20272034
inline int Op_ConIL(BasicType bt) {
20282035
assert(bt == T_INT || bt == T_LONG, "only for int or longs");
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,474 @@
1+
/*
2+
* Copyright (c) 2024, 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 8324517
27+
* @summary C2: out of bound array load because of dependency on removed range check CastIIs
28+
*
29+
* @run main/othervm -XX:-TieredCompilation -XX:-UseOnStackReplacement -XX:-BackgroundCompilation
30+
* -XX:CompileCommand=dontinline,TestArrayAccessAboveRCAfterRCCastIIEliminated::notInlined
31+
* TestArrayAccessAboveRCAfterRCCastIIEliminated
32+
* @run main/othervm -XX:-TieredCompilation -XX:-UseOnStackReplacement -XX:-BackgroundCompilation
33+
* -XX:CompileCommand=dontinline,TestArrayAccessAboveRCAfterRCCastIIEliminated::notInlined
34+
* -XX:+UnlockDiagnosticVMOptions -XX:+StressGCM TestArrayAccessAboveRCAfterRCCastIIEliminated
35+
* @run main/othervm TestArrayAccessAboveRCAfterRCCastIIEliminated
36+
* @run main/othervm -XX:CompileCommand=dontinline,TestArrayAccessAboveRCAfterRCCastIIEliminated::notInlined
37+
* TestArrayAccessAboveRCAfterRCCastIIEliminated
38+
*
39+
*/
40+
41+
public class TestArrayAccessAboveRCAfterRCCastIIEliminated {
42+
private static int intField;
43+
private static long longField;
44+
private static volatile int volatileField;
45+
46+
public static void main(String[] args) {
47+
int[] array = new int[100];
48+
for (int i = 0; i < 20_000; i++) {
49+
test1(9, 10, 1, true);
50+
test1(9, 10, 1, false);
51+
test2(9, 10, 1, true);
52+
test2(9, 10, 1, false);
53+
test3(9, 10, 1, true);
54+
test3(9, 10, 1, false);
55+
test4(9, 10, 1, true);
56+
test4(9, 10, 1, false);
57+
test5(9, 10, 1, true);
58+
test5(9, 10, 1, false);
59+
test6(9, 10, 1, true);
60+
test6(9, 10, 1, false);
61+
test7(9, 10, 1, true);
62+
test7(9, 10, 1, false);
63+
test8(9, 10, 1, true);
64+
test8(9, 10, 1, false);
65+
test9(9, 10, 1, true);
66+
test9(9, 10, 1, false);
67+
test10(9, 10, 1, true);
68+
test10(9, 10, 1, false);
69+
test11(9, 10, 1, true);
70+
test11(9, 10, 1, false);
71+
test12(9, 10, 1, true);
72+
test12(9, 10, 1, false);
73+
test13(9, 10, 1, true);
74+
test13(9, 10, 1, false);
75+
}
76+
try {
77+
test1(-1, 10, 1, true);
78+
} catch (ArrayIndexOutOfBoundsException arrayIndexOutOfBoundsException) {
79+
}
80+
try {
81+
test2(-1, 10, 1, true);
82+
} catch (ArrayIndexOutOfBoundsException arrayIndexOutOfBoundsException) {
83+
}
84+
try {
85+
test3(-1, 10, 1, true);
86+
} catch (ArrayIndexOutOfBoundsException arrayIndexOutOfBoundsException) {
87+
}
88+
try {
89+
test4(-1, 10, 1, true);
90+
} catch (ArrayIndexOutOfBoundsException arrayIndexOutOfBoundsException) {
91+
}
92+
try {
93+
test5(-1, 10, 1, true);
94+
} catch (ArrayIndexOutOfBoundsException arrayIndexOutOfBoundsException) {
95+
}
96+
try {
97+
test6(-1, 10, 1, true);
98+
} catch (ArrayIndexOutOfBoundsException arrayIndexOutOfBoundsException) {
99+
}
100+
try {
101+
test7(-1, 10, 1, true);
102+
} catch (ArrayIndexOutOfBoundsException arrayIndexOutOfBoundsException) {
103+
}
104+
try {
105+
test8(-1, 10, 1, true);
106+
} catch (ArrayIndexOutOfBoundsException arrayIndexOutOfBoundsException) {
107+
}
108+
try {
109+
test9(-1, 10, 1, true);
110+
} catch (ArrayIndexOutOfBoundsException arrayIndexOutOfBoundsException) {
111+
}
112+
try {
113+
test10(-1, 10, 1, true);
114+
} catch (ArrayIndexOutOfBoundsException arrayIndexOutOfBoundsException) {
115+
}
116+
try {
117+
test11(-1, 10, 1, true);
118+
} catch (ArrayIndexOutOfBoundsException arrayIndexOutOfBoundsException) {
119+
}
120+
try {
121+
test12(-1, 10, 1, true);
122+
} catch (ArrayIndexOutOfBoundsException arrayIndexOutOfBoundsException) {
123+
}
124+
try {
125+
test13(-1, 10, 1, true);
126+
} catch (ArrayIndexOutOfBoundsException arrayIndexOutOfBoundsException) {
127+
}
128+
}
129+
130+
private static void test1(int i, int j, int flag, boolean flag2) {
131+
i = Math.min(i, 9);
132+
int[] array = new int[10];
133+
notInlined(array);
134+
if (flag == 0) {
135+
}
136+
if (flag2) {
137+
float[] newArray = new float[j];
138+
newArray[i] = 42;
139+
float[] otherArray = new float[i];
140+
if (flag == 0) {
141+
}
142+
intField = array[otherArray.length];
143+
} else {
144+
float[] newArray = new float[j];
145+
newArray[i] = 42;
146+
float[] otherArray = new float[i];
147+
if (flag == 0) {
148+
}
149+
intField = array[otherArray.length];
150+
}
151+
for (int k = 0; k < 10; k++) {
152+
153+
}
154+
}
155+
156+
private static void test2(int i, int j, int flag, boolean flag2) {
157+
i = Math.min(i, 9);
158+
int[] array = new int[10];
159+
notInlined(array);
160+
if (flag == 0) {
161+
}
162+
if (flag2) {
163+
float[] newArray = new float[j];
164+
newArray[i] = 42;
165+
float[] otherArray = new float[i];
166+
if (flag == 0) {
167+
}
168+
intField = 1 / (otherArray.length + 1);
169+
} else {
170+
float[] newArray = new float[j];
171+
newArray[i] = 42;
172+
float[] otherArray = new float[i];
173+
if (flag == 0) {
174+
}
175+
intField = 1 / (otherArray.length + 1);
176+
}
177+
for (int k = 0; k < 10; k++) {
178+
179+
}
180+
}
181+
182+
private static void test3(int i, int j, int flag, boolean flag2) {
183+
i = Math.min(i, 9);
184+
int[] array = new int[10];
185+
notInlined(array);
186+
if (flag == 0) {
187+
}
188+
if (flag2) {
189+
float[] newArray = new float[j];
190+
newArray[i] = 42;
191+
float[] otherArray = new float[i];
192+
if (flag == 0) {
193+
}
194+
longField = 1L / (otherArray.length + 1);
195+
} else {
196+
float[] newArray = new float[j];
197+
newArray[i] = 42;
198+
float[] otherArray = new float[i];
199+
if (flag == 0) {
200+
}
201+
longField = 1L / (otherArray.length + 1);
202+
}
203+
for (int k = 0; k < 10; k++) {
204+
205+
}
206+
}
207+
208+
private static void test4(int i, int j, int flag, boolean flag2) {
209+
i = Math.min(i, 9);
210+
int[] array = new int[10];
211+
notInlined(array);
212+
if (flag == 0) {
213+
}
214+
if (flag2) {
215+
float[] newArray = new float[j];
216+
newArray[i] = 42;
217+
float[] otherArray = new float[i];
218+
if (flag == 0) {
219+
}
220+
intField = 1 % (otherArray.length + 1);
221+
} else {
222+
float[] newArray = new float[j];
223+
newArray[i] = 42;
224+
float[] otherArray = new float[i];
225+
if (flag == 0) {
226+
}
227+
intField = 1 % (otherArray.length + 1);
228+
}
229+
for (int k = 0; k < 10; k++) {
230+
231+
}
232+
}
233+
234+
private static void test5(int i, int j, int flag, boolean flag2) {
235+
i = Math.min(i, 9);
236+
int[] array = new int[10];
237+
notInlined(array);
238+
if (flag == 0) {
239+
}
240+
if (flag2) {
241+
float[] newArray = new float[j];
242+
newArray[i] = 42;
243+
float[] otherArray = new float[i];
244+
if (flag == 0) {
245+
}
246+
longField = 1L % (otherArray.length + 1);
247+
} else {
248+
float[] newArray = new float[j];
249+
newArray[i] = 42;
250+
float[] otherArray = new float[i];
251+
if (flag == 0) {
252+
}
253+
longField = 1L % (otherArray.length + 1);
254+
}
255+
for (int k = 0; k < 10; k++) {
256+
257+
}
258+
}
259+
260+
private static void test6(int i, int j, int flag, boolean flag2) {
261+
i = Math.min(i, 9);
262+
int[] array = new int[10];
263+
notInlined(array);
264+
if (flag == 0) {
265+
}
266+
if (flag2) {
267+
float[] newArray = new float[j];
268+
newArray[i] = 42;
269+
float[] otherArray = new float[i];
270+
if (flag == 0) {
271+
}
272+
intField = 1 % (otherArray.length + 1) + 1 / (otherArray.length + 1);
273+
} else {
274+
float[] newArray = new float[j];
275+
newArray[i] = 42;
276+
float[] otherArray = new float[i];
277+
if (flag == 0) {
278+
}
279+
intField = 1 % (otherArray.length + 1) + 1 / (otherArray.length + 1);
280+
}
281+
for (int k = 0; k < 10; k++) {
282+
283+
}
284+
}
285+
286+
private static void test7(int i, int j, int flag, boolean flag2) {
287+
i = Math.min(i, 9);
288+
int[] array = new int[10];
289+
notInlined(array);
290+
if (flag == 0) {
291+
}
292+
if (flag2) {
293+
float[] newArray = new float[j];
294+
newArray[i] = 42;
295+
float[] otherArray = new float[i];
296+
if (flag == 0) {
297+
}
298+
longField = 1L % (otherArray.length + 1) + 1L / (otherArray.length + 1);
299+
} else {
300+
float[] newArray = new float[j];
301+
newArray[i] = 42;
302+
float[] otherArray = new float[i];
303+
if (flag == 0) {
304+
}
305+
longField = 1L % (otherArray.length + 1) + 1L / (otherArray.length + 1);
306+
}
307+
for (int k = 0; k < 10; k++) {
308+
309+
}
310+
}
311+
private static void test8(int i, int j, int flag, boolean flag2) {
312+
i = Math.min(i, 9);
313+
int[] array = new int[10];
314+
notInlined(array);
315+
if (flag == 0) {
316+
}
317+
if (flag2) {
318+
float[] newArray = new float[j];
319+
newArray[i] = 42;
320+
float[] otherArray = new float[i];
321+
if (flag == 0) {
322+
}
323+
intField = Integer.divideUnsigned(1, (otherArray.length + 1));
324+
} else {
325+
float[] newArray = new float[j];
326+
newArray[i] = 42;
327+
float[] otherArray = new float[i];
328+
if (flag == 0) {
329+
}
330+
intField = Integer.divideUnsigned(1, (otherArray.length + 1));
331+
}
332+
for (int k = 0; k < 10; k++) {
333+
334+
}
335+
}
336+
337+
private static void test9(int i, int j, int flag, boolean flag2) {
338+
i = Math.min(i, 9);
339+
int[] array = new int[10];
340+
notInlined(array);
341+
if (flag == 0) {
342+
}
343+
if (flag2) {
344+
float[] newArray = new float[j];
345+
newArray[i] = 42;
346+
float[] otherArray = new float[i];
347+
if (flag == 0) {
348+
}
349+
longField = Long.divideUnsigned(1L, (otherArray.length + 1));
350+
} else {
351+
float[] newArray = new float[j];
352+
newArray[i] = 42;
353+
float[] otherArray = new float[i];
354+
if (flag == 0) {
355+
}
356+
longField = Long.divideUnsigned(1L, (otherArray.length + 1));
357+
}
358+
for (int k = 0; k < 10; k++) {
359+
360+
}
361+
}
362+
363+
private static void test10(int i, int j, int flag, boolean flag2) {
364+
i = Math.min(i, 9);
365+
int[] array = new int[10];
366+
notInlined(array);
367+
if (flag == 0) {
368+
}
369+
if (flag2) {
370+
float[] newArray = new float[j];
371+
newArray[i] = 42;
372+
float[] otherArray = new float[i];
373+
if (flag == 0) {
374+
}
375+
intField = Integer.remainderUnsigned(1, (otherArray.length + 1));
376+
} else {
377+
float[] newArray = new float[j];
378+
newArray[i] = 42;
379+
float[] otherArray = new float[i];
380+
if (flag == 0) {
381+
}
382+
intField = Integer.remainderUnsigned(1, (otherArray.length + 1));
383+
}
384+
for (int k = 0; k < 10; k++) {
385+
386+
}
387+
}
388+
389+
private static void test11(int i, int j, int flag, boolean flag2) {
390+
i = Math.min(i, 9);
391+
int[] array = new int[10];
392+
notInlined(array);
393+
if (flag == 0) {
394+
}
395+
if (flag2) {
396+
float[] newArray = new float[j];
397+
newArray[i] = 42;
398+
float[] otherArray = new float[i];
399+
if (flag == 0) {
400+
}
401+
longField = Long.remainderUnsigned(1L, (otherArray.length + 1));
402+
} else {
403+
float[] newArray = new float[j];
404+
newArray[i] = 42;
405+
float[] otherArray = new float[i];
406+
if (flag == 0) {
407+
}
408+
longField = Long.remainderUnsigned(1L, (otherArray.length + 1));
409+
}
410+
for (int k = 0; k < 10; k++) {
411+
412+
}
413+
}
414+
415+
private static void test12(int i, int j, int flag, boolean flag2) {
416+
i = Math.min(i, 9);
417+
int[] array = new int[10];
418+
notInlined(array);
419+
if (flag == 0) {
420+
}
421+
if (flag2) {
422+
float[] newArray = new float[j];
423+
newArray[i] = 42;
424+
float[] otherArray = new float[i];
425+
if (flag == 0) {
426+
}
427+
intField = Integer.divideUnsigned(1, (otherArray.length + 1)) +
428+
Integer.remainderUnsigned(1, (otherArray.length + 1));
429+
} else {
430+
float[] newArray = new float[j];
431+
newArray[i] = 42;
432+
float[] otherArray = new float[i];
433+
if (flag == 0) {
434+
}
435+
intField = Integer.divideUnsigned(1, (otherArray.length + 1)) +
436+
Integer.remainderUnsigned(1, (otherArray.length + 1));
437+
}
438+
for (int k = 0; k < 10; k++) {
439+
440+
}
441+
}
442+
443+
private static void test13(int i, int j, int flag, boolean flag2) {
444+
i = Math.min(i, 9);
445+
int[] array = new int[10];
446+
notInlined(array);
447+
if (flag == 0) {
448+
}
449+
if (flag2) {
450+
float[] newArray = new float[j];
451+
newArray[i] = 42;
452+
float[] otherArray = new float[i];
453+
if (flag == 0) {
454+
}
455+
longField = Long.remainderUnsigned(1L, (otherArray.length + 1)) +
456+
Long.divideUnsigned(1L, (otherArray.length + 1));
457+
} else {
458+
float[] newArray = new float[j];
459+
newArray[i] = 42;
460+
float[] otherArray = new float[i];
461+
if (flag == 0) {
462+
}
463+
longField = Long.remainderUnsigned(1L, (otherArray.length + 1)) +
464+
Long.divideUnsigned(1L, (otherArray.length + 1));
465+
}
466+
for (int k = 0; k < 10; k++) {
467+
468+
}
469+
}
470+
471+
private static void notInlined(int[] array) {
472+
473+
}
474+
}

0 commit comments

Comments
 (0)
Please sign in to comment.