RFR: 8360192: C2: Make the type of count leading/trailing zero nodes more precise [v3]
Emanuel Peter
epeter at openjdk.org
Mon Jun 23 10:43:30 UTC 2025
On Mon, 23 Jun 2025 10:39:22 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> Qizheng Xing has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Narrow type bound
>
> src/hotspot/share/opto/countbitsnode.cpp line 53:
>
>> 51: if (t == Type::TOP) return Type::TOP;
>> 52: const TypeInt* ti = t->isa_int();
>> 53: if (ti) {
>
> Implicit null check not allowed by style guide :)
>
> https://github.com/openjdk/jdk/blob/master/doc/hotspot-style.md
>
>> Do not use ints or pointers as (implicit) booleans with &&, ||, if, while. Instead, compare explicitly, i.e. if (x != 0) or if (ptr != nullptr), etc.
I know it was like that before, but when we touch code we should fix it :)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25928#discussion_r2161284566
More information about the hotspot-compiler-dev
mailing list