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

Emanuel Peter epeter at openjdk.org
Tue May 7 12:59:57 UTC 2024


On Mon, 6 May 2024 15:20:23 GMT, Damon Fenacci <dfenacci at openjdk.org> wrote:

>> Nice, ah you are right, there can be issues with mask-only cases as well!
>> 
>> It would be great if you had tests that exactly exercise these "bad" examples, where it looks like we might optimize, but it would be wrong.
>> 
>> I'll look at your `store_Opcode` changes now...
>
>> It would be great if you had tests that exactly exercise these "bad" examples, where it looks like we might optimize, but it would be wrong.
> 
> Yep, good idea. I've added a few tests to check for those cases (load-store with duplicate offsets and  store-load with masks). Thanks @eme64!

@dafedafe
I also scanned quickly over the regression tests. I see at least two aspects missing:
- No mixed type test for load-store: Use MemorySegment `from/intoMmemorySegment`. Try something like store a int-vector, and load a float-vector.
- Mismatched vector length: store a vector of length 4, and load one of length 8.

I think all of these are currently correctly handled by your `vect_type` checks in the VM code, but it would be good to see that they are covered by regression tests, in case someone messes this up in the future.

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

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


More information about the hotspot-compiler-dev mailing list