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

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


On Fri, 21 Mar 2025 09:43:14 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> @eme64 I think it should be good for another look over! I've addressed your review comments in the last commit.
>> 
>> About the potential for performance degradation, I think it would be unlikely since the code generated by the cast is quite small (as it only needs to truncate or sign-extend) and the patch increases the amount of possible code that can auto-vectorize. The one case that I can think of is that it might cause code that would be otherwise unprofitable to become vectorizable, but that would be because we don't have a cost model yet.
>
> @jaskarth Let me know if there is anything we can help you with here :)

@eme64 Apologies for the delay! I've updated the patch to use `VectorCastNode::implemented` as suggested instead of manually implementing the logic, which simplifies the patch and provides implementations on other platforms, which I left out initially as I wasn't familiar with them. Let me know what you think!

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

PR Comment: https://git.openjdk.org/jdk/pull/23413#issuecomment-2772738167


More information about the hotspot-compiler-dev mailing list