RFR: 8322077: Add Ideal transformation: (~a) | (~b) => ~(a & b) [v13]

Zhiqiang Zang duke at openjdk.org
Wed Jan 10 16:57:47 UTC 2024


> 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 with a new target base due to a merge or a rebase. The pull request now contains 34 commits:

 - Merge branch 'master' of https://github.com/openjdk/jdk into ornode-PNewDeMorganLawOrToAnd
 - update copyright dates.
 - Merge branch 'andnode-PNewDeMorganLawAndToOr' into ornode-PNewDeMorganLawOrToAnd
 - 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.
 - Revert "adapt changes from the dependent pr."
   
   This reverts commit 0c8d10776fe55a28ea9f60160b4f6f57aabad5ab.
 - Revert "adapt to new changes from the dependant pr."
   
   This reverts commit b21e242b306d9cf01e1ba84ebba47ef5b471d98e.
 - adapt to new changes from the dependant pr.
 - Merge branch 'andnode-PNewDeMorganLawAndToOr' into ornode-PNewDeMorganLawOrToAnd
 - ... and 24 more: https://git.openjdk.org/jdk/compare/b86c3b7a...f908668b

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

Changes: https://git.openjdk.org/jdk/pull/16334/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16334&range=12
  Stats: 369 lines in 5 files changed: 369 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/16334.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/16334/head:pull/16334

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


More information about the hotspot-compiler-dev mailing list