On Sat, 21 Feb 2026 07:55:02 GMT, Yasumasa Suenaga <[email protected]> wrote:

>> I ran following code with `-Djdk.incubator.vector.DEBUG=true`, however it 
>> was not intrinsified.
>> 
>> 
>>   public static void cos(){
>>     var rand = new Random();
>>     for(int i = 0; i < 1_000_000; i++){
>>       var vec = DoubleVector.fromArray(DoubleVector.SPECIES_256, 
>> rand.doubles().limit(4).toArray(), 0);
>> 
>>       vec.lanewise(VectorOperators.COS);
>>     }
>>   }
>> 
>> 
>> I knew `__jsvml_cos4_ha_l9()` in libjsvml.so should be called in this case 
>> (via vector debug log), but it was not hitted even though I set breakpoint 
>> in it.
>> 
>> `LaneType` has been introduced in 
>> [JDK-8376187](https://bugs.openjdk.org/browse/JDK-8376187), and 
>> `LibraryCallKit::inline_vector_call()` was updated to handle lane type 
>> rather than class of element type. However `VectorMathLibrary` wasn't 
>> modified.
>> 
>> I confirmed `__jsvml_cos4_ha_l9()` is called with this fix, and also all 
>> jdk/jdk/incubator/vector jtreg tests passed on Linux AMD64.
>
> Yasumasa Suenaga has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Add test

Can you move the test to `test/hotspot/jtreg/compiler/vectorapi`? Also I 
believe we can expand to include coverage on neon/sve (which will use the 
SLEEF) library.

test/hotspot/jtreg/compiler/lib/ir_framework/IRNode.java line 1481:

> 1479:     }
> 1480: 
> 1481:     public static final String CALL_LEAF_VECTOR = PREFIX + 
> "CALL_LEAF_VECTOR" + POSTFIX;

Recommend you add a comment above say something like:

// Can only be used if libjsvml or libsleef is available

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

PR Review: https://git.openjdk.org/jdk/pull/29835#pullrequestreview-3851219488
PR Review Comment: https://git.openjdk.org/jdk/pull/29835#discussion_r2850204608

Reply via email to