Path: blob/master/test/hotspot/jtreg/compiler/loopopts/Test6860469.java
41152 views
/*1* Copyright 2009 Google 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*22*/2324/**25* @test26* @bug 686046927* @summary remix_address_expressions reshapes address expression with bad control28*29* @run main/othervm -Xcomp30* -XX:CompileCommand=compileonly,compiler.loopopts.Test6860469::C31* compiler.loopopts.Test686046932*/3334package compiler.loopopts;3536public class Test6860469 {3738private static final int H = 16;39private static final int F = 9;4041static int[] fl = new int[1 << F];4243static int C(int ll, int f) {44int max = -1;45int min = H + 1;4647if (ll != 0) {48if (ll < min) {49min = ll;50}51if (ll > max) {52max = ll;53}54}5556if (f > max) {57f = max;58}59if (min > f) {60min = f;61}6263for (int mc = 1 >> max - f; mc <= 0; mc++) {64int i = mc << (32 - f);65fl[i] = max;66}6768return min;69}7071public static void main(String argv[]) {72C(0, 10);73}74}757677