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

Emanuel Peter epeter at openjdk.org
Thu Feb 13 10:16:15 UTC 2025


On Thu, 13 Feb 2025 10:06:04 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Jasmine Karthikeyan has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Add new conversions to benchmark
>
> src/hotspot/share/opto/vtransform.hpp line 537:
> 
>> 535:   virtual VTransformApplyResult apply(const VLoopAnalyzer& vloop_analyzer,
>> 536:                                       const GrowableArray<Node*>& vnode_idx_to_transformed_node) const override;
>> 537:   NOT_PRODUCT(virtual const char* name() const override { return "Cast"; };)
> 
> Suggestion:
> 
>   NOT_PRODUCT(virtual const char* name() const override { return "CastVector"; };)

I know the node is not inheriting from `VTransformVectorNode`, but we can make that happen with a future refactoring I'm already working on.

> test/hotspot/jtreg/compiler/loopopts/superword/TestCompatibleUseDefTypeSize.java line 333:
> 
>> 331:         applyIfPlatform = {"64-bit", "true"},
>> 332:         applyIf = {"AlignVector", "false"},
>> 333:         applyIfCPUFeature = {"avx", "true"})
> 
> This may be a little nit-picky. But why have a new test-file when this test here was already trying to cover the conversion cases? I think I wrote it back then, and was just too lazy to write all conversion cases. I'd suggest you move your cases up here ;)

I think I added these tests when I was reworking `SuperWord::is_velt_basic_type_compatible_use_def`, which you are now touching as well 😊

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

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


More information about the hotspot-compiler-dev mailing list