JDK-8359344 : C2: Malformed control flow after intrinsic bailout
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 18
  • Priority: P4
  • Status: In Progress
  • Resolution: Unresolved
  • Submitted: 2025-06-12
  • Updated: 2025-06-23
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 26
26Unresolved
Related Reports
Blocks :  
Causes :  
Description
On aarch64
java -XX:CompileCommand=PrintCompilation,"jdk.incubator.vector.*::intoArray*" -XX:TypeProfileLevel=222 -Xbatch Test.java

=>

20889 2128    b  4       jdk.incubator.vector.LongMaxVector::intoArray0 (13 bytes)   COMPILE SKIPPED: malformed control flow (retry at different tier)


Found when working on JDK-8350864:
A IfFalse has 2 control successor: an If and a CallStaticJava.
On top of that, this If has a IfFalse but not IfTrue.

Same with Test_x64 for x64... The difference is the species of the vector: SPECIES_MAX vs SPECIES_128. It seems it has to be of length 2. On x64, I get:
43999 2119    b  4       jdk.incubator.vector.Long128Vector::intoArray0 (13 bytes)   COMPILE SKIPPED: malformed control flow (retry at different tier)

Comments
ILW = C2 compilation bailout due to malformed control flow, single test with vector API (incubator) and non-default TypeProfileLevel, no workaround = MLH = P4
13-06-2025

Reproduces with JDK 18 already: java --add-modules=jdk.incubator.vector -XX:TypeProfileLevel=222 -Xbatch -XX:+AbortVMOnCompilationFailure Test_x64.java Narrowed it down to JDK-8271515 in JDK 18 b24.
13-06-2025