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

Fix funnel shift #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Fix funnel shift #6

wants to merge 1 commit into from

Conversation

ndrewh
Copy link

@ndrewh ndrewh commented May 16, 2024

The funnel shift helpers are using _sym_extract_helper incorrectly.

return _sym_extract_helper(_sym_build_shift_left(concat, shift), 0, bits);

The first bit index must be >= the second bit index. This caused hangs in _sym_extract_helper.

Also, according to the LLVM docs llvm.fshl should extract the most-significant bits, while llvm.fshr extracts the least-significant.

Funnel shift was using _sym_extract_helper incorrectly. The first bit index must be >= the second bit index. This caused hangs in _sym_extract_helper.

Also, according to the docs llvm.fshl extracts the most-significant bits, while llvm.fshr extracts the least-significant.

https://llvm.org/docs/LangRef.html#llvm-fshl-intrinsic
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.

1 participant