RFR: 8304230: LShift ideal transform assertion

Tobias Hartmann thartmann at openjdk.org
Mon Mar 20 07:50:20 UTC 2023


On Wed, 15 Mar 2023 18:24:23 GMT, Jasmine K. <duke at openjdk.org> wrote:

> Hi,
> This PR aims to address the assertion on arm32 where the special-case `add1->in(2) == in(2)` check fails, and it falls through to the regular cases. I'm not quite sure how this issue can manifest as AFAIK the GVN should allow the usage of `==` to check against constants that are equal. I've changed the check from node equality to constant equality to hopefully resolve this. I unfortunately cannot reproduce the behavior on x86, nor do I have access to arm32 hardware, so I would greatly appreciate reviews and help testing this change (cc @bulasevich). Thank you all in advance.

Looks good to me.

> I'm not quite sure how this issue can manifest as AFAIK the GVN should allow the usage of == to check against constants that are equal

It might be an intermittent state during GVN, where a non-constant node is known to have a constant type that's returned by `const_shift_count` but the node was not yet replaced by an actual constant and therefore `==` returns false.

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

Marked as reviewed by thartmann (Reviewer).

PR: https://git.openjdk.org/jdk/pull/13049


More information about the hotspot-compiler-dev mailing list