RFR: 8283307: Vectorize unsigned shift right on signed subword types [v3]

Vladimir Kozlov kvn at openjdk.java.net
Fri Jun 3 17:45:36 UTC 2022


On Fri, 3 Jun 2022 10:02:48 GMT, Fei Gao <fgao at openjdk.org> wrote:

>> Two questions @fg1417  :
>> 1. Is `RShiftVB` generated with `-XX:UseAVX=0 -XX:UseSSE=2` on x86?
>> 2. If the answer is no for question 1, why `TestVectorizeURShiftSubword.java` get passed?
>> Thanks.
>
>> Two questions @fg1417 :
>> 
>> 1. Is `RShiftVB` generated with `-XX:UseAVX=0 -XX:UseSSE=2` on x86?
>> 2. If the answer is no for question 1, why `TestVectorizeURShiftSubword.java` get passed?
>>    Thanks.
> 
> @DamonFool , no `RShiftB` nodes are generated with `-XX:UseAVX=0 -XX:UseSSE=2` on x86. The test passed because when adding VM options `-XX:UseAVX=0 -XX:UseSSE=2` externally, the IR framework won't do the IR check and just run the java code, I verified and made the guess. But I'm not clear whether all external VM options would stop the IR framework to do the IR check.

As @fg1417 pointed, IR framework will not do any IR verification testing (it does not run test) when some flags are passed to test and not whitelisted (`UseAVX` and `UseSSE` are not on list):
https://github.com/openjdk/jdk/blob/master/test/hotspot/jtreg/compiler/lib/ir_framework/TestFramework.java#L105

I hacked VM to set `UseSSE=2 UseAVX=0` and test failed as expected because it did not find `RShiftVB` as you said:

One or more @IR rules failed:
Failed IR Rules (2) of Methods (2)

With `UseSSE=4 UseAVX=0` combination test passed. Our testing systems don't have anything less than SSE4 CPUs. That is why it passed our testing. I assume Github actions don't have such old systems too. 

**I don't see these changes passed pre-submit GitHub testing. Make sure they passed.**

Currently there are changes in review #8999 which allow to specify CPU features as condition for testing method.

I suggest to leave test as it is (if pre-submit GitHub testing passed). If we hit any issues later we will use #8999 API to fix it.

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

PR: https://git.openjdk.java.net/jdk/pull/7979


More information about the hotspot-compiler-dev mailing list