RFR: 8284564: Extend VectorAPI validation tests for SHIFTs and ROTATE operations with constant shift values.

Paul Sandoz psandoz at openjdk.java.net
Tue Apr 12 17:40:43 UTC 2022


On Mon, 11 Apr 2022 14:28:07 GMT, Swati Sharma <duke at openjdk.java.net> wrote:

> Hi All,
> 
> Patch adds missing tests for following shifts and rotates operations with constant shift argument.
> -  VectorOperations.LSHR
> -  VectorOperations.ASHR
> -  VectorOperations.LSHL
> -  VectorOperations.ROR
> -  VectorOperations.ROL
> 
> While identifying a test point for JDK-8280976 we found such cases were missing from existing vector API test suite. Kindly review and share your feedback.
> 
> Thanks,
> Swati Sharma
> Runtime Software Development Engineer 
> Intel

test/jdk/jdk/incubator/vector/gen-template.sh line 447:

> 445: gen_binary_alu_op "ROL" "ROL_scalar(a,b)" "BITWISE"
> 446: gen_shift_op  "ROR" "ROR_scalar(a,b)" "BITWISE"
> 447: gen_shift_op  "ROL" "ROL_scalar(a,b)" "BITWISE"

Suggestion:

gen_shift_op  "ROR" "ROR_scalar(a, b)" "BITWISE"
gen_shift_op  "ROL" "ROL_scalar(a, b)" "BITWISE"

test/jdk/jdk/incubator/vector/gen-template.sh line 456:

> 454: gen_shift_cst_op  "ASHR" "(a >> CONST_SHIFT)" "BITWISE"
> 455: gen_shift_cst_op  "ROR" "ROR_scalar(a,CONST_SHIFT)" "BITWISE"
> 456: gen_shift_cst_op  "ROL" "ROL_scalar(a,CONST_SHIFT)" "BITWISE"

Suggestion:

gen_shift_cst_op  "ROR" "ROR_scalar(a, CONST_SHIFT)" "BITWISE"
gen_shift_cst_op  "ROL" "ROL_scalar(a, CONST_SHIFT)" "BITWISE"

test/jdk/jdk/incubator/vector/templates/Unit-Shift-Masked-Const-op.template line 2:

> 1:     @Test(dataProvider = "$type$UnaryOpMaskProvider")
> 2:     static void [[TEST]]$vectorteststype$ScalarShiftMaskedConst(IntFunction<$type$[]> fa,

Use `[[KERNEL]]` ?

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

PR: https://git.openjdk.java.net/jdk/pull/8180


More information about the hotspot-compiler-dev mailing list