annotate test/compiler/6860469/Test.java @ 850:fd50a67f97d1

6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post Reviewed-by: never, kvn Contributed-by: yamauchi@google.com, rasbold@google.com
author never
date Wed, 15 Jul 2009 13:37:35 -0700
parents
children 84770322b304
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
850
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
1 /*
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
2 * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
fd50a67f97d1 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.
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
4 *
fd50a67f97d1 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
fd50a67f97d1 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
fd50a67f97d1 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.
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
8 *
fd50a67f97d1 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
fd50a67f97d1 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
fd50a67f97d1 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
fd50a67f97d1 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
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
13 * accompanied this code).
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
14 *
fd50a67f97d1 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
fd50a67f97d1 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,
fd50a67f97d1 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.
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
18 *
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
20 * CA 95054 USA or visit www.sun.com if you need additional information or
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
21 * have any questions.
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
22 *
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
23 */
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
24
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
25 /**
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
26 * @test
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
27 * @bug 6860469
fd50a67f97d1 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
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
29 *
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
30 * @run main/othervm -Xcomp -XX:CompileOnly=Test.C Test
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
31 */
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
32
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
33 public class Test {
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
34
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
35 private static final int H = 16;
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
36 private static final int F = 9;
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
37
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
38 static int[] fl = new int[1 << F];
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
39
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
40 static int C(int ll, int f) {
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
41 int max = -1;
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
42 int min = H + 1;
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
43
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
44 if (ll != 0) {
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
45 if (ll < min) {
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
46 min = ll;
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
47 }
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
48 if (ll > max) {
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
49 max = ll;
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
50 }
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
51 }
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
52
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
53 if (f > max) {
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
54 f = max;
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
55 }
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
56 if (min > f) {
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
57 min = f;
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
58 }
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
59
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
60 for (int mc = 1 >> max - f; mc <= 0; mc++) {
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
61 int i = mc << (32 - f);
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
62 fl[i] = max;
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
63 }
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
64
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
65 return min;
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
66 }
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
67
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
68 public static void main(String argv[]) {
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
69 C(0, 10);
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
70 }
fd50a67f97d1 6860469: remix_address_expressions sets incorrect control causing crash in split_if_with_block_post
never
parents:
diff changeset
71 }