Path: blob/master/test/hotspot/jtreg/compiler/loopstripmining/StripMinedLoopReorgOffsets.java
41149 views
/*1* Copyright (c) 2018, Red Hat, Inc. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*/2223/**24* @test25* @bug 821039026* @summary C2 still crashes with "assert(mode == ControlAroundStripMined && use == sfpt) failed: missed a node"27*28* @run main/othervm -Xcomp StripMinedLoopReorgOffsets29*30*/3132public class StripMinedLoopReorgOffsets {3334public static final int N = 400;3536public static long instanceCount=-4622920139809038929L;3738public void mainTest(String[] strArr1) {3940int i1=-211, i20=54720, i21=205, i22=2184, i23=58, i24=-50110, iArr3[]=new int[N];4142for (i20 = 16; 331 > i20; ++i20) {43i1 = i20;44i21 += i1;45iArr3[i20] <<= (int)StripMinedLoopReorgOffsets.instanceCount;46for (i22 = 4; i22 < 80; i22++) {47i21 = i23;48i24 = 1;49while (++i24 < 2) {50try {51iArr3[i22] = (i23 / i1);52} catch (ArithmeticException a_e) {}53}54}55}5657System.out.println("i1 i20 = " + i1 + "," + i20);58System.out.println("i21 i22 i23 = " + i21 + "," + i22 + "," + i23);59System.out.println("i24 = " + i24);60}61public static void main(String[] strArr) {62StripMinedLoopReorgOffsets _instance = new StripMinedLoopReorgOffsets();63for (int i = 0; i < 10; i++ ) {64_instance.mainTest(strArr);65}66}67}686970