RFR: 8309697: [TESTBUG] Remove "@requires vm.flagless" from jtreg vectorization tests

Pengfei Li pli at openjdk.org
Wed Aug 2 08:55:55 UTC 2023


On Mon, 31 Jul 2023 19:55:19 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> `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.
> 
> The test has Byte multiply operation but it checks only presence of SSE2:
> ``
> @IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true"},
> ...
> res[i] *= bytes[i + 3];
> ``
> But we don't support it with SSE < 4 - see `Matcher::match_rule_supported()`.
> 
> `vm.flagless` prevented running it before with such flags combination.
> 
> I am not sure how your testing passed.

Hi @vnkozlov , I re-worked the correctness check in my latest commit. This time we get reference results from C1 execution so we can allow "-Xbatch" and remove the time-based check now. But we have to add another check of tiered compilation for C1 execution. The failed case is also fixed in my latest commit. Could you help re-review?

-------------

PR Comment: https://git.openjdk.org/jdk/pull/15011#issuecomment-1661805054


More information about the hotspot-compiler-dev mailing list