RFR: 8303804: Fix some errors of If-VectorTest and CMove-VectorTest [v2]

Quan Anh Mai qamai at openjdk.org
Thu Mar 9 02:34:07 UTC 2023


The message from this sender included one or more files
which could not be scanned for virus detection; do not
open these files unless you are certain of the sender's intent.

----------------------------------------------------------------------
On Thu, 9 Mar 2023 01:19:43 GMT, Wang Haomin <wanghaomin at openjdk.org> wrote:

>> src/hotspot/share/adlc/output_c.cpp line 3989:
>> 
>>> 3987:   if (inst->captures_bottom_type(_globalNames)) {
>>> 3988:     if (strncmp("MachCall", inst->mach_base_class(_globalNames), strlen("MachCall"))
>>> 3989:       && strncmp("MachIf", inst->mach_base_class(_globalNames), strlen("MachIf"))) {
>> 
>> Maybe explicitly compare the results with 0 here for consistency with other usage of `strcmp`
>
> Thanks for your review, DONE

Rethink about it should it be `strncmp("MachCall", inst->mach_base_class(_globalNames), strlen("MachCall") + 1)` instead? Or else we could return true for nodes that have `MachCall` as a prefix.

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

PR: https://git.openjdk.org/jdk/pull/12917


More information about the hotspot-compiler-dev mailing list