RFR: 8308994: C2: Re-implement experimental post loop vectorization [v2]
Emanuel Peter
epeter at openjdk.org
Mon Jul 3 14:40:19 UTC 2023
On Mon, 3 Jul 2023 14:34:00 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> Pengfei Li has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Address part of comments from Emanuel
>
> src/hotspot/share/opto/vmaskloop.cpp line 978:
>
>> 976:
>> 977: // Update loop increment/decrement to the vector mask true count
>> 978: Node* true_cnt = new VectorMaskTrueCountNode(root_vmask, TypeInt::INT);
>
> This seems expensive to have to use inside the loop. Is there a way we could move this outside the loop? Because if we do take the backedge then we know that we have to take the full `stride`, right?
I guess you would have to separate out the loop-internal uses and the outside uses of the `incr`. The inside uses would use the `stride` (or is there an exception?) and the outside ones could use the `VectorMaskTrueCountNode`.
Doing something like that could have better performance.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14581#discussion_r1250976621
More information about the hotspot-compiler-dev
mailing list