test/hotspot/jtreg/compiler/c2/aarch64/ConvI2LWideningAssertTooStrong.java
author adinn
Fri, 29 Nov 2019 15:37:13 +0000
changeset 59326 851a389fc54d
parent 58102 b2a4b22f8cf2
permissions -rw-r--r--
8232828: AArch64: compiler/c2/aarch64/TestVolatilesG1.java fails after JDK-8225776 Reviewed-by: aph
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
58102
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
     1
/*
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
     2
 * Copyright (c) 2019, Red Hat, Inc. All rights reserved.
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
     4
 *
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
     7
 * published by the Free Software Foundation.
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
     8
 *
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    13
 * accompanied this code).
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    14
 *
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    18
 *
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    21
 * questions.
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    22
 */
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    23
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    24
/**
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    25
 * @test
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    26
 * @bug 8229701
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    27
 * @summary C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    28
 *
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    29
 * @run main/othervm ConvI2LWideningAssertTooStrong
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    30
 *
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    31
 */
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    32
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    33
public class ConvI2LWideningAssertTooStrong {
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    34
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    35
    public static final int N = 400;
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    36
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    37
    public static long instanceCount=708L;
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    38
    public static volatile int iFld1=30517;
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    39
    public static int iArrFld[]=new int[N];
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    40
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    41
    public static void vMeth(short s) {
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    42
        int i9=29117, i11=-6;
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    43
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    44
        for (i9 = 11; i9 < 377; i9++) {
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    45
            switch ((i9 % 8) + 22) {
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    46
            case 24:
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    47
                instanceCount = i9;
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    48
                instanceCount += instanceCount;
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    49
                break;
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    50
            case 25:
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    51
                try {
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    52
                    i11 = (20705 % i11);
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    53
                    iArrFld[i9 - 1] = (55094 / iFld1);
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    54
                } catch (ArithmeticException a_e) {}
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    55
                break;
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    56
            default:
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    57
            }
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    58
        }
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    59
    }
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    60
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    61
    public static void main(String[] strArr) {
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    62
        ConvI2LWideningAssertTooStrong _instance = new ConvI2LWideningAssertTooStrong();
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    63
        for (int i = 0; i < 10 * 202 * 8; i++ ) {
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    64
            _instance.vMeth((short)20806);
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    65
        }
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    66
    }
b2a4b22f8cf2 8229701: aarch64: C2 OSR compilation fails with "shouldn't process one node several times" in final graph reshaping
roland
parents:
diff changeset
    67
}