RFR: 8342095: Add autovectorizer support for subword vector casts [v6]

Jasmine Karthikeyan jkarthikeyan at openjdk.org
Wed Apr 2 14:23:07 UTC 2025


On Fri, 21 Feb 2025 06:41:15 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Jasmine Karthikeyan has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision:
>> 
>>  - Merge branch 'master' into vectorize-subword
>>  - Address comments from review, refactor test
>>  - Add new conversions to benchmark
>>  - Fix some tests that now vectorize
>>  - Implement widening and address comments from review
>>  - Subword vectorization
>
> src/hotspot/share/opto/superwordVTransformBuilder.cpp line 194:
> 
>> 192: 
>> 193:     // If the use and def types are different, emit a cast node
>> 194:     if (use_bt != def_bt && !p0->is_Convert() && Matcher::is_vector_cast_supported(def_bt, use_bt)) {
> 
> The usual way we check if a vector instruction is implemented is to use `VectorNode::implemented`. Ah, actually there is a `VectorCastNode::implemented`. Why are you not using that one?

This is a good point! I've updated the patch to use `VectorCastNode::implemented` instead. I think I didn't see that function originally.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23413#discussion_r2024935268


More information about the hotspot-compiler-dev mailing list