RFR: 8309697: [TESTBUG] Remove "@requires vm.flagless" from jtreg vectorization tests
Pengfei Li
pli at openjdk.org
Mon Jul 31 07:54:50 UTC 2023
On Thu, 27 Jul 2023 07:23:48 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:
>> This patch removes `@require vm.flagless` annotations from HotSpot jtreg tests in `compiler/vectorization/runner`. All jtreg cases in this folder are invoked by test driver `VectorizationTestRunner.java` which checks both correctness and vectorizability (IR) for each test method. We added flagless requirement before because extra flags may mess with compiler control in the test driver for correctness check. But `flagless` has a side effect that it makes tests with extra flags skipped. So we propose to get rid of it now.
>>
>> To adapt the removal of `@require vm.flagless`, a few checks are added in the test driver to skip the correctness check if extra flags make the compiler control not work. This patch also moves previously hard-coded flag `-XX:-OptimizeFill` in the test driver to conditions in IR checks.
>>
>> Tested various of compiler control related VM flags on x86 and AArch64.
>
> `LoopArrayIndexComputeTest.java` fails on x64 with `-XX:UseAVX=0 -XX:UseSSE=3` and with `-XX:UseAVX=0 -XX:UseSSE=2`:
>
>
> Failed IR Rules (1) of Methods (1)
> ----------------------------------
> 1) Method "public byte[] compiler.vectorization.runner.LoopArrayIndexComputeTest.byteArrayWithDependencePos()" - [Failed IR rules: 1]:
> * @IR rule 1: "@compiler.lib.ir_framework.IR(applyIfCPUFeatureAnd={}, phase={DEFAULT}, applyIfCPUFeatureOr={"asimd", "true", "sse2", "true"}, applyIf={"AlignVector", "false"}, applyIfCPUFeature={}, counts={"_#STORE_VECTOR#_", ">0"}, failOn={}, applyIfAnd={}, applyIfOr={}, applyIfNot={})"
> > Phase "PrintIdeal":
> - counts: Graph contains wrong number of nodes:
> * Constraint 1: "(\\d+(\\s){2}(StoreVector.*)+(\\s){2}===.*)"
> - Failed comparison: [found] 0 > 0 [given]
> - No nodes matched!
Hi @TobiHartmann ,
> `LoopArrayIndexComputeTest.java` fails on x64 with `-XX:UseAVX=0 -XX:UseSSE=3` and with `-XX:UseAVX=0 -XX:UseSSE=2`:
I just tried this on multiple x86 machines we have but didn't reproduce the failure. Could you share more info (cpu features, etc.) of your test machine so I can find why the test method is not vectorized.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/15011#issuecomment-1657856117
More information about the hotspot-compiler-dev
mailing list