-
Bug
-
Resolution: Duplicate
-
P4
-
repo-panama
-
x86
-
generic
Reproducer:
```
public class VectorMaskToLong {
static final VectorSpecies<Integer> SPECIES = IntVector.SPECIES_128;
static long maskFromToLongInt128VectorTest(long inputLong) {
var vmask = VectorMask.fromLong(SPECIES, inputLong);
return vmask.toLong();
}
static long expected(long inputLong) {
return inputLong & (((1L << (SPECIES.length() - 1)) << 1) - 1);
}
public static void main(String[] args) {
for (int i = 0; i < 100000; i++) {
long res = maskFromToLongInt128VectorTest(-1);
long exp = expected(-1);
if (res != exp) {
System.err.println("Failure: res = " + res + " exp = " + exp);
System.exit(-1);
}
}
}
}
```
```
public class VectorMaskToLong {
static final VectorSpecies<Integer> SPECIES = IntVector.SPECIES_128;
static long maskFromToLongInt128VectorTest(long inputLong) {
var vmask = VectorMask.fromLong(SPECIES, inputLong);
return vmask.toLong();
}
static long expected(long inputLong) {
return inputLong & (((1L << (SPECIES.length() - 1)) << 1) - 1);
}
public static void main(String[] args) {
for (int i = 0; i < 100000; i++) {
long res = maskFromToLongInt128VectorTest(-1);
long exp = expected(-1);
if (res != exp) {
System.err.println("Failure: res = " + res + " exp = " + exp);
System.exit(-1);
}
}
}
}
```
- duplicates
-
JDK-8274569 X86 backend related incorrectness issues in legacy store mask patterns
-
- Resolved
-
- relates to
-
JDK-8273949 Intrinsic creation for VectorMask.toLong operation.
-
- Resolved
-
- links to
-
Review openjdk/panama-vector/138