RFR: 8139457: Array bases are aligned at HeapWord granularity [v33]
Fei Gao
fgao at openjdk.org
Thu Aug 17 02:52:54 UTC 2023
On Wed, 16 Aug 2023 16:19:57 GMT, Roman Kennke <rkennke at openjdk.org> wrote:
> Still, there may be some subtle alignment differences now. The offsets are moved by 4 bytes for some types. That could have some impact on what vectorizes when `-XX:+AlignVector` or on platforms where `Matcher::misaligned_vectors_ok() = false`. But that is probably not bad enough to block this change here. What do you think @fg1417 @vnkozlov ?
Yes. And, even on platforms supporting unaligned vector operations, like `AlignVector = false` or `Matcher::misaligned_vectors_ok() = true`, the offset change of the first entry may have impact on the pre-loop limit, because superword always requires that the load/store reference locating position zero in the vector should be aligned with vector length, see the algorithm in [align_initial_loop_index](https://github.com/openjdk/jdk/blob/0c3bc71d24fa13a0b1e55541c01554cd5e124027/src/hotspot/share/opto/superword.cpp#L3638). Well, the impact may vary in machines with different vector lengths. Thanks.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/11044#issuecomment-1681530684
More information about the hotspot-dev
mailing list