Skip to content

std.simd.suggestVectorLengthForCpu: fix crashing edge cases #23915

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Fri3dNstuff
Copy link
Contributor

This PR fixes two edge cases in the function std.simd.suggestVectorLengthForCpu which previously caused a compile error, namely:

  • a type input of length greater than 8192 bytes (reaching unreachable)
  • a RISC-V CPU with features .v and .zvl65536b (attempting to assign 65536 to a u16)

@alexrp alexrp self-assigned this May 17, 2025
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