Skip to content

Strength reduce x quotRem 8 #8

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

Merged
merged 1 commit into from
Nov 30, 2016

Conversation

alexbiehl
Copy link
Contributor

Unfortunately GHC < 8.2 doesn't replace x quotRem 8 by more efficient instructions. This patch replaces (i, j) = x quotRem 8 with i = unsafeShiftR x 3 and j = x .&. 3.

@winterland1989
Copy link
Owner

It seems the decode test is starting failing, would you investigate it?

@alexbiehl
Copy link
Contributor Author

It's good now. :)

@winterland1989 winterland1989 merged commit 78fc630 into winterland1989:master Nov 30, 2016
@winterland1989
Copy link
Owner

Ah, nice catch, rem 8 's mask should be 0b111 not 0b11.

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