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

Quan Anh Mai qamai at openjdk.org
Tue Sep 27 18:57:22 UTC 2022


On Mon, 19 Sep 2022 16:11:19 GMT, Zhiqiang Zang <duke at openjdk.org> wrote:

> So do you mean we want to do the transformation only when ~a has one use, i.e., `outcnt() == 1`

Yes, you can iterate through the uses of the node to be more general

> However I still don't get why it should be done in XOrNode

Because this seems logically to be a transformation of the not node, not of the add or sub node, and putting the transformation there may hurt maintainability.

Thanks.

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

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


More information about the hotspot-compiler-dev mailing list