Path: blob/master/test/hotspot/jtreg/compiler/loopopts/TestCountedLoopZeroIter.java
41149 views
/*1* Copyright (c) 2021, 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 826130826* @summary C2: assert(inner->is_valid_counted_loop(T_INT) && inner->is_strip_mined()) failed: OuterStripMinedLoop should have been removed27*28* @run main/othervm -Xcomp -XX:CompileOnly=TestCountedLoopZeroIter TestCountedLoopZeroIter29*30*/313233public class TestCountedLoopZeroIter {34static int N = 400;35static boolean b;36static long lArrFld[] = new long[N];37static int iArrFld[] = new int[N];3839static void test() {40int i19 = 9, i21 = 8;41long l1;42do43if (!b) {44iArrFld[1] /= l1 = 1;45do {46int i22 = 1;47do {48iArrFld[0] = (int)l1;49iArrFld[i22 - 1] = i21;50} while (++i22 < 1);51lArrFld[1] = i21;52} while (++l1 < 145);53}54while (++i19 < 173);55System.out.println();56}5758public static void main(String[] strArr) {59for (int i = 0; i < 10; i++) {60test();61}62}63}646566