RFR: 8370200: Crash: assert(outer->outcnt() >= phis + 2 - be_loads && outer->outcnt() <= phis + 2 + stores + 1) failed: only phis [v4]
Damon Fenacci
dfenacci at openjdk.org
Thu Dec 11 16:38:02 UTC 2025
On Thu, 11 Dec 2025 09:48:02 GMT, Roland Westrelin <roland at openjdk.org> wrote:
>> src/hotspot/share/opto/cfgnode.cpp line 2753:
>>
>>> 2751:
>>> 2752: bool PhiNode::can_be_replaced_by(const PhiNode* other) const {
>>> 2753: return type() == Type::MEMORY && other->type() == Type::MEMORY && adr_type() != TypePtr::BOTTOM &&
>>
>> I think I might miss something but I was wondering if we strictly need to check for `adr_type() != TypePtr::BOTTOM`
>
> Are you suggesting we could do:
>
>
> bool PhiNode::can_be_replaced_by(const PhiNode* other) const {
> return type() == Type::MEMORY && other->type() == Type::MEMORY && other->adr_type() == TypePtr::BOTTOM && has_same_inputs_as(other);
> }
>
>
> ?
>
> If there are 2 memory `Phi`s with same inputs and same `adr_type` then global value numbering should common them so that would make no difference.
Yes, that's what I was thinking (to have one less operand).
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28677#discussion_r2611285260
More information about the hotspot-compiler-dev
mailing list