Mercurial > hg > truffle
annotate test/compiler/6901572/Test.java @ 7353:b5280041f59e
Experiment with soft alignment for branch targets.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Sun, 13 Jan 2013 19:32:16 +0100 |
parents | c18cbe5936b8 |
children |
rev | line source |
---|---|
1083
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
1 /* |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1083
diff
changeset
|
2 * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. |
1083
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
4 * |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
8 * |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
13 * accompanied this code). |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
14 * |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
18 * |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1083
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1083
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1083
diff
changeset
|
21 * questions. |
1083
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
22 */ |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
23 |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
24 /** |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
25 * @test |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
26 * @bug 6901572 |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
27 * @summary JVM 1.6.16 crash on loops: assert(has_node(i),"") |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
28 * |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
29 * @run main/othervm Test |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
30 */ |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
31 |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
32 |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
33 public class Test { |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
34 |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
35 public static void main(String[] args) { |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
36 for (int i = 0; i < 2; i++) |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
37 NestedLoop(); |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
38 } |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
39 |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
40 public static long NestedLoop() { |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
41 final int n = 50; |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
42 long startTime = System.currentTimeMillis(); |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
43 int x = 0; |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
44 for(int a = 0; a < n; a++) |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
45 for(int b = 0; b < n; b++) |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
46 for(int c = 0; c < n; c++) |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
47 for(int d = 0; d < n; d++) |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
48 for(int e = 0; e < n; e++) |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
49 for(int f = 0; f < n; f++) |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
50 x++; |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
51 long stopTime = System.currentTimeMillis(); |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
52 |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
53 return stopTime - startTime; |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
54 } |
8b22f86d1740
6901572: JVM 1.6.16 crash on loops: assert(has_node(i),"")
cfang
parents:
diff
changeset
|
55 } |