Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add verification to loop reduction unit tests #13144

Open
0xdaryl opened this issue Jul 8, 2021 · 1 comment
Open

Add verification to loop reduction unit tests #13144

0xdaryl opened this issue Jul 8, 2021 · 1 comment

Comments

@0xdaryl
Copy link
Contributor

0xdaryl commented Jul 8, 2021

The unit tests for loop reduction optimizations that copy memory really only test whether the transformed loop ran for the correct number of iterations. They do not test whether that loop did the correct thing.

For example, https://github.com/eclipse-openj9/openj9/blob/master/test/functional/JIT_Test/src/jit/test/loopReduction/byte2CharMemCpy.java

There should be some verification of the operation performed as well for this to be a truly effective unit test.

In the past, these unit tests were notorious for taking a long time to run and suffered from timeouts in the build. Perhaps that is the reason that validation of the results is skipped. However, the tests themselves could be redesigned to save some time by reducing the number of vector lengths being tested (presently 0 through 15, and then 16 through 2048 in powers of two). Testing that many vector lengths likely isn't providing any value in terms of coverage.

@preveen-stack
Copy link

@0xdaryl Is this issue still valid? The link mentioned above is giving 404

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants