RFR: 8322077: Add Ideal transformation: (~a) | (~b) => ~(a & b) [v2]
Quan Anh Mai
qamai at openjdk.org
Thu Dec 14 18:09:40 UTC 2023
On Thu, 14 Dec 2023 17:46:59 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#L1617C28-L1617C28); 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 one additional commit since the last revision:
>
> include bug id.
LGTM, but may you consider having dedicated functions to check and create `Not` patterns? Thanks a lot.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/16334#issuecomment-1856343282
More information about the hotspot-compiler-dev
mailing list