Skip to content

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