Wed, 22 Jan 2014 12:37:28 -0800
Added tag jdk8u5-b05 for changeset b90de55aca30
never@1285 | 1 | /* |
never@1287 | 2 | * Copyright 2009 Google Inc. All Rights Reserved. |
never@1285 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
never@1285 | 4 | * |
never@1285 | 5 | * This code is free software; you can redistribute it and/or modify it |
never@1285 | 6 | * under the terms of the GNU General Public License version 2 only, as |
never@1285 | 7 | * published by the Free Software Foundation. |
never@1285 | 8 | * |
never@1285 | 9 | * This code is distributed in the hope that it will be useful, but WITHOUT |
never@1285 | 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
never@1285 | 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
never@1285 | 12 | * version 2 for more details (a copy is included in the LICENSE file that |
never@1285 | 13 | * accompanied this code). |
never@1285 | 14 | * |
never@1285 | 15 | * You should have received a copy of the GNU General Public License version |
never@1285 | 16 | * 2 along with this work; if not, write to the Free Software Foundation, |
never@1285 | 17 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
never@1285 | 18 | * |
trims@1907 | 19 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
trims@1907 | 20 | * or visit www.oracle.com if you need additional information or have any |
trims@1907 | 21 | * questions. |
never@1285 | 22 | * |
never@1285 | 23 | */ |
never@1285 | 24 | |
never@1285 | 25 | /** |
never@1285 | 26 | * @test |
never@1285 | 27 | * @bug 6860469 |
never@1285 | 28 | * @summary remix_address_expressions reshapes address expression with bad control |
never@1285 | 29 | * |
never@1285 | 30 | * @run main/othervm -Xcomp -XX:CompileOnly=Test.C Test |
never@1285 | 31 | */ |
never@1285 | 32 | |
never@1285 | 33 | public class Test { |
never@1285 | 34 | |
never@1285 | 35 | private static final int H = 16; |
never@1285 | 36 | private static final int F = 9; |
never@1285 | 37 | |
never@1285 | 38 | static int[] fl = new int[1 << F]; |
never@1285 | 39 | |
never@1285 | 40 | static int C(int ll, int f) { |
never@1285 | 41 | int max = -1; |
never@1285 | 42 | int min = H + 1; |
never@1285 | 43 | |
never@1285 | 44 | if (ll != 0) { |
never@1285 | 45 | if (ll < min) { |
never@1285 | 46 | min = ll; |
never@1285 | 47 | } |
never@1285 | 48 | if (ll > max) { |
never@1285 | 49 | max = ll; |
never@1285 | 50 | } |
never@1285 | 51 | } |
never@1285 | 52 | |
never@1285 | 53 | if (f > max) { |
never@1285 | 54 | f = max; |
never@1285 | 55 | } |
never@1285 | 56 | if (min > f) { |
never@1285 | 57 | min = f; |
never@1285 | 58 | } |
never@1285 | 59 | |
never@1285 | 60 | for (int mc = 1 >> max - f; mc <= 0; mc++) { |
never@1285 | 61 | int i = mc << (32 - f); |
never@1285 | 62 | fl[i] = max; |
never@1285 | 63 | } |
never@1285 | 64 | |
never@1285 | 65 | return min; |
never@1285 | 66 | } |
never@1285 | 67 | |
never@1285 | 68 | public static void main(String argv[]) { |
never@1285 | 69 | C(0, 10); |
never@1285 | 70 | } |
never@1285 | 71 | } |