test/hotspot/jtreg/compiler/loopstripmining/UnexpectedNodeInOuterLoopWhenCloning.java
changeset 50503 f07979db6cb2
equal deleted inserted replaced
50502:9c361050293f 50503:f07979db6cb2
       
     1 /*
       
     2  * Copyright (c) 2018, Red Hat, Inc. All rights reserved.
       
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       
     4  *
       
     5  * This code is free software; you can redistribute it and/or modify it
       
     6  * under the terms of the GNU General Public License version 2 only, as
       
     7  * published by the Free Software Foundation.
       
     8  *
       
     9  * This code is distributed in the hope that it will be useful, but WITHOUT
       
    10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
       
    11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
       
    12  * version 2 for more details (a copy is included in the LICENSE file that
       
    13  * accompanied this code).
       
    14  *
       
    15  * You should have received a copy of the GNU General Public License version
       
    16  * 2 along with this work; if not, write to the Free Software Foundation,
       
    17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
       
    18  *
       
    19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
       
    20  * or visit www.oracle.com if you need additional information or have any
       
    21  * questions.
       
    22  */
       
    23 
       
    24 /**
       
    25  * @test
       
    26  * @bug 8202747
       
    27  * @summary C2: assert(mode == ControlAroundStripMined && use == sfpt) failed: missed a node
       
    28  *
       
    29  * @run main/othervm -Xcomp -Xbatch -XX:CompileOnly=UnexpectedNodeInOuterLoopWhenCloning -XX:-TieredCompilation UnexpectedNodeInOuterLoopWhenCloning
       
    30  *
       
    31  */
       
    32 
       
    33 public class UnexpectedNodeInOuterLoopWhenCloning {
       
    34 
       
    35     public static final int N = 400;
       
    36 
       
    37     public static double dFld=0.37026;
       
    38     public static int iArrFld[]=new int[N];
       
    39 
       
    40     public static void vMeth() {
       
    41 
       
    42         int i5=6, i6=-42538, i7=-209, i8=163, i10=-4, i11=191;
       
    43         boolean b=true;
       
    44         double dArr[]=new double[N];
       
    45 
       
    46         for (i5 = 3; i5 < 245; i5++) {
       
    47             i7 = 7;
       
    48             while (--i7 > 0) {
       
    49                 iArrFld[i7] = -11995;
       
    50                 if (b) continue;
       
    51             }
       
    52             for (i8 = 1; i8 < 7; ++i8) {
       
    53                 for (i10 = 1; i10 < 2; i10++) {
       
    54                     dFld -= i6;
       
    55                     i11 += i7;
       
    56                 }
       
    57             }
       
    58         }
       
    59     }
       
    60 
       
    61     public static void main(String[] strArr) {
       
    62         UnexpectedNodeInOuterLoopWhenCloning _instance = new UnexpectedNodeInOuterLoopWhenCloning();
       
    63         _instance.vMeth();
       
    64     }
       
    65 }