mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 12:09:14 +00:00
mask compress for Paul
This commit is contained in:
parent
c057462bee
commit
42401e2d84
@ -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);
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user