The attached Java Fuzzer test starts to fail after JDK-8302652:
To reproduce:
$ java -Xcomp -XX:CompileCommand=compileonly,Test::* Test.java
$ java -Xcomp -XX:CompileCommand=compileonly,Reduced::* Reduced.java
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (/opt/mach5/mesos/work_dir/slaves/cd627e65-f015-4fb1-a1d2-b6c9b8127f98-S9638/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/7cab5968-cfac-4917-b50c-ee11433deb3c/runs/89e28e37-02bc-4ad0-8809-7a3c3140d816/workspace/open/src/hotspot/share/opto/loopopts.cpp:4249), pid=1696577, tid=1696600
# assert(false) failed: scalar_input is neither phi nor a matchin reduction
#
# JRE version: Java(TM) SE Runtime Environment (21.0+26) (fastdebug build 21-ea+26-LTS-2328)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 21-ea+26-LTS-2328, compiled mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V [libjvm.so+0x12b07f6] PhaseIdealLoop::move_unordered_reduction_out_of_loop(IdealLoopTree*)+0x896
..........
Command Line: -Xmx1G -Xcomp -Xbatch -XX:CompileOnly=Test -XX:CompileCommand=quiet -XX:MaxRAMPercentage=4.16667 -Dtest.boot.jdk=/opt/mach5/mesos/work_dir/jib-master/install/jdk/20/36/bundles/linux-x64/jdk-20_linux-x64_bin.tar.gz/jdk-20 -Djava.io.tmpdir=/opt/mach5/mesos/work_dir/slaves/741e9afd-8c02-45c3-b2e2-9db1450d0832-S161740/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/a03df349-195e-43a5-997a-9d6208db5f95/runs/30281575-d526-4e59-b473-1cda18ba846e/testoutput/test-support/jtreg_closed_test_hotspot_jtreg_applications_javafuzzer_BigTest_java/tmp Test
........
Current CompileTask:
C2: 471 8 b 4 Test::vMeth (313 bytes)
Stack: [0x00007f0aeda00000,0x00007f0aedb00000], sp=0x00007f0aedafac00, free space=1003k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x12b07f6] PhaseIdealLoop::move_unordered_reduction_out_of_loop(IdealLoopTree*)+0x896 (loopopts.cpp:4249)
V [libjvm.so+0x1296c54] PhaseIdealLoop::build_and_optimize()+0x1414 (loopnode.cpp:4673)
V [libjvm.so+0x9f2939] PhaseIdealLoop::optimize(PhaseIterGVN&, LoopOptsMode)+0x3b9 (loopnode.hpp:1124)
V [libjvm.so+0x9ef4a7] Compile::Optimize()+0xe97 (compile.cpp:2156)
V [libjvm.so+0x9f16d6] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x1b96 (compile.cpp:842)
V [libjvm.so+0x84b3e4] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x3c4 (c2compiler.cpp:118)
V [libjvm.so+0x9fd5e0] CompileBroker::invoke_compiler_on_method(CompileTask*)+0xa00 (compileBroker.cpp:2265)
V [libjvm.so+0x9fe468] CompileBroker::compiler_thread_loop()+0x618 (compileBroker.cpp:1944)
V [libjvm.so+0xeb651c] JavaThread::thread_main_inner()+0xcc (javaThread.cpp:719)
V [libjvm.so+0x1795d7a] Thread::call_run()+0xba (thread.cpp:217)
V [libjvm.so+0x149623c] thread_native_entry(Thread*)+0x11c (os_linux.cpp:778)