From 42401e2d84d84924bb7fa117aff996503cc4599e Mon Sep 17 00:00:00 2001 From: Emanuel Peter Date: Wed, 14 Jan 2026 09:55:12 +0100 Subject: [PATCH] mask compress for Paul --- .../jtreg/compiler/vectorization/TestVectorAlgorithms.java | 4 ++-- .../jtreg/compiler/vectorization/VectorAlgorithmsImpl.java | 2 +- .../org/openjdk/bench/vm/compiler/VectorAlgorithmsImpl.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/hotspot/jtreg/compiler/vectorization/TestVectorAlgorithms.java b/test/hotspot/jtreg/compiler/vectorization/TestVectorAlgorithms.java index fe32d73b248..2b026b15385 100644 --- a/test/hotspot/jtreg/compiler/vectorization/TestVectorAlgorithms.java +++ b/test/hotspot/jtreg/compiler/vectorization/TestVectorAlgorithms.java @@ -456,9 +456,9 @@ public class TestVectorAlgorithms { @IR(counts = {IRNode.LOAD_VECTOR_I, "> 0", IRNode.VECTOR_MASK_CMP, "> 0", IRNode.VECTOR_TEST, "> 0", - IRNode.VECTOR_LONG_TO_MASK, "> 0", + IRNode.COMPRESS_VI, "> 0", IRNode.STORE_VECTOR_MASKED, "> 0"}, - applyIfCPUFeature = {"avx", "true"}) + applyIfCPUFeature = {"avx2", "true"}) public Object filterI_VectorAPI(int[] a, int[] r, int threshold) { return VectorAlgorithmsImpl.filterI_VectorAPI(a, r, threshold); } diff --git a/test/hotspot/jtreg/compiler/vectorization/VectorAlgorithmsImpl.java b/test/hotspot/jtreg/compiler/vectorization/VectorAlgorithmsImpl.java index 57638bc350a..78023011e9c 100644 --- a/test/hotspot/jtreg/compiler/vectorization/VectorAlgorithmsImpl.java +++ b/test/hotspot/jtreg/compiler/vectorization/VectorAlgorithmsImpl.java @@ -358,7 +358,7 @@ public class VectorAlgorithmsImpl { var mask = v.compare(VectorOperators.GE, thresholds); v = v.compress(mask); int trueCount = mask.trueCount(); - var prefixMask = VectorMask.fromLong(SPECIES_I, (1L << trueCount) - 1); + var prefixMask = mask.compress(); v.intoArray(r, j, prefixMask); j += trueCount; } diff --git a/test/micro/org/openjdk/bench/vm/compiler/VectorAlgorithmsImpl.java b/test/micro/org/openjdk/bench/vm/compiler/VectorAlgorithmsImpl.java index 1739f2fe799..0117709a29f 100644 --- a/test/micro/org/openjdk/bench/vm/compiler/VectorAlgorithmsImpl.java +++ b/test/micro/org/openjdk/bench/vm/compiler/VectorAlgorithmsImpl.java @@ -358,7 +358,7 @@ public class VectorAlgorithmsImpl { var mask = v.compare(VectorOperators.GE, thresholds); v = v.compress(mask); int trueCount = mask.trueCount(); - var prefixMask = VectorMask.fromLong(SPECIES_I, (1L << trueCount) - 1); + var prefixMask = mask.compress(); v.intoArray(r, j, prefixMask); j += trueCount; }