aoqi@0: /* aoqi@0: * Copyright 2009 Google Inc. All Rights Reserved. aoqi@0: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. aoqi@0: * aoqi@0: * This code is free software; you can redistribute it and/or modify it aoqi@0: * under the terms of the GNU General Public License version 2 only, as aoqi@0: * published by the Free Software Foundation. aoqi@0: * aoqi@0: * This code is distributed in the hope that it will be useful, but WITHOUT aoqi@0: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or aoqi@0: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License aoqi@0: * version 2 for more details (a copy is included in the LICENSE file that aoqi@0: * accompanied this code). aoqi@0: * aoqi@0: * You should have received a copy of the GNU General Public License version aoqi@0: * 2 along with this work; if not, write to the Free Software Foundation, aoqi@0: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. aoqi@0: * aoqi@0: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA aoqi@0: * or visit www.oracle.com if you need additional information or have any aoqi@0: * questions. aoqi@0: * aoqi@0: */ aoqi@0: aoqi@0: /** aoqi@0: * @test aoqi@0: * @bug 6860469 aoqi@0: * @summary remix_address_expressions reshapes address expression with bad control aoqi@0: * aoqi@0: * @run main/othervm -Xcomp -XX:CompileOnly=Test.C Test aoqi@0: */ aoqi@0: aoqi@0: public class Test { aoqi@0: aoqi@0: private static final int H = 16; aoqi@0: private static final int F = 9; aoqi@0: aoqi@0: static int[] fl = new int[1 << F]; aoqi@0: aoqi@0: static int C(int ll, int f) { aoqi@0: int max = -1; aoqi@0: int min = H + 1; aoqi@0: aoqi@0: if (ll != 0) { aoqi@0: if (ll < min) { aoqi@0: min = ll; aoqi@0: } aoqi@0: if (ll > max) { aoqi@0: max = ll; aoqi@0: } aoqi@0: } aoqi@0: aoqi@0: if (f > max) { aoqi@0: f = max; aoqi@0: } aoqi@0: if (min > f) { aoqi@0: min = f; aoqi@0: } aoqi@0: aoqi@0: for (int mc = 1 >> max - f; mc <= 0; mc++) { aoqi@0: int i = mc << (32 - f); aoqi@0: fl[i] = max; aoqi@0: } aoqi@0: aoqi@0: return min; aoqi@0: } aoqi@0: aoqi@0: public static void main(String argv[]) { aoqi@0: C(0, 10); aoqi@0: } aoqi@0: }