RFR: 8365570: C2 fails assert(false) failed: Unexpected node in SuperWord truncation: CastII [v2]

Jasmine Karthikeyan jkarthikeyan at openjdk.org
Fri Dec 5 06:04:04 UTC 2025


On Mon, 22 Sep 2025 06:57:24 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

>> Thanks for the comment! I used `CompLevel.C2` here to simulate an -Xcomp environment, since unfortunately I couldn't replicate the crash without it with the IR framework. I'll do some investigation to find a way to ensure that it won't fail without C2.
>
> When you specify `@Warmup(0)`, the IR framework should directly compile it at the highest level which should be C2 if you are not running with a client build. So, I would have expected that it makes no difference. Can you double-check if you can reproduce it with `CompLevel.C2` but not without?

After taking a closer look, I think you're correct- I can reproduce the crash using just `@Warmup(0)` and `@Test`. I think I used both while debugging and didn't test whether it worked without `CompLevel.C2`. I've removed it in the latest commit. 
However, I noticed that after that I merged from master neither the test nor the reproducer failed compilation before the fix is added. I think another commit must have changed the generated graph so that it no longer tries to vectorize the `CastII`, leading to the crash not being triggered. I looked at the JBS entry and saw that there wasn't another reproducer for this, so I was a bit unsure on what to do. Should this patch be merged with the current test?

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/26827#discussion_r2591510915


More information about the hotspot-compiler-dev mailing list