RFR: 8281453: New optimization: convert `~x` into `-1-x` when `~x` is used in an arithmetic expression [v9]
Zhiqiang Zang
duke at openjdk.org
Sun Sep 18 17:21:32 UTC 2022
On Sat, 17 Sep 2022 16:32:45 GMT, Quan Anh Mai <duke at openjdk.org> wrote:
>> Zhiqiang Zang has updated the pull request incrementally with one additional commit since the last revision:
>>
>> include microbenchmark.
>
> Hi, what if `~x` is also used in another context, would it duplicate this local, also how about the cases where `x` is an addition or subtraction? I think this should be an idealisation of the `XorNode`, and if you cannot really check the uses of a node during parsing, you can record them for igvn later. Thanks.
Thanks @merykitty for the comment. Can you give an example for this?
>what if `~x` is also used in another context, would it duplicate this local
Also, I think this works.
> how about the cases where `x` is an addition or subtraction
-------------
PR: https://git.openjdk.org/jdk/pull/7376
More information about the hotspot-compiler-dev
mailing list