test/compiler/c1/TestGotoIfMain.java

Tue, 19 Feb 2019 08:58:55 +0100

author
thartmann
date
Tue, 19 Feb 2019 08:58:55 +0100
changeset 9715
e0e66aba375a
permissions
-rw-r--r--

8218721: C1's CEE optimization produces safepoint poll with invalid debug information
Summary: Bail out of CEE if one of the gotos is a safepoint but the if is not.
Reviewed-by: vlivanov, mdoerr

thartmann@9715 1 /*
thartmann@9715 2 * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
thartmann@9715 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
thartmann@9715 4 *
thartmann@9715 5 * This code is free software; you can redistribute it and/or modify it
thartmann@9715 6 * under the terms of the GNU General Public License version 2 only, as
thartmann@9715 7 * published by the Free Software Foundation.
thartmann@9715 8 *
thartmann@9715 9 * This code is distributed in the hope that it will be useful, but WITHOUT
thartmann@9715 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
thartmann@9715 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
thartmann@9715 12 * version 2 for more details (a copy is included in the LICENSE file that
thartmann@9715 13 * accompanied this code).
thartmann@9715 14 *
thartmann@9715 15 * You should have received a copy of the GNU General Public License version
thartmann@9715 16 * 2 along with this work; if not, write to the Free Software Foundation,
thartmann@9715 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
thartmann@9715 18 *
thartmann@9715 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
thartmann@9715 20 * or visit www.oracle.com if you need additional information or have any
thartmann@9715 21 * questions.
thartmann@9715 22 */
thartmann@9715 23
thartmann@9715 24 /*
thartmann@9715 25 * @test
thartmann@9715 26 * @bug 8218721
thartmann@9715 27 * @compile TestGotoIf.jasm
thartmann@9715 28 * @run main/othervm -XX:TieredStopAtLevel=1 -Xcomp
thartmann@9715 29 * -XX:CompileCommand=compileonly,compiler.c1.TestGotoIf::test*
thartmann@9715 30 * compiler.c1.TestGotoIfMain
thartmann@9715 31 */
thartmann@9715 32
thartmann@9715 33 package compiler.c1;
thartmann@9715 34
thartmann@9715 35 public class TestGotoIfMain {
thartmann@9715 36 public static void main(String[] args) {
thartmann@9715 37 TestGotoIf test = new TestGotoIf();
thartmann@9715 38 test.i = 5;
thartmann@9715 39 test.test1();
thartmann@9715 40 test.test2();
thartmann@9715 41 test.test3();
thartmann@9715 42 test.test4();
thartmann@9715 43 test.test5();
thartmann@9715 44 test.test6();
thartmann@9715 45 }
thartmann@9715 46 }

mercurial