RFR: 8302652: [SuperWord] Reduction should happen after loop, when possible [v5]

Jatin Bhateja jbhateja at openjdk.org
Fri May 12 07:31:56 UTC 2023


On Fri, 12 May 2023 07:03:23 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Emanuel Peter has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   use is_counted and is_innermost
>
> src/hotspot/share/opto/loopopts.cpp line 4284:
> 
>> 4282:     // Create post-loop reduction.
>> 4283:     Node* last_accumulator = phi->in(2);
>> 4284:     Node* post_loop_reduction = ReductionNode::make_from_vopc(first_ur->Opcode(), nullptr, init, last_accumulator, bt);
> 
> Do you think that is necessary? After all I am just creating the same type of `ReductionNode` that I already replaced in the loop, right? If anything, we should guard this:
> https://github.com/openjdk/jdk/blob/31d977c21f7a2b62fb8123bc7967731aa961e373/src/hotspot/share/opto/loopopts.cpp#L4272
> 
> But what platform would support the reduction if it does not support the normal vector-op?
> 
> What do you think?

Yes, I think my comment just got misplaced , I meant we should guard the vector creation.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13056#discussion_r1192008931


More information about the hotspot-compiler-dev mailing list