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

Add scalar shifts #360

Merged
merged 2 commits into from
Jul 29, 2023
Merged

Add scalar shifts #360

merged 2 commits into from
Jul 29, 2023

Conversation

calebzulawski
Copy link
Member

I think shifts are different than Add, Mul, etc, and warrant these auto-splatting trait impls. Unlike arithmetic, it's not clear to users that the correct LLVM IR is a splatted shift, and they expect something that looks more like a unary op. Closes #225.

@programmerjake
Copy link
Member

maybe add a smoke test?

Copy link
Member

@thomcc thomcc left a comment

Choose a reason for hiding this comment

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

Yes, I agree that shifts are fundamentally different than add/mul in this respect.

@calebzulawski calebzulawski merged commit 490b5cf into master Jul 29, 2023
@workingjubilee
Copy link
Member

I still want all of them tbh! I agree these are less likely to break stuff due to bad type inference though, since shifts are already weird about the shamt operand.

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.

Shl and Shr implementations should accept a (polymorphic?) scalar argument rather than a vector
4 participants