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

[RISCV][llvm-mca] Add llvm-mca tests for SiFive7 Vector Integer Arith… #65283

Merged
merged 2 commits into from
Sep 7, 2023

Conversation

michaelmaitland
Copy link
Contributor

…metic

The intention of this test file long term is to test all valid (LMUL, SEW) pairs for each SchedWrite class. For this reason, we do not test every single instruction under every (LMUL, SEW) pair, since multiple instructions may use the same SchedWrite. For example, vadd.vv and vsub.vv both use the WriteVIALUV class.

I didn't end up getting all (LMUL, SEW) pair for each SchedWrite class though. For example, vadd.vv and vadd.vx use WriteVIALUV and WriteVIALUX respectivley, but I treated all Vector Single-Width Integer Add and Subtract instructions as having the same behavior. I plan on improving the coverage as time goes on and figured this would be a good start. If there is any class of vector integer arithmetic instructions you'd like to see full coverage for in this patch, please let me know.

@wangpc-pp
Copy link
Contributor

The tests are failed.

@michaelmaitland
Copy link
Contributor Author

The tests are failed.

I have updated the CHECK statements in the test case. I had run the update_mca_test_checks script before rebasing which led to the failure.

@michaelmaitland michaelmaitland force-pushed the sifive7-mca-vialu-tests branch 2 times, most recently from 048b0b9 to c312c7e Compare September 5, 2023 16:07
…metic

The intention of this test file long term is to test all valid (LMUL, SEW) pairs
for each SchedWrite class. For this reason, we do not test every single
instruction under every (LMUL, SEW) pair, since multiple instructions
may use the same SchedWrite. For example, vadd.vv and vsub.vv both use the
WriteVIALUV class.

I didn't end up getting all (LMUL, SEW) pair for each SchedWrite class though.
For example, vadd.vv and vadd.vx use WriteVIALUV and WriteVIALUX respectivley,
but I treated all Vector Single-Width Integer Add and Subtract instructions as
having the same behavior. I plan on improving the coverage as time goes on and
figured this would be a good start. If there is any class of vector integer
arithmetic instructions you'd like to see full coverage for in this patch,
please let me know.
@github-actions github-actions bot added libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. clang:frontend Language frontend issues, e.g. anything involving "Sema" mlir labels Sep 5, 2023
@michaelmaitland michaelmaitland removed libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. clang:frontend Language frontend issues, e.g. anything involving "Sema" mlir labels Sep 5, 2023
@michaelmaitland michaelmaitland force-pushed the sifive7-mca-vialu-tests branch 2 times, most recently from 1721ea1 to 5d47ae4 Compare September 5, 2023 16:48
Copy link
Contributor

@wangpc-pp wangpc-pp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
(maybe we should develop a test generator just like what we have in https://github.com/riscv-non-isa/rvv-intrinsic-doc/tree/main/rvv-intrinsic-generator?)

@michaelmaitland
Copy link
Contributor Author

LGTM. (maybe we should develop a test generator just like what we have in https://github.com/riscv-non-isa/rvv-intrinsic-doc/tree/main/rvv-intrinsic-generator?)

A test generator would be nice, although I think there are significantly less combinations compared to intrinsics.

@michaelmaitland michaelmaitland merged commit c39b504 into llvm:main Sep 7, 2023
2 checks passed
@michaelmaitland michaelmaitland deleted the sifive7-mca-vialu-tests branch September 7, 2023 14:33
avillega pushed a commit to avillega/llvm-project that referenced this pull request Sep 11, 2023
llvm#65283)

…metic

The intention of this test file long term is to test all valid (LMUL,
SEW) pairs for each SchedWrite class. For this reason, we do not test
every single instruction under every (LMUL, SEW) pair, since multiple
instructions may use the same SchedWrite. For example, vadd.vv and
vsub.vv both use the WriteVIALUV class.

I didn't end up getting all (LMUL, SEW) pair for each SchedWrite class
though. For example, vadd.vv and vadd.vx use WriteVIALUV and WriteVIALUX
respectivley, but I treated all Vector Single-Width Integer Add and
Subtract instructions as having the same behavior. I plan on improving
the coverage as time goes on and figured this would be a good start. If
there is any class of vector integer arithmetic instructions you'd like
to see full coverage for in this patch, please let me know.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants