RFR: 8322589: Add Ideal transformation: (~a) & (~b) => ~(a | b) [v11]
Tobias Hartmann
thartmann at openjdk.org
Wed Jan 10 07:34:39 UTC 2024
On Tue, 9 Jan 2024 16:56:50 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.
>
> Zhiqiang Zang has updated the pull request incrementally with three additional commits since the last revision:
>
> - Revert "move the two helper functions to member functions of the node class."
>
> This reverts commit 7a962d69ac687c0476e54cd004037f2ebb0800ba.
> - Revert "update copyright dates."
>
> This reverts commit 3665de2f3d38b4fce3ba968ec6247dd2576ecc32.
> - Revert "move make_not back to AddNode because it cannot compile for architecture arm, s390x, ppc64le."
>
> This reverts commit 4ee8b089b6f119b1692dcd2c512d249d92734697.
Thanks, looks good.
-------------
Marked as reviewed by thartmann (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/16333#pullrequestreview-1812567403
More information about the hotspot-compiler-dev
mailing list