8381452: TestMultiplyReductionByte.java: Update the IR test on AArch64 for vector length above 128 bits

Reviewed-by: erfang, epeter, aph
This commit is contained in:
Hao Sun 2026-04-26 22:46:38 +00:00
parent eb9a8ab5c5
commit 52ca2981a6

View File

@ -35,7 +35,7 @@ import jdk.test.lib.Utils;
/**
* @test
* @bug 8378250
* @bug 8378250 8381452
* @summary Verify correctness of byte vector MUL reduction across all species.
* A register aliasing bug in mulreduce32B caused the upper half of
* sign-extended data to overwrite the source, producing wrong results
@ -93,8 +93,13 @@ public class TestMultiplyReductionByte {
@Test
@IR(counts = {IRNode.MUL_REDUCTION_VI, ">=1"},
applyIfCPUFeatureOr = {"avx2", "true", "asimd", "true", "rvv", "true"},
applyIfCPUFeatureOr = {"avx2", "true", "rvv", "true"},
applyIf = {"MaxVectorSize", ">=32"})
@IR(counts = {IRNode.MUL_REDUCTION_VI, "0"},
applyIfCPUFeature = {"asimd", "true"},
applyIf = {"MaxVectorSize", ">=32"})
// AArch64 currently does not vectorize vectors larger than 128 bits, and
// that may change in the future.
static byte testMulReduce256() {
return ByteVector.fromArray(ByteVector.SPECIES_256, input, 0)
.reduceLanes(VectorOperators.MUL);
@ -111,8 +116,13 @@ public class TestMultiplyReductionByte {
@Test
@IR(counts = {IRNode.MUL_REDUCTION_VI, ">=1"},
applyIfCPUFeatureOr = {"avx512f", "true", "asimd", "true", "rvv", "true"},
applyIfCPUFeatureOr = {"avx512f", "true", "rvv", "true"},
applyIf = {"MaxVectorSize", ">=64"})
@IR(counts = {IRNode.MUL_REDUCTION_VI, "0"},
applyIfCPUFeature = {"asimd", "true"},
applyIf = {"MaxVectorSize", ">=64"})
// AArch64 currently does not vectorize vectors larger than 128 bits, and
// that may change in the future.
static byte testMulReduce512() {
return ByteVector.fromArray(ByteVector.SPECIES_512, input, 0)
.reduceLanes(VectorOperators.MUL);