On Tue, 1 Oct 2024 18:10:10 GMT, Sandhya Viswanathan <[email protected]> 
wrote:

>> Jatin Bhateja has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Review comments resolutions.
>
> src/hotspot/share/opto/vectorIntrinsics.cpp line 2797:
> 
>> 2795: 
>> 2796:   Node* operation = lowerSelectFromOp ?
>> 2797:                       LowerSelectFromTwoVectorOperation(gvn(), opd1, 
>> opd2, opd3, vt) :
> 
> Thanks for bringing the lowering right here. It opens up an optimization 
> opportunity: currently for float/double we have two casts for index (e.g. 
> from float -> int at line 2786 and from int -> byte at line 2661 as part of 
> LowerSelectFromTwoVectorOperation. Could this be done by one cast?

This is not sub-optimal, Float to sub-word cast is two step process where we 
first convert float value to integer following by integer down casting to 
sub-word. So resulting JIT code will still be same if we directly emit F2X or 
the way its handled currently. All existing targets support F2X take this 
route. But its good to be safe.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20508#discussion_r1785634731

Reply via email to