-
Enhancement
-
Resolution: Unresolved
-
P4
-
22, 23
With IR tests we ensure we get the IR nodes that we want.
But often we combine it also with correctness tests. For that, we tend to use "gold" values that we generate in a first run where we do not yet have compilation. And later, when we have compiled we generate a new output and compare it to the "gold" value.
As an alternative, the "runner" approach was implemented in a separate framework, in "compiler/vectorization/runner/".
We should try to do automatic result verification to reduce boilerplate and the need for such additional frameworks.
Details:
Test methods can have a return value that is to be verified. We add a new annotation for such IR test methods, for example "@CheckReturnConsistency". Or one can just enable the verification at the "TestFramework" with "TestFramework.setCheckReturnConsistency(true)".
This can only be done for methods that have no @Run method, because we need to be able to directly get the result from the method. @Run methods are responsible themselves for argument setting, and return verification, if they want to do that.
One question is if we should always do the verification, or just on first and last run of the test method. Running it on every call could be beneficial to also catch wrong results from any previous compilation, C1 or C2, ORS or normal compilation.
But often we combine it also with correctness tests. For that, we tend to use "gold" values that we generate in a first run where we do not yet have compilation. And later, when we have compiled we generate a new output and compare it to the "gold" value.
As an alternative, the "runner" approach was implemented in a separate framework, in "compiler/vectorization/runner/".
We should try to do automatic result verification to reduce boilerplate and the need for such additional frameworks.
Details:
Test methods can have a return value that is to be verified. We add a new annotation for such IR test methods, for example "@CheckReturnConsistency". Or one can just enable the verification at the "TestFramework" with "TestFramework.setCheckReturnConsistency(true)".
This can only be done for methods that have no @Run method, because we need to be able to directly get the result from the method. @Run methods are responsible themselves for argument setting, and return verification, if they want to do that.
One question is if we should always do the verification, or just on first and last run of the test method. Running it on every call could be beneficial to also catch wrong results from any previous compilation, C1 or C2, ORS or normal compilation.
- duplicates
-
JDK-8325810 [IR framework] Automatic correctness checks
- Closed
- relates to
-
JDK-8324641 [IR Framework] Add Setup method to provide custom arguments and set fields
- Resolved
-
JDK-8309697 [TESTBUG] Remove "@requires vm.flagless" from jtreg vectorization tests
- Resolved
There are no Sub-Tasks for this issue.