RFR: 8313672: C2: PhaseCCP does not correctly track analysis dependencies involving shift, convert, and mask
Emanuel Peter
epeter at openjdk.org
Tue Oct 31 09:52:32 UTC 2023
On Tue, 31 Oct 2023 07:44:01 GMT, Daniel Lundén <duke at openjdk.org> wrote:
>> src/hotspot/share/opto/phaseX.cpp line 1992:
>>
>>> 1990: };
>>> 1991: ConstraintCastNode::visit_uncasted_uses(use, push_and_uses_to_worklist);
>>> 1992: if (conv) {
>>
>> What happens if there were to be multiple such `ConvI2L` nodes? Or is that impossible?
>
> `MulNode::AndIL_shift_and_mask_is_always_zero` only covers the case where there is one conversion. So, currently, such a case is impossible in the analysis.
Just because a son only has one father does not mean that a father only has one son ;)
`MulNode::AndIL_shift_and_mask_is_always_zero` looks up through its inputs and only walks by one `ConvI2L` at most, on the way to the `Shift` node. But going down from a `shift`, there could be multiple `ConvI2L` nodes, and you do not know which ones would lead to the `add-shift` pattern (there could be multiple), and which ones lead to other structures.
What do you think?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16429#discussion_r1377321134
More information about the hotspot-compiler-dev
mailing list