RFR: 8308606: C2 SuperWord: remove alignment checks when not required [v3]
Pengfei Li
pli at openjdk.org
Fri Jun 9 02:16:41 UTC 2023
On Thu, 8 Jun 2023 12:38:51 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> @fg1417 you are right!
>>
>> I think we should also add `AlignVector` to the IR whitelist. It makes sense to add it with this change here, because only from now on can we actually have misaligned loads / stores on the same memory-slice! So we should also test things more thoroughly now.
>>
>> I also see that in `test/hotspot/jtreg/compiler/vectorization/runner/` a lot of tests have `@requires vm.flagless`. That means we actually do not check any flag combinations with those tests. I think we should file an RFE to make them more general, and add the requirements to the IR rules.
>
> Ok, there are some bugs around, I cannot yet directly add `AlignVector` to the IR framework whitelist. We can do it in a follow up RFE https://bugs.openjdk.org/browse/JDK-8309662
Hi @eme64, I'd like to explain more about the `@requires vm.flagless`. Vladimir Kozlov had suggested removing those annotations. I didn't do that before because those annotations cannot be simply removed. All tests under `compiler/vectorization/runner/` are used for both correctness check and vectorizability (IR) check. For correctness check, each test method is invoked twice and the return results from the interpreter and C2 compiled code are compared. We use compiler control via WhiteBox API from the test runner to force these methods running in interpreter and C2 (see the logic in `VectorizationTestRunner.java`). The force compilation would fail if some extra vm option of compiler control (such as `-Xint`) is specified.
A way of removing `@requires vm.flagless` I can think of may be skipping the correctness check in the vectorization test runner if the compiler control fails. I just filed [JDK-8309697](https://bugs.openjdk.org/browse/JDK-8309697) for this. Please let me know if you have any better ideas or suggestions.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14096#discussion_r1223758382
More information about the hotspot-compiler-dev
mailing list