RFR: 8281453: New optimization: convert `~x` into `-1-x` when `~x` is used in an arithmetic expression [v9]

Vladimir Kozlov kvn at openjdk.org
Thu Oct 6 16:29:10 UTC 2022


On Thu, 29 Sep 2022 20:49:31 GMT, Zhiqiang Zang <duke at openjdk.org> wrote:

>> @CptGit It is due to the fact that GVN runs as soon as the frontend parses the code, during which the graph is incomplete, and you get `outcnt() == 0` because the uses of the node have not been parsed yet. You can defer the transformation to IGVN, which happens later. Thanks.
>
> @merykitty I removed the use check. Does it look good to you? I did not include test `(x + y) & ~(x + y) => 0` because I found we do not have such idealization in `AndINode` because even `x & ~x => 0` is not supported.

@CptGit  Did you updated performance numbers for latest changes? Did they change?

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

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


More information about the hotspot-compiler-dev mailing list