RFR: 8347645: C2: XOR bounded value handling blocks constant folding [v12]
Johannes Graham
duke at openjdk.org
Fri Jan 31 06:11:36 UTC 2025
On Fri, 31 Jan 2025 01:37:39 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:
>> Johannes Graham has updated the pull request incrementally with one additional commit since the last revision:
>>
>> extract static methods for testing; add GTESTs; more extensive int ir tests; remove some ir tests for longs due to difficulty in applying constant clamping.
>
> src/hotspot/share/opto/addnode.cpp line 1012:
>
>> 1010: }
>> 1011:
>> 1012: jint XorINode::calc_xor_max(const jint hi_0, const jint hi_1) {
>
> Since this is only used in `XorINode::Value`, I think a static local method would be better. And if you are comfortable with templates, I suggest templatizing it to unify the implementation with `jlong` below.
I've templatized it and took it out of the class, but didn't make it static, because I need the test to call it. Can I do better than that?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23089#discussion_r1936717463
More information about the hotspot-compiler-dev
mailing list