RFR: 8340079: Modify rearrange/selectFrom Vector API methods to perform wrapIndexes instead of checkIndexes
Jatin Bhateja
jbhateja at openjdk.org
Fri Sep 13 19:09:04 UTC 2024
On Fri, 13 Sep 2024 18:24:04 GMT, Sandhya Viswanathan <sviswanathan at openjdk.org> wrote:
>> src/hotspot/share/opto/vectorIntrinsics.cpp line 2206:
>>
>>> 2204: const Type * byte_bt = Type::get_const_basic_type(T_BYTE);
>>> 2205: const TypeVect * byte_vt = TypeVect::make(byte_bt, num_elem);
>>> 2206: Node* byte_shuffle = gvn().transform(VectorCastNode::make(cast_vopc, v1, T_BYTE, num_elem));
>>
>> We can be optimal here and prevent down casting and subsequent load shuffles in applicable scenarios, e.g. indexes held in integral vectors.
>
> @jatin-bhateja If you could expand on this comment with specific cases it will be helpful. The loadShuffle generation is needed for platform specific handling of shuffles and cannot be optimized out here.
Hi @sviswa7, I was suggesting emitting toShuffle() + toVector() only if it's needed under a target specific hook, since indexes are anyways passed though vector. Please let me know if you find blow explanation too constraining.
https://github.com/openjdk/jdk/pull/20508#issuecomment-2349801299
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20634#discussion_r1759345567
More information about the core-libs-dev
mailing list