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

Zhiqiang Zang duke at openjdk.org
Sat Jan 6 00:47:28 UTC 2024


On Fri, 5 Jan 2024 16:22:38 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Zhiqiang Zang has refreshed the contents of this pull request, and previous commits have been removed. Incremental views are not available.
>
> Looks like a good idea. Left a few comments.
> 
> I would have merged this with https://github.com/openjdk/jdk/pull/16333, since it is essentially the symmetric case. But leave it separate now.
> 
> It would be nice to have some shared tests, where both optimizations need to be combined. Like:
> `(~a | ~b) & (~c | ~d)` -> `~(a & b) & ~(c & d)` -> `~((a & b) | (c & d))`

@eme64 @TobiHartmann Thanks for the comments. All addressed.

I rebased this PR onto #16333 so I was able to add these tests for using both optimizations. (the history was messed up).

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

PR Comment: https://git.openjdk.org/jdk/pull/16334#issuecomment-1879464432


More information about the hotspot-compiler-dev mailing list