test/compiler/loopopts/TestStrangeControl.java

Tue, 20 Aug 2019 07:47:13 +0200

author
thartmann
date
Tue, 20 Aug 2019 07:47:13 +0200
changeset 9782
c2fa0ac49d01
permissions
-rw-r--r--

8228888: C2 compilation fails with assert "m has strange control"
Summary: Weakened too strong assert.
Reviewed-by: kvn, roland

thartmann@9782 1 /*
thartmann@9782 2 * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
thartmann@9782 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
thartmann@9782 4 *
thartmann@9782 5 * This code is free software; you can redistribute it and/or modify it
thartmann@9782 6 * under the terms of the GNU General Public License version 2 only, as
thartmann@9782 7 * published by the Free Software Foundation.
thartmann@9782 8 *
thartmann@9782 9 * This code is distributed in the hope that it will be useful, but WITHOUT
thartmann@9782 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
thartmann@9782 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
thartmann@9782 12 * version 2 for more details (a copy is included in the LICENSE file that
thartmann@9782 13 * accompanied this code).
thartmann@9782 14 *
thartmann@9782 15 * You should have received a copy of the GNU General Public License version
thartmann@9782 16 * 2 along with this work; if not, write to the Free Software Foundation,
thartmann@9782 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
thartmann@9782 18 *
thartmann@9782 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
thartmann@9782 20 * or visit www.oracle.com if you need additional information or have any
thartmann@9782 21 * questions.
thartmann@9782 22 *
thartmann@9782 23 */
thartmann@9782 24
thartmann@9782 25 /*
thartmann@9782 26 * @test
thartmann@9782 27 * @bug 8228888
thartmann@9782 28 * @summary Test PhaseIdealLoop::has_local_phi_input() with phi input with non-dominating control.
thartmann@9782 29 * @compile StrangeControl.jasm
thartmann@9782 30 * @run main/othervm -Xbatch -XX:CompileCommand=inline,compiler.loopopts.StrangeControl::test
thartmann@9782 31 * compiler.loopopts.TestStrangeControl
thartmann@9782 32 */
thartmann@9782 33
thartmann@9782 34 package compiler.loopopts;
thartmann@9782 35
thartmann@9782 36 public class TestStrangeControl {
thartmann@9782 37
thartmann@9782 38 public static void main(String[] args) throws Exception {
thartmann@9782 39 Thread thread = new Thread() {
thartmann@9782 40 public void run() {
thartmann@9782 41 // Run this in an own thread because it's basically an endless loop
thartmann@9782 42 StrangeControl.test(42);
thartmann@9782 43 }
thartmann@9782 44 };
thartmann@9782 45 thread.start();
thartmann@9782 46 // Give thread executing strange control loop enough time to trigger OSR compilation
thartmann@9782 47 Thread.sleep(4000);
thartmann@9782 48 }
thartmann@9782 49 }

mercurial