RFR: 8375010: C2 VectorAPI: assert(vbox->is_CheckCastPP()) failed: should be expanded [v2]

Vladimir Ivanov vlivanov at openjdk.org
Thu Jan 15 18:19:00 UTC 2026


On Thu, 15 Jan 2026 13:38:08 GMT, Kerem Kat <krk at openjdk.org> wrote:

>> The check `vect->is_Vector() || vect->is_LoadVector()` doesn't handle `Proj` nodes that resolve to vector types, causing an assertion failure when such nodes flow through a `Phi` into `VectorBox`.
>
> Kerem Kat has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Simplify expand_vbox_node_helper by merging VectorBox Phi handling

src/hotspot/share/opto/vector.cpp line 335:

> 333:   // value-numbered to a single node if all inputs were identical.
> 334:   if (vbox->is_Phi()) {
> 335:     assert(!vect->is_Phi() || vbox->as_Phi()->region() == vect->as_Phi()->region(), "");

Isn't the assert too strong? I don't see why redundant phi elimination can't result in a dominating `Phi` node.

So, the predicate to choose between `vect->in(i)` and `vect` is `vect->is_Phi() && vect->as_Phi()->region() == vbox->as_Phi()->region()`.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29200#discussion_r2695464066


More information about the hotspot-compiler-dev mailing list