RFR: 8273021: C2: Improve Add and Xor ideal optimizations [v3]
Yi Yang
yyang at openjdk.java.net
Fri Sep 10 02:27:42 UTC 2021
On Thu, 9 Sep 2021 06:24:23 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:
>> Yi Yang has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - dontinline
>> - more random
>
> test/hotspot/jtreg/compiler/c2/TestAddXorIdeal.java line 75:
>
>> 73:
>> 74: public static void main(String... args) {
>> 75: Random random = new Random();
>
> You should use `Utils.getRandomInstance()` from `import jdk.test.lib.Utils` to ensure that the seed is printed for reproducibility. You can check other tests for an example.
That does make sense. Changed.
> test/hotspot/jtreg/compiler/c2/TestAddXorIdeal.java line 77:
>
>> 75: Random random = new Random();
>> 76: int n = 0;
>> 77: long n1 = 0;
>
> Should be declared in the loop.
Do you mean declared within loop body? I've changed but it looks like a perference problem.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5266
More information about the hotspot-compiler-dev
mailing list