jdk

Форк
0
/
TestLoopUnswitchingWithoutParsePredicates.java 
64 строки · 2.2 Кб
1
/*
2
 * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
 *
5
 * This code is free software; you can redistribute it and/or modify it
6
 * under the terms of the GNU General Public License version 2 only, as
7
 * published by the Free Software Foundation.
8
 *
9
 * This code is distributed in the hope that it will be useful, but WITHOUT
10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12
 * version 2 for more details (a copy is included in the LICENSE file that
13
 * accompanied this code).
14
 *
15
 * You should have received a copy of the GNU General Public License version
16
 * 2 along with this work; if not, write to the Free Software Foundation,
17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18
 *
19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20
 * or visit www.oracle.com if you need additional information or have any
21
 * questions.
22
 *
23
 */
24

25
/*
26
 * @test
27
 * @bug 8314106
28
 * @summary Test that we do not try to copy a Parse Predicate to an unswitched loop if they do not exist anymore.
29
 * @run main/othervm -Xbatch -XX:-TieredCompilation
30
 *                   -XX:CompileCommand=compileonly,compiler.predicates.TestLoopUnswitchingWithoutParsePredicates::*
31
 *                   compiler.predicates.TestLoopUnswitchingWithoutParsePredicates
32
 */
33

34
package compiler.predicates;
35

36
public class TestLoopUnswitchingWithoutParsePredicates {
37
    static byte byFld;
38
    static byte byArrFld[] = new byte[400];
39

40
    public static void main(String[] strArr) {
41
        for (int i = 0; i < 1000;i++) {
42
            test(i);
43
        }
44
    }
45

46
    static void test(int i2) {
47
        int i10, i11 = 0, i12, i13, i14;
48
        double dArr[] = new double[400];
49
        for (i10 = 7; i10 < 307; i10++) {
50
            byArrFld[i10] = 58;
51
            for (i12 = 1; i12 < 3; i12++) {
52
                for (i14 = 1; i14 < 2; i14++) {
53
                    byFld &= i14;
54
                    switch (i2) {
55
                        case 4:
56
                            dArr[1] = i14;
57
                        case 2:
58
                            i13 = i11;
59
                    }
60
                }
61
            }
62
        }
63
    }
64
}
65

66

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.