RFR: 8310190: C2 SuperWord: AlignVector is broken, generates misaligned packs [v3]
Emanuel Peter
epeter at openjdk.org
Wed Oct 11 14:31:05 UTC 2023
On Fri, 6 Oct 2023 23:40:28 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:
>> Emanuel Peter has updated the pull request incrementally with one additional commit since the last revision:
>>
>> fix up TestVectorizationMismatchedAccess.java
>
> src/hotspot/share/opto/compile.cpp line 3672:
>
>> 3670: #ifdef AMD64
>> 3671: // Add VerifyAlignment node between adr and load / store.
>> 3672: if (AlignVector && VerifyAlignVector) {
>
> You should check only VerifyAlignVector here. In `CompilerConfig::check_args_consistency()` you need to check that VerifyAlignVector could be set to true only if AlignVector is true. See PostLoopMultiversioning as example there. Don't forget #ifdef ASSERT there.
`CompilerConfig::check_args_consistency()` seems to be too late. The reason is that `AlignVector` can still be changed by `VM_Version::get_processor_features` because of `UseUnalignedLoadStores`.
@vnkozlov do you have any other suggestion where to do this - ie when all the flags are final?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14785#discussion_r1355103417
More information about the hotspot-compiler-dev
mailing list