RFR: 8365570: C2 fails assert(false) failed: Unexpected node in SuperWord truncation: CastII [v2]
Emanuel Peter
epeter at openjdk.org
Fri Dec 5 08:25:57 UTC 2025
On Fri, 5 Dec 2025 06:00:22 GMT, Jasmine Karthikeyan <jkarthikeyan at openjdk.org> wrote:
>> 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?
@jaskarth Thanks for looking into it!
I would still add the fix, just in case. And I think the test as well, even if it does not reproduce any more.
I was wondering: before the merge, when the test still reproduced:
If you removed the `@Warmup(0)` and `CompLevel.C2`, and instead just do `framework.addFlags` with `-Xcomp`, would that reproduce too? If so, you could have a framework run with and one without Xcomp, the one with Xcomp also should have a compileonly. What do you think?
Or we just push the patch as is, to be sure this is done and integrated. What do you think @chhagedorn ?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26827#discussion_r2591811631
More information about the hotspot-compiler-dev
mailing list