Skip to content

[RV64_DYNAREC] Avoid redundant vsetvli when loading vector masks - #4583

Merged
ptitSeb merged 1 commit into
ptitSeb:mainfrom
zengdage:vector-mask
Oct 23, 2026
Merged

ptitSeb merged 1 commit into
ptitSeb:mainfrom
zengdage:vector-mask

Conversation

@zengdage

Copy link
Copy Markdown
Contributor
  1. Trim mask immediates to the active vector element count to avoid setting unused bits.

  2. Reuse the vector configuration when its element width can hold all active mask bits.

@ptitSeb
ptitSeb requested a review from ksco October 21, 2026 10:07
Comment thread src/dynarec/rv64/dynarec_rv64_helper.c Outdated
abort();
} else {
uint8_t sv_sew, sv_vlmul, sv_vl;
if (sew < VECTOR_SEW8 || sew > VECTOR_SEW64)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

sew cannot < VECTOR_SEW8, this is never true.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done.

1. Trim mask immediates to the active vector element count to avoid setting unused
bits.

2. Reuse the vector configuration when its element width can hold all active mask
bits.
@ptitSeb
ptitSeb merged commit 0b0a31c into ptitSeb:main Oct 23, 2026
29 checks passed
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