Path: blob/master/test/hotspot/jtreg/compiler/loopstripmining/TestCastIIAfterUnrollingInOuterLoop.java
41152 views
/*1* Copyright (c) 2020, 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 824033526* @summary C2: assert(found_sfpt) failed: no node in loop that's not input to safepoint27*28* @run main/othervm -Xcomp -XX:CompileOnly=TestCastIIAfterUnrollingInOuterLoop TestCastIIAfterUnrollingInOuterLoop29*30*/3132public class TestCastIIAfterUnrollingInOuterLoop {33public static final int N = 400;3435public static long instanceCount=727275458L;36public static int iFld=-10;37public static volatile short sFld=-2966;38public static float fFld=1.682F;39public static int iArrFld[]=new int[N];4041public static void vMeth1(int i1) {42int i3=4;43long lArr[]=new long[N], lArr1[]=new long[N];4445boolean b = (Integer.reverseBytes(i1 << 5) < (instanceCount++));46for (int i2 = 1; i2 < 146; i2++) {47iFld >>= (++i3);48}49if (b) {50for (int i4 = 4; i4 < 218; ++i4) {51instanceCount = iArrFld[i4 - 1];52int i10 = 1;53while (++i10 < 8) {54lArr1[i4] += 61384L;55}56lArr[i4 + 1] = i4;57i3 += sFld;58}59}60}6162public void mainTest(String[] strArr1) {63vMeth1(iFld);64for (int i19 = 2; i19 < 190; i19++) {65int i20 = (int)instanceCount;66instanceCount += (((i19 * i20) + i20) - fFld);67}68}69public static void main(String[] strArr) {70TestCastIIAfterUnrollingInOuterLoop _instance = new TestCastIIAfterUnrollingInOuterLoop();71for (int i = 0; i < 10; i++) {72_instance.mainTest(strArr);73}74}75}767778