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

wazevo: add bit count instruction Popcnt #1638

Merged
merged 6 commits into from
Aug 21, 2023
Merged

wazevo: add bit count instruction Popcnt #1638

merged 6 commits into from
Aug 21, 2023

Conversation

evacchi
Copy link
Contributor

@evacchi evacchi commented Aug 18, 2023

Moves further #1496 and follows-up to #1635.

We introduce support to popcnt with the required dependencies for its implementation: we use vector instructions CNT and UADDLV as we do in the current compiler. This PR also implements movToVec, movFromVec and it lays down the first steps to extend further with the missing related operations in vecMisc, vecLanes (originally unimplemented).

@evacchi evacchi marked this pull request as draft August 18, 2023 16:47
@mathetake
Copy link
Member

9e944dc is landed, so could you rebase onto main before making this ready btw

@evacchi evacchi force-pushed the popcnt-instr branch 2 times, most recently from 7343fa0 to 1e5ff52 Compare August 20, 2023 18:52
@evacchi evacchi requested a review from mathetake August 20, 2023 18:52
@evacchi
Copy link
Contributor Author

evacchi commented Aug 20, 2023

moved forward, a bit of cleanup, still needs tests and docs :) pushing for feedback 🙏

Copy link
Member

@mathetake mathetake left a comment

Choose a reason for hiding this comment

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

yeah this is right on the track! 💯

Copy link
Member

@mathetake mathetake left a comment

Choose a reason for hiding this comment

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

OK, VecRRR is not the right place for UADDLV, but instead you should use vecLanes:

	// vecLanes represents a vector instruction across lanes.
	vecLanes

which should be encoded following "Advanced SIMD across lanes" in https://developer.arm.com/documentation/ddi0596/2020-12/Index-by-Encoding/Data-Processing----Scalar-Floating-Point-and-Advanced-SIMD?lang=en

@evacchi evacchi marked this pull request as ready for review August 21, 2023 17:11
@evacchi evacchi requested a review from mathetake August 21, 2023 17:12
Copy link
Member

@mathetake mathetake left a comment

Choose a reason for hiding this comment

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

Awesome!

@mathetake mathetake merged commit 68d575a into main Aug 21, 2023
53 checks passed
@mathetake mathetake deleted the popcnt-instr branch August 21, 2023 21:59
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