RFR: 8259948: Aarch64: Add cast nodes for Aarch64 Neon backend [v2]
Wu Yan
wuyan at openjdk.java.net
Tue Aug 10 11:54:40 UTC 2021
On Tue, 10 Aug 2021 09:16:25 GMT, Andrew Haley <aph at openjdk.org> wrote:
>> src/hotspot/cpu/aarch64/aarch64_neon.ad line 195:
>>
>>> 193: // If registers are the same, no register move is required - the
>>> 194: // upper bits of "src" are expected to have been initialized
>>> 195: // to zero.
>>
>> I have a little concern about this assumption. How to ensure the upper bits are zero? Since the `ReinterpretNode` could be used separately and not always with `CastNode` together. E.g
>>
>> https://github.com/openjdk/jdk/blob/jdk-18%2B9/src/hotspot/share/opto/vectorIntrinsics.cpp#L844
>
> There are several places in the AArch64 back end where we expect the upper bits of a register to be zero, but we've never depended on it. This is not a good time to start, so let's clear the bits in order to be certain.
This is the same as reinterpretD2X. The upper 96 bits of "src" are zero, I guess it is because when the 128-bit register is initialized, the upper 96 bits will be zeroed, and only its lower 32-bit data will be manipulated later.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4839
More information about the hotspot-compiler-dev
mailing list