RFR: 8303762: Optimize vector slice operation with constant index using VPALIGNR instruction [v13]

Jatin Bhateja jbhateja at openjdk.org
Tue Feb 17 10:43:25 UTC 2026


On Tue, 17 Feb 2026 04:56:54 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:

> > What you are asking for is a bigger generic change which can be taken up as a separate RFE once this is committed.
> 
> I think there is no need to rush this functionality, and this will become unnecessary when `TypeVect` can track const-ness of the value, so we should not proceed with this change.

Slice operations are used in simdjson UtfValidator and its better to push this patch rather than holding it for some future optimization.
https://github.com/simdjson/simdjson-java/pull/68

>> Hi @merykitty , Intrinsicification failure due to any such reason is same with and without this patch, in case of slice intrinsic failure we simply inline the fallback implementation which is comprised of vector APIs, VectorSupport* entry points of APIs should then go through intrinsification attempts independently and may succeeded or fail if constraints are not met.
>
> `CallStaticJavaNode::Ideal` will enqueue the call for incremental inline again when it is invoked. That means if the method fails to get intrinsified at first, then its arguments constant-fold, then the intrinsification may succeed upon retry.

I think there is no harm in-lining fallback after first un-successful attempt of intrinsification for sliceOp, as fallback is composed of vectorAPI and we are giving them opportunity for intrinsificaiton, this save costly boxing operation and performance will be at par with what we have today.  WDYT ?

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

PR Comment: https://git.openjdk.org/jdk/pull/24104#issuecomment-3913817406
PR Review Comment: https://git.openjdk.org/jdk/pull/24104#discussion_r2816261630


More information about the core-libs-dev mailing list