RFR: 8325520: Vector loads with offsets incorrectly compiled [v4]

Damon Fenacci dfenacci at openjdk.org
Mon May 13 21:09:12 UTC 2024


On Tue, 7 May 2024 12:56:55 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

> * No mixed type test for load-store: Use MemorySegment `from/intoMmemorySegment`. Try something like store a int-vector, and load a float-vector.

It looks as if load/stores that use `from`/`intoMemorySegment` with different types apparently don’t create `LoadVector` nodes. It seems that `fromMemorySegment` tries to inline the `VectorSupport::load` intrinsic, but fails as the type of the vector and  the inferred type of the underlying memory segment differ: https://github.com/openjdk/jdk/blob/9b742109b196d79cbf712ffd3f64edd1d6497114/src/hotspot/share/opto/vectorIntrinsics.cpp#L1055-L1064

> * Mismatched vector length: store a vector of length 4, and load one of length 8.

I've added tests tests that store and load with different species (`SPECIES_64`).

> * Do some store-store and store-load cases where you the first and second are different loads/stores, i.e. one with and one without mask/offsets. E.g. `StoreVectorMasked` and `StoreVectorScatter` in a store-store test. Doing the total cross-product is probably too much, but a few examples would be a good start.

You're right, there were just very few of them. Added many more.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/18347#issuecomment-2108799572


More information about the hotspot-compiler-dev mailing list