RFR: 8313672: C2: PhaseCCP does not correctly track analysis dependencies involving shift, convert, and mask [v2]
Daniel Lundén
duke at openjdk.org
Tue Oct 31 10:09:35 UTC 2023
On Tue, 31 Oct 2023 09:50:01 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> `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?
Ah, good point. So, essentially, the `if (conv)` in my fix will only check from the ConvI2L last visited by the first call to `ConstraintCastNode::visit_uncasted_uses` (which may not be the one leading to AndL).
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16429#discussion_r1377340192
More information about the hotspot-compiler-dev
mailing list