-
Bug
-
Resolution: Fixed
-
P3
-
16, 17, 21.0.1, 23
-
b25
-
generic
-
generic
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8333160 | 21.0.5-oracle | Tobias Hartmann | P3 | Closed | Fixed | b01 |
JDK-8334846 | 21.0.5 | Martin Doerr | P3 | Resolved | Fixed | b01 |
Using WSL on Windows 11
java --version
java 21.0.1 2023-10-17 LTS
Java(TM) SE Runtime Environment (build 21.0.1+12-LTS-29)
Java HotSpot(TM) 64-Bit Server VM (build 21.0.1+12-LTS-29, mixed mode, sharing)
A DESCRIPTION OF THE PROBLEM :
Loading a Vector using an offset map doesn't always work correctly once compiled. The data isn't loaded at all (there is no gather instruction in the outputted assembly), but instead another Vector seems incorrectly aliased.
After ~110k loop iterations a single buggy iteration is run, and then starting at iteration ~185k a different buggy iteration is switched to.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the program below
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
(no output)
ACTUAL -
111142
[1, 1, 1, 1]
[1, 1, 1, 1]
[1, 1, 1, 1]
184869
[1, 1, 1, 1]
[1, 1, 1, 1]
[0, 0, 0, 0]
184870
[1, 1, 1, 1]
[1, 1, 1, 1]
[0, 0, 0, 0]
184871
[1, 1, 1, 1]
[1, 1, 1, 1]
[0, 0, 0, 0]
....
---------- BEGIN SOURCE ----------
import jdk.incubator.vector.LongVector;
class Bug {
public static void main(String[] args) {
final long[] storage = new long[8];
final int[] offsets = new int[]{4, 5, 6, 7};
final LongVector ones = LongVector.broadcast(LongVector.SPECIES_256, 1);
for (int i = 0 ; i < (1 << 30); i++) {
ones.intoArray(storage, 0);
LongVector a = LongVector.fromArray(LongVector.SPECIES_256, storage, 0, offsets, 0);
LongVector b = LongVector.fromArray(LongVector.SPECIES_256, storage, 0, offsets, 0);
if (ones.equals(a) || ones.equals(b)) {
System.out.println(i);
System.out.println(ones);
System.out.println(a);
System.out.println(b);
}
}
}
}
---------- END SOURCE ----------
- backported by
-
JDK-8334846 Vector loads and stores with indices and masks incorrectly compiled
- Resolved
-
JDK-8333160 Vector loads and stores with indices and masks incorrectly compiled
- Closed
- relates to
-
JDK-8333099 Missing check for is_LoadVector in StoreNode::Identity
- Resolved
-
JDK-8302459 Missing late inline cleanup causes compiler/vectorapi/VectorLogicalOpIdentityTest.java IR failure
- In Progress
-
JDK-8333248 VectorGatherMaskFoldingTest.java failed when maximum vector bits is 64
- Resolved
- links to
-
Commit openjdk/jdk21u-dev/487b29d7
-
Commit openjdk/jdk/0c934ff4
-
Review openjdk/jdk21u-dev/768
-
Review openjdk/jdk/18347