test/hotspot/jtreg/compiler/loopstripmining/UnexpectedPinnedNodeInOuterLoop.java
author roland
Mon, 11 Jun 2018 14:16:43 +0200
changeset 50503 f07979db6cb2
parent 50248 c0475f9c1c45
permissions -rw-r--r--
8202747: C2: assert(mode == ControlAroundStripMined && use == sfpt) failed: missed a node Reviewed-by: neliasso, kvn
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
50248
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
     1
/*
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
     2
 * Copyright (c) 2018, Red Hat, Inc. All rights reserved.
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
     4
 *
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
     7
 * published by the Free Software Foundation.
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
     8
 *
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
    13
 * accompanied this code).
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
    14
 *
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
    18
 *
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
    21
 * questions.
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
    22
 */
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
    23
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
    24
/**
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
    25
 * @test
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
    26
 * @bug 8202950
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
    27
 * @summary C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
    28
 *
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
    29
 * @run main/othervm -Xcomp -Xbatch -XX:CompileOnly=UnexpectedPinnedNodeInOuterLoop -XX:-TieredCompilation UnexpectedPinnedNodeInOuterLoop
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
    30
 *
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
    31
 */
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
    32
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
    33
public class UnexpectedPinnedNodeInOuterLoop {
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
    34
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
    35
    public static final int N = 400;
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
    36
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
    37
    public static volatile float fFld=0.488F;
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
    38
    public static volatile int iFld=143;
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
    39
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
    40
    public static void lMeth(int i2) {
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
    41
        int i20=95, i21=-163, i22=-11, iArr[]=new int[N], iArr2[]=new int[N];
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
    42
        byte by1=-97;
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
    43
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
    44
        for (i20 = 15; 253 > i20; ++i20) {
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
    45
            iFld += i21;
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
    46
            for (i22 = 1; 7 > i22; i22++) {
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
    47
                iArr[i20 + 1] >>= i20;
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
    48
            }
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
    49
            fFld = i2;
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
    50
            iArr2[i20] -= (int)2.302F;
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
    51
        }
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
    52
    }
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
    53
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
    54
    public static void main(String[] strArr) {
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
    55
        lMeth(0);
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
    56
    }
c0475f9c1c45 8202950: C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint
roland
parents:
diff changeset
    57
}