RFR: 8302673: [SuperWord] MaxReduction and MinReduction should vectorize for int [v3]
Roberto Castañeda Lozano
rcastanedalo at openjdk.org
Fri Jun 2 07:18:09 UTC 2023
On Thu, 1 Jun 2023 10:29:30 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> Roberto Castañeda Lozano has updated the pull request incrementally with four additional commits since the last revision:
>>
>> - Complete test battery with remaining no-add cases
>> - Handle case without inner additions by restoring 'as_add_with_constant' to its previous state
>> - Add tests to exercise the case without inner additions
>> - Extract MinI/MaxI construction; pass around ConstAddOperands instead of individual components
>
> src/hotspot/share/opto/addnode.cpp line 1186:
>
>> 1184: Node* add_transformed = phase->transform(add_extracted);
>> 1185: Node* inner_other = inner_op->in(inner_add_index == 1 ? 2 : 1);
>> 1186: return build_min_max_int(add_transformed, inner_other, opcode == Op_MaxI);
>
> Did something prevent you from directly using `MaxNode::build_min_max`?
Technically I think that should be possible, but I find that extracting the core logic into a separate function is more readable (makes it straightforward to understand the effect of the call in `MaxNode::IdealI()`) and efficient (avoids a redundant application of `PhaseGVN::transform()` to the newly created `MinI`/`MaxI` nodes).
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13924#discussion_r1214010963
More information about the hotspot-compiler-dev
mailing list