RFR: 8319111: Mismatched MemorySegment heap access is not consistently intrinsified [v2]
Jatin Bhateja
jbhateja at openjdk.org
Fri Dec 1 21:54:33 UTC 2023
On Fri, 1 Dec 2023 21:28:14 GMT, Sandhya Viswanathan <sviswanathan at openjdk.org> wrote:
>> Yes, that's what the intent is, for masked versions we operate at byte granularity to support widening and narrowing case e.g. loading masked float vector from a double memory segment, mask bit is in accordance with float type, but cannot be directly reflected over double lanes.
>
> Using byte type to write irrespective of memory segment type would work on little endian architectures but not on big endian architectures. On big endian the memory load/store should use the associated memory segment element type so a reinterpret node is needed as is done in non masked case.
> Alternatively at the minimum a check that the underlying architecture is little endian would be good to add for the masked intrinsic to succeed for the new cases. I think something like ((Endian::NATIVE == Endian::LITTLE) would do that.
Any rearrangement for endianness is done prior to storing or after loading data into vectors. So actual load / store operations is agnostic to target endianness.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16888#discussion_r1412602738
More information about the hotspot-compiler-dev
mailing list