Integrated: 8322077: Add Ideal transformation: (~a) | (~b) => ~(a & b)

Zhiqiang Zang duke at openjdk.org
Mon Jan 15 06:50:37 UTC 2024


On Tue, 24 Oct 2023 05:02:56 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.

This pull request has now been integrated.

Changeset: 1515bd7c
Author:    Zhiqiang Zang <zhiqiang.zang at utexas.edu>
Committer: Tobias Hartmann <thartmann at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/1515bd7c9d70e3d6153fc82cd7db0502a15427aa
Stats:     369 lines in 5 files changed: 369 ins; 0 del; 0 mod

8322077: Add Ideal transformation: (~a) | (~b) => ~(a & b)

Reviewed-by: thartmann, epeter

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

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


More information about the hotspot-compiler-dev mailing list