RFR: 8319111: Mismatched MemorySegment heap access is not consistently intrinsified [v2]
Sandhya Viswanathan
sviswanathan at openjdk.org
Fri Dec 1 21:30:35 UTC 2023
On Fri, 1 Dec 2023 08:36:18 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:
>> The non masked load/store is doing that but the masked load/store is using T_BYTE.
>
> 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.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16888#discussion_r1412588376
More information about the hotspot-compiler-dev
mailing list