RFR: 8360192: C2: Make the type of count leading/trailing zero nodes more precise [v12]
Qizheng Xing
qxing at openjdk.org
Mon Sep 8 09:32:59 UTC 2025
On Tue, 19 Aug 2025 13:54:31 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> Qizheng Xing has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Add more constant folding tests for CLZ/CTZ
>
> src/hotspot/share/opto/countbitsnode.cpp line 47:
>
>> 45: if (x >> 30 == 0) { n += 2; x <<= 2; }
>> 46: n -= x >> 31;
>> 47: return TypeInt::make(n);
>
> Is there already a test that covers all the cases that constant fold here? Just to make sure we do not get regressions here.
Added in IR test `TestCountBitsRange.java`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25928#discussion_r2329682681
More information about the hotspot-compiler-dev
mailing list