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

Zhiqiang Zang duke at openjdk.org
Tue Jan 9 06:02:24 UTC 2024


On Mon, 8 Jan 2024 07:02:50 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

>> Zhiqiang Zang has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   update the copyright dates.
>
> src/hotspot/share/opto/addnode.hpp line 84:
> 
>> 82:   // Utility function to check if the given node is a NOT operation,
>> 83:   // i.e., n == m ^ (-1).
>> 84:   static bool is_not(PhaseGVN* phase, Node* n, BasicType bt);
> 
> Could these be made non-static?

@TobiHartmann @eme64 
I moved `is_not` but I was not able to move `make_not` to `node` class, because otherwise it would not compile for arm, s390x, ppc64le.

/home/runner/work/jdk/jdk/src/hotspot/share/opto/node.cpp:1605:18: error: expected type-specifier before 'XorINode'
 1605 |       return new XorINode(this, phase->intcon(-1));

Please let me know if we still want to move `make_not`. Thanks.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16333#discussion_r1445656863


More information about the hotspot-compiler-dev mailing list