hotspot/test/compiler/6823453/Test.java
author herrick
Mon, 06 Jul 2009 17:12:40 -0400
changeset 3039 d5c363be4605
parent 2528 feeff04a3129
child 3915 3f5b3b2e223d
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2528
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
     1
/*
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
     2
 * Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
     4
 *
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
     7
 * published by the Free Software Foundation.
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
     8
 *
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    13
 * accompanied this code).
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    14
 *
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    18
 *
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    19
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    20
 * CA 95054 USA or visit www.sun.com if you need additional information or
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    21
 * have any questions.
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    22
 *
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    23
 */
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    24
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    25
/*
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    26
 * @test
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    27
 * @bug 6823453
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    28
 * @summary DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    29
 * @run main/othervm -Xcomp -XX:CompileOnly=Test -XX:+DeoptimizeALot Test
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    30
 */
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    31
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    32
public class Test {
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    33
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    34
   static long vara_1 = 1L;
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    35
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    36
   static void testa() {
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    37
      short var_2 = (byte) 1.0E10;
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    38
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    39
      for ( Object temp = new byte[(byte)1.0E10];  true ;
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    40
            var_2 = "1".equals("0") ? ((byte) vara_1) : 1 ) {}
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    41
   }
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    42
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    43
   static void testb() {
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    44
      long var_1 = -1L;
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    45
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    46
      short var_2 = (byte) 1.0E10;
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    47
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    48
      for ( Object temp = new byte[(byte)1.0E10];  true ;
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    49
            var_2 = "1".equals("0") ? ((byte) var_1) : 1 ) {}
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    50
   }
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    51
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    52
   static void testc() {
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    53
      long var_1 = -1L;
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    54
      if (vara_1 > 0)  var_1 = 1L;
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    55
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    56
      int var_2 = (byte)var_1 - 128;
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    57
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    58
      for ( Object temp = new byte[var_2];  true ;
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    59
            var_2 = "1".equals("0") ? 2 : 1 ) {}
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    60
   }
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    61
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    62
   static void testd() {
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    63
      long var_1 = 0L;
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    64
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    65
      int var_2 = (byte)var_1 + 1;
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    66
      for (int i=0; i<2 ; i++)  var_2 = var_2 - 1;
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    67
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    68
      for ( Object temp = new byte[var_2];  true ;
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    69
            var_2 = "1".equals("0") ? 2 : 1 ) {}
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    70
   }
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    71
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    72
   public static void main(String[] args) throws Exception {
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    73
      int nex = 0;
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    74
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    75
      try {
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    76
         testa();
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    77
      }
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    78
      catch (java.lang.NegativeArraySizeException ex) { nex++; }
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    79
      try {
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    80
         testb();
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    81
      }
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    82
      catch (java.lang.NegativeArraySizeException ex) { nex++; }
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    83
      try {
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    84
         testc();
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    85
      }
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    86
      catch (java.lang.NegativeArraySizeException ex) { nex++; }
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    87
      try {
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    88
         testd();
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    89
      }
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    90
      catch (java.lang.NegativeArraySizeException ex) { nex++; }
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    91
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    92
      if (nex != 4)
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    93
        System.exit(97);
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    94
   }
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    95
}
feeff04a3129 6823453: DeoptimizeALot causes fastdebug server jvm to fail with assert(false,"unscheduable graph")
kvn
parents:
diff changeset
    96