RFR: 8313672: C2: PhaseCCP does not correctly track analysis dependencies involving shift, convert, and mask [v2]

Emanuel Peter epeter at openjdk.org
Tue Oct 31 10:09:36 UTC 2023


On Tue, 31 Oct 2023 10:05:20 GMT, Daniel Lundén <duke at openjdk.org> wrote:

>> 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).

Exactly! Or it may be one, but there are others. Actually, it would be interesting to see if we can find an example. Maybe too much work thouch.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16429#discussion_r1377342450


More information about the hotspot-compiler-dev mailing list