RFR: 8371964: C2 compilation asserts with "Unexpected load/store size" [v2]
Quan Anh Mai
qamai at openjdk.org
Thu Nov 20 10:23:11 UTC 2025
> Hi,
>
> This fixes the crash in `Load/StoreVectorMaskedNode::Ideal`. The issue here is that the graph is not canonical during idealization, which leads to us processing a dead node. The fix I propose is to bail-out when that happens.
>
> To be more specific, for this issue, we have the graph that looks like:
>
> ConI -> ConvI2L -> CastLL(0..32) -> VectorMaskGen
>
> with `ConI` being 45 and `MaxVectorSize` being 32. In this instance, `CastLL` is processed before `ConvI2L`, and when it is processed, it sees that the type of `ConvI2L` being its bottom type. As a result, it does not know that it is top, and since we are after macro expansion, which is after loop opts, the `CastLL` goes away, leaving us with:
>
> ConI -> ConvI2L -> VectorMaskGen
>
> After `ConvI2L` is processed, we know that the input of `VectorMaskGen` is a constant 45, which is larger than `MaxVectorSize`, leading to the assert failure.
>
> Please take a look and leave your thoughts, thanks a lot.
Quan Anh Mai has updated the pull request incrementally with one additional commit since the last revision:
assert post_loop_opts
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/28410/files
- new: https://git.openjdk.org/jdk/pull/28410/files/c88f5b47..ecaead7f
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=28410&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=28410&range=00-01
Stats: 7 lines in 1 file changed: 5 ins; 0 del; 2 mod
Patch: https://git.openjdk.org/jdk/pull/28410.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/28410/head:pull/28410
PR: https://git.openjdk.org/jdk/pull/28410
More information about the hotspot-compiler-dev
mailing list