RFR: 8320725: C2: Add "requires_strict_order" flag for floating-point add-reduction [v8]
Bhavana Kilambi
bkilambi at openjdk.org
Mon May 13 12:10:10 UTC 2024
On Mon, 13 May 2024 10:22:12 GMT, Bhavana Kilambi <bkilambi at openjdk.org> wrote:
>>> I am not sure if I fully understand what's expected in the JTREG tests. Should I be verifying the -XX:+PrintIdeal output to make sure the correct message is being printed for the ReductionV* nodes?
>>
>> Yes, the IR framework basically does regex matching against the PrintIdeal graph. For example: `counts = {IRNode.STORE_VECTOR, ">0"}` in the `@IR` rule executes the regex for the store vector, and checks if we find more than zero occurances.
>>
>> Maybe you can just use a regex string directly for your special IR rule. Alternatively, you could have them in the `IRNode` class, but not sure that's worth it.
>
> @eme64 Thanks for the clarification. I understand the usage of `counts` in the IR tests. Just that I got a bit confused by some of your earlier statements. We do actually have a test to make sure AddReductionVF/VD and MulReductionVF/VD are not generated on aarch64 NEON machines - `test/hotspot/jtreg/compiler/c2/irTests/TestDisableAutoVectOpcodes.java`. I can modify this test to include UseSVE > 0 case as well and will also add a separate JTREG test for the VectorAPI tests. Hope that's ok..
> @Bhavana-Kilambi I know we have the tests in `test/hotspot/jtreg/compiler/c2/irTests/TestDisableAutoVectOpcodes.java`, and some other reduction tests. But these do not do the specific think I would like to see.
>
> I would like this:
>
> * Add `no_strict_order` vs `requires_strict_order` or similar to `dump_spec`.
>
> * IR match not just that there is the correct `ReductionNode`, but also that it has the `no_strict_order` or `requires_strict_order` in its dump. You can do that by using a custom regex string, rather than `IRNode.STORE_VECTOR` or similar.
>
> * Then, create different tests, some where we expect ordered, some unordered vectors. Use Vector API and SuperWord examples.
>
>
> Does that make sense?
Yes, I am doing exactly that. Just that for the superword(auto-vec) case, I am just modifying the AddReduction related tests in `TestDisableAutoVectOpcodes.java` to incorporate the case with UseSVE > 0 as well and match the regex as per the dump_spec output.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/18034#issuecomment-2107401404
More information about the hotspot-compiler-dev
mailing list