RFR: 8267265: Use new IR Test Framework to create tests for C2 Ideal transformations
Cesar Soares
duke at openjdk.java.net
Mon Feb 14 20:45:18 UTC 2022
On Mon, 14 Feb 2022 07:26:47 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:
>> Hi, can I please get some reviews for this Pull Request? Here is a summary of the changes:
>>
>> - Add tests, using the new IR-based test framework, for several of the Ideal transformations on Add, Sub, Mul, Div, Loop nodes and some simple Scalar Replacement transformations.
>> - Add more default IR regex's to IR-based test framework.
>
> test/hotspot/jtreg/compiler/c2/irTests/AddLNodeIdealizationTests.java line 73:
>
>> 71: Asserts.assertEQ((a - b) + (b + c), test6(a, b, c));
>> 72: Asserts.assertEQ((a - b) + (c + b), test7(a, b, c));
>> 73: Asserts.assertEQ((a - b) + (c - a), test8(a, b, c));
>
> `AddI` additionally has
>
> Asserts.assertEQ((a - b) + (b - c), test8(a, b, c));
>
> Was this left out on purpose?
This is another transformation that is missing for "Long". Tracked by this RFE: https://bugs.openjdk.java.net/browse/JDK-8272735
> test/hotspot/jtreg/compiler/c2/irTests/SubLNodeIdealizationTests.java line 79:
>
>> 77: Asserts.assertEQ(a*b - b*c , test16(a, b, c));
>> 78: Asserts.assertEQ(a*c - b*c , test17(a, b, c));
>> 79: Asserts.assertEQ(a*b - c*a , test18(a, b, c));
>
> Some cases are missing compared to `SubI`. Did you omit them on purpose?
Yes, this transformation is actually missing for Long. I had created this RFE to fix that: https://bugs.openjdk.java.net/browse/JDK-8272735
-------------
PR: https://git.openjdk.java.net/jdk/pull/7434
More information about the hotspot-compiler-dev
mailing list