RFR: 8286847: Rotate vectors don't support byte or short [v2]
Quan Anh Mai
duke at openjdk.java.net
Wed May 18 03:03:46 UTC 2022
On Tue, 17 May 2022 08:46:21 GMT, Eric Liu <eliu at openjdk.org> wrote:
>> Yes, `rotateLeftRes` is duplicated with `testRotateLeft`. But compile only `testRotateLeft`, and then compare the result between the two function. Could you give me some suggestions ? How should I modify this ?
>
> Two options off the top of my head:
>
> a) With `-Xcomp`, hardcode the expected values which are calculated by interpreter or just by hand and compared with the results of C2.
>
> b) With `-XX:-TieredCompilation`, generate the expected results if the method was not hot enough to compiled by C2. Then compared with C2 results, which can be got when the iteration count is more than 10K. Please refer to https://github.com/openjdk/jdk/pull/5403/files/71aa6ac439b67b27828e9aabe51845fa34602837#diff-d14ca09ba5fa806904a4db333037a14621cfeba81505ba369a375c57bd90c7a8 for more detail.
>
> Option a) is much more simpler. Option b) can verify more random values.
You can tell the compiler to only compile the tested methods by using the `-XX:CompileCommand`, the other methods will only run in interpreter mode. As a result, although they look the same their real executions are completely different. Thanks.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8740
More information about the hotspot-compiler-dev
mailing list