RFR: 8285793: C2: optimization of mask checks in counted loops fail in the presence of cast nodes

Tobias Hartmann thartmann at openjdk.java.net
Fri Apr 29 11:02:41 UTC 2022


On Thu, 28 Apr 2022 09:39:18 GMT, Roland Westrelin <roland at openjdk.org> wrote:

> This showed up when working with a panama micro benchmark. Optimization of:
> 
> if ((base + (offset << 2)) & 3) != 0) {
> }
> 
> into:
> 
> if ((base & 3) != 0) {
> 
> fails if the subgraph contains cast nodes.

Looks good. All tests passed.

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

Marked as reviewed by thartmann (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/8447


More information about the hotspot-compiler-dev mailing list