JDK-8359344 : C2: Malformed control flow after intrinsic bailout
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 18
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2025-06-12
  • Updated: 2025-07-22
  • Resolved: 2025-07-11
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
26 b07Fixed
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
Changeset: 3ffc5b9e Branch: master Author: Marc Chevalier <mchevalier@openjdk.org> Date: 2025-07-11 07:07:27 +0000 URL: https://git.openjdk.org/jdk/commit/3ffc5b9ef720a07143ef5728d2597afdf2f2c251
11-07-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/25936 Date: 2025-06-23 13:09:43 +0000
24-06-2025

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