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

[LLVM+Clang][XTHeadVector] Implement intrinsics for vaadd and vasub #76

Merged
merged 6 commits into from
Mar 8, 2024

Conversation

YanWQ-monad
Copy link

@YanWQ-monad YanWQ-monad commented Mar 7, 2024

As title, implement intrinsics for vaadd and vasub, which also support setting rounding mode like LLVM RVV 1.0.

It is noteworthy that in the RISC-V V 0.7.1 specification, the vaadd.vi vd, vs2, imm, vm is still retained. Hence, I added the WriteVAALUI scheduler resources. I am not sure if this is the correct way, or should we drop it since the workaround only needs one more li instruction?
Edit: after reading the discussion about xtheadvector, it would be better not to support vaadd.vi. And that's also what gcc does (https://godbolt.org/z/Gxc1KvTn1).

@ChunyuLiao
Copy link
Collaborator

need rebase

@YanWQ-monad YanWQ-monad changed the title [LLVM][XTHeadVector] Implement intrinsics for vaadd and vasub [LLVM+Clang][XTHeadVector] Implement intrinsics for vaadd and vasub Mar 8, 2024
Copy link

@kata-ark kata-ark left a comment

Choose a reason for hiding this comment

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

Excellent work!! Thank you ❤️

@ChunyuLiao ChunyuLiao merged commit acff917 into ruyisdk:xtheadvector Mar 8, 2024
1 check passed
imkiva pushed a commit to imkiva/llvm-project that referenced this pull request Apr 1, 2024
…b` (ruyisdk#76)

* [LLVM][XTHeadVector] Define vaadd/vasub

* [LLVM][XTHeadVector] Add test cases

* [NFC][XTHeadVector] Update README

* [LLVM][XTHeadVector] Support rounding mode for vaadd/vasub

* [Clang][XTHeadVector] Define `vaadd/vasub`

* [Clang][XTHeadVector] Add test cases for `vaadd/vasub`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants