RFR: 8296515: RISC-V: Small refactoring for MaxReductionV/MinReductionV/AddReductionV node implementation [v2]
Dingli Zhang
dzhang at openjdk.org
Wed Nov 9 06:47:45 UTC 2022
On Wed, 9 Nov 2022 06:42:43 GMT, Yanhong Zhu <yzhu at openjdk.org> wrote:
>>>
>>
>> I see that this has been fixed in the previous PR 8271515.
>> Approved.
>
>> Hi @yhzhu20, thanks for the review! I think this problem was solved in [4e7f606](https://github.com/openjdk/jdk/commit/4e7f606030d67a4f284c375d9c8811f525ae97fd) :
>>
>> ```diff
>> @@ -1105,7 +1145,9 @@ Node* ReductionNode::make_reduction_input(PhaseGVN& gvn, int opc, BasicType bt)
>> case Op_MinReductionV:
>> switch (bt) {
>> case T_BYTE:
>> + return gvn.makecon(TypeInt::make(max_jbyte));
>> case T_SHORT:
>> + return gvn.makecon(TypeInt::make(max_jshort));
>> case T_INT:
>> return gvn.makecon(TypeInt::MAX);
>> case T_LONG:
>> @@ -1120,7 +1162,9 @@ Node* ReductionNode::make_reduction_input(PhaseGVN& gvn, int opc, BasicType bt)
>> case Op_MaxReductionV:
>> switch (bt) {
>> case T_BYTE:
>> + return gvn.makecon(TypeInt::make(min_jbyte));
>> case T_SHORT:
>> + return gvn.makecon(TypeInt::make(min_jshort));
>> case T_INT:
>> return gvn.makecon(TypeInt::MIN);
>> case T_LONG:
>> ```
>>
>> The function "make_reduction_input" will return different types for Byte & Short than for int now.
>
> Understood. Thank you.
> >
>
> I see that this has been fixed in the previous PR 8271515. Approved.
Sorry, I didn't refresh the page in time, so I saw your message too late and repeated the same message.
-------------
PR: https://git.openjdk.org/jdk/pull/11036
More information about the hotspot-dev
mailing list