The attached fuzzer test starts to fail after JDK-8263303 withi the following assertion:
To reproduce:
$ java -Xcomp -XX:-TieredCompilation -XX:CompileOnly=Test Test.java
$ java -Xcomp -XX:-TieredCompilation -XX:CompileOnly=Reduced Reduced.java
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (/opt/mach5/mesos/work_dir/slaves/3c846bae-ce30-4a97-93ee-9fef4497ccb6-S79067/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/be546687-12db-4ded-a96b-86062b189919/runs/56ca4e2d-638a-4f38-8b25-3d968f5f0d09/workspace/open/src/hotspot/share/opto/loopopts.cpp:1982), pid=27153, tid=27166
# assert(!loop->is_member(u_loop)) failed: can be in outer loop or out of both loops only
#
# JRE version: Java(TM) SE Runtime Environment (17.0+26) (fastdebug build 17-ea+26-LTS-2439)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 17-ea+26-LTS-2439, compiled mode, sharing, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V [libjvm.so+0x130772c] clone_outer_loop_helper(Node*, IdealLoopTree const*, IdealLoopTree const*, Node_List const&, Unique_Node_List&, PhaseIdealLoop*, bool) [clone .constprop.0]+0x28c
............
Command Line: -Xmx1G -Xcomp -Xbatch -XX:-TieredCompilation -XX:CompileOnly=Test -XX:CompileCommand=quiet Test
............
Current thread (0x00007f817847fc30): JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=27166, stack(0x00007f814bbfc000,0x00007f814bcfd000)]
Current CompileTask:
C2: 2977 10 % b Test::mainTest @ 167 (714 bytes)
Stack: [0x00007f814bbfc000,0x00007f814bcfd000], sp=0x00007f814bcf6cb0, free space=1003k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x130772c] clone_outer_loop_helper(Node*, IdealLoopTree const*, IdealLoopTree const*, Node_List const&, Unique_Node_List&, PhaseIdealLoop*, bool) [clone .constprop.0]+0x28c
V [libjvm.so+0x1308a3f] PhaseIdealLoop::clone_outer_loop(LoopNode*, PhaseIdealLoop::CloneLoopMode, IdealLoopTree*, IdealLoopTree*, int, Node_List&, Node_List&) [clone .part.0]+0x73f
V [libjvm.so+0x1314318] PhaseIdealLoop::clone_loop(IdealLoopTree*, Node_List&, int, PhaseIdealLoop::CloneLoopMode, Node*)+0x4d8
V [libjvm.so+0x12d44f9] PhaseIdealLoop::insert_post_loop(IdealLoopTree*, Node_List&, CountedLoopNode*, CountedLoopEndNode*, Node*, Node*, CountedLoopNode*&)+0xe9
V [libjvm.so+0x12d5350] PhaseIdealLoop::insert_vector_post_loop(IdealLoopTree*, Node_List&)+0x180
V [libjvm.so+0x12d77cf] IdealLoopTree::iteration_split_impl(PhaseIdealLoop*, Node_List&) [clone .part.0]+0x8af
V [libjvm.so+0x12d799b] IdealLoopTree::iteration_split(PhaseIdealLoop*, Node_List&)+0x13b
V [libjvm.so+0x12d7895] IdealLoopTree::iteration_split(PhaseIdealLoop*, Node_List&)+0x35
V [libjvm.so+0x1303e65] PhaseIdealLoop::build_and_optimize(LoopOptsMode)+0xd55
V [libjvm.so+0xa29c2a] PhaseIdealLoop::optimize(PhaseIterGVN&, LoopOptsMode)+0x2da
V [libjvm.so+0xa265d2] Compile::Optimize()+0x14e2
V [libjvm.so+0xa280c5] Compile::Compile(ciEnv*, ciMethod*, int, bool, bool, bool, bool, DirectiveSet*)+0x1585
V [libjvm.so+0x84959a] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x1ea
V [libjvm.so+0xa38a89] CompileBroker::invoke_compiler_on_method(CompileTask*)+0xfb9
V [libjvm.so+0xa397f8] CompileBroker::compiler_thread_loop()+0x5a8
V [libjvm.so+0x18b2e91] JavaThread::thread_main_inner()+0x271
V [libjvm.so+0x18baa90] Thread::call_run()+0x100
V [libjvm.so+0x15872b4] thread_native_entry(Thread*)+0x104