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][XTHeadVector] support nvx1i1/nvx2i1/nvx4i1 operands for vector mask operations #120

Merged
merged 6 commits into from
Jun 24, 2024

Conversation

imkiva
Copy link
Collaborator

@imkiva imkiva commented Jun 19, 2024

This PR fixed an issue introduced in #95 where the element size of vbool16/32/64_t is computed from fractional LMUL, making it incompatible with XTHeadVector.

This PR applies another strategy of setting LMUL and SEW when computing <n> = SEW/LMUL in vbool<n>_t:

  • for <n> = 1, 2, 4, 8, we assume SEW = 8, and set LMUL = 8/4/2/1 respectively. This is the same as the old behavior and mainline RVV implementation.
  • for <n> = 16, 32, 64, we assume LMUL = 1, and set SEW = 16/32/64 respectively. Thus no fractional LMUL is involved, and the generated code can pass MC validation.

@imkiva imkiva changed the title [LLVM][XTHeadVector] suppoert vbool16/32/64 for vector mask operations [LLVM][XTHeadVector] suppoert vbool16/32/64_t for vector mask operations Jun 19, 2024
@imkiva imkiva changed the title [LLVM][XTHeadVector] suppoert vbool16/32/64_t for vector mask operations [LLVM][XTHeadVector] suppoert nvx1i1/nvx2i1/nvx4i1 operands for vector mask operations Jun 21, 2024
@imkiva imkiva changed the title [LLVM][XTHeadVector] suppoert nvx1i1/nvx2i1/nvx4i1 operands for vector mask operations [LLVM][XTHeadVector] support nvx1i1/nvx2i1/nvx4i1 operands for vector mask operations Jun 21, 2024
@ChunyuLiao ChunyuLiao merged commit c2195e8 into ruyisdk:rebase-17.0.6 Jun 24, 2024
2 checks passed
imkiva added a commit to imkiva/llvm-project that referenced this pull request Feb 24, 2025
…or mask operations (ruyisdk#120)

* [LLVM][XTHeadVector] support `vbool16/32/64` for vector mask operations

* [LLVM][XTHeadVector] correctly expand pseudos for `vmset/vmclr`

* [LLVM][XTHeadVector] update corresponding tests

* [LLVM][XTHeadVector] update tests for `vmsof/vmsbf/vmsif`

* [LLVM][XTHeadVector] update tests for `vmfirst/vmpopc`

* [LLVM][XTHeadVector] update tests for `vmfirst/vmpopc`
imkiva added a commit to imkiva/llvm-project that referenced this pull request Feb 26, 2025
…or mask operations (ruyisdk#120)

* [LLVM][XTHeadVector] support `vbool16/32/64` for vector mask operations

* [LLVM][XTHeadVector] correctly expand pseudos for `vmset/vmclr`

* [LLVM][XTHeadVector] update corresponding tests

* [LLVM][XTHeadVector] update tests for `vmsof/vmsbf/vmsif`

* [LLVM][XTHeadVector] update tests for `vmfirst/vmpopc`

* [LLVM][XTHeadVector] update tests for `vmfirst/vmpopc`
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.

2 participants