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

Roland Westrelin roland at openjdk.java.net
Fri Apr 29 11:23:43 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.

This pull request has now been integrated.

Changeset: e98ac235
Author:    Roland Westrelin <roland at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/e98ac2355306246e69ee9991e12077c633e80a05
Stats:     158 lines in 2 files changed: 154 ins; 0 del; 4 mod

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

Reviewed-by: kvn, thartmann

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

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


More information about the hotspot-compiler-dev mailing list