author | tpivovarova |
Tue, 12 Jul 2016 18:24:48 +0300 | |
changeset 40059 | c2304140ed64 |
parent 27699 | hotspot/test/compiler/loopopts/6860469/Test.java@9913b19c0948 |
permissions | -rw-r--r-- |
3267
519fbe71f995
6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff
changeset
|
1 |
/* |
3269
86f706946453
6861513: correct copyright attribution in test for 6837094 and 6860469
never
parents:
3267
diff
changeset
|
2 |
* Copyright 2009 Google Inc. All Rights Reserved. |
3267
519fbe71f995
6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
519fbe71f995
6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff
changeset
|
4 |
* |
519fbe71f995
6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
519fbe71f995
6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
519fbe71f995
6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
519fbe71f995
6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff
changeset
|
8 |
* |
519fbe71f995
6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
519fbe71f995
6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
519fbe71f995
6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
519fbe71f995
6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
519fbe71f995
6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff
changeset
|
13 |
* accompanied this code). |
519fbe71f995
6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff
changeset
|
14 |
* |
519fbe71f995
6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
519fbe71f995
6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
519fbe71f995
6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
519fbe71f995
6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff
changeset
|
18 |
* |
5547
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
3269
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
3269
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
3269
diff
changeset
|
21 |
* questions. |
3267
519fbe71f995
6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff
changeset
|
22 |
* |
519fbe71f995
6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff
changeset
|
23 |
*/ |
519fbe71f995
6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff
changeset
|
24 |
|
519fbe71f995
6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff
changeset
|
25 |
/** |
519fbe71f995
6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff
changeset
|
26 |
* @test |
519fbe71f995
6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff
changeset
|
27 |
* @bug 6860469 |
519fbe71f995
6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff
changeset
|
28 |
* @summary remix_address_expressions reshapes address expression with bad control |
519fbe71f995
6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff
changeset
|
29 |
* |
40059 | 30 |
* @run main/othervm -Xcomp |
31 |
* -XX:CompileCommand=compileonly,compiler.loopopts.Test6860469::C |
|
32 |
* compiler.loopopts.Test6860469 |
|
3267
519fbe71f995
6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff
changeset
|
33 |
*/ |
519fbe71f995
6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff
changeset
|
34 |
|
40059 | 35 |
package compiler.loopopts; |
36 |
||
37 |
public class Test6860469 { |
|
3267
519fbe71f995
6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff
changeset
|
38 |
|
40059 | 39 |
private static final int H = 16; |
40 |
private static final int F = 9; |
|
3267
519fbe71f995
6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff
changeset
|
41 |
|
40059 | 42 |
static int[] fl = new int[1 << F]; |
43 |
||
44 |
static int C(int ll, int f) { |
|
45 |
int max = -1; |
|
46 |
int min = H + 1; |
|
3267
519fbe71f995
6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff
changeset
|
47 |
|
40059 | 48 |
if (ll != 0) { |
49 |
if (ll < min) { |
|
50 |
min = ll; |
|
51 |
} |
|
52 |
if (ll > max) { |
|
53 |
max = ll; |
|
54 |
} |
|
55 |
} |
|
3267
519fbe71f995
6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff
changeset
|
56 |
|
40059 | 57 |
if (f > max) { |
58 |
f = max; |
|
59 |
} |
|
60 |
if (min > f) { |
|
61 |
min = f; |
|
62 |
} |
|
63 |
||
64 |
for (int mc = 1 >> max - f; mc <= 0; mc++) { |
|
65 |
int i = mc << (32 - f); |
|
66 |
fl[i] = max; |
|
67 |
} |
|
68 |
||
69 |
return min; |
|
3267
519fbe71f995
6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff
changeset
|
70 |
} |
519fbe71f995
6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff
changeset
|
71 |
|
40059 | 72 |
public static void main(String argv[]) { |
73 |
C(0, 10); |
|
3267
519fbe71f995
6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff
changeset
|
74 |
} |
519fbe71f995
6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff
changeset
|
75 |
} |