RFR: 8305324: C2: Wrong execution of vectorizing Interger.reverseBytes [v3]

Daohan Qu duke at openjdk.org
Tue Apr 11 11:26:57 UTC 2023


On Tue, 11 Apr 2023 09:23:37 GMT, Daohan Qu <duke at openjdk.org> wrote:

>> src/hotspot/share/opto/superword.cpp line 3944:
>> 
>>> 3942:             const Type* vt = vtn;
>>> 3943:             int op = in->Opcode();
>>> 3944:             if (VectorNode::is_shift_opcode(op) || op == Op_AbsI || op == Op_ReverseBytesI) {
>> 
>> (another suggestion) This list may be longer and longer as we vectorize more operations. Shall we move this check into a static function of `VectorNode`, like `VectorNode::requires_higher_order_bits(op)`, and put the comments inside?
>
> Good suggestion, I think a function can make this condition self-documented. Thank you.

I have made the changes but I leave the updated comments here. This comment seems to be more related to the context here instead of that new function. Could you please review it again? Thanks.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13406#discussion_r1162671106


More information about the hotspot-compiler-dev mailing list