RFR: 8322589: Add Ideal transformation: (~a) & (~b) => ~(a | b)
Tobias Hartmann
thartmann at openjdk.org
Fri Jan 5 11:07:22 UTC 2024
On Tue, 24 Oct 2023 04:49:20 GMT, Zhiqiang Zang <duke at openjdk.org> wrote:
> Hello,
>
> `(~a) & (~b) => ~(a | b)` is a widely seen pattern, for example it is implemented for LLVM [here](https://github.com/llvm/llvm-project/blob/397f1ce9efb4eea1ee10fe4833f733b8c7abd878/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp#L1616C28-L1616C28); however it is missing in current implementation of hotspot. This pull request adds this transformation and associated tests.
>
> Thanks.
I think dedicated methods like you used in https://github.com/openjdk/jdk/pull/16334 would be good. Please also update the copyright dates.
-------------
PR Review: https://git.openjdk.org/jdk/pull/16333#pullrequestreview-1805750056
More information about the hotspot-compiler-dev
mailing list