Skip to content

Missing compiler intrinsics #46

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

Open
5 of 10 tasks
calebzulawski opened this issue Nov 29, 2020 · 3 comments
Open
5 of 10 tasks

Missing compiler intrinsics #46

calebzulawski opened this issue Nov 29, 2020 · 3 comments
Labels
C-feature-request Category: a feature request, i.e. not implemented / a PR C-tracking-issue Ongoing issue with checkboxes for partial progress and such

Comments

@calebzulawski
Copy link
Member

calebzulawski commented Nov 29, 2020

I think it would be helpful to collect a list of all compiler intrinsics (the extern "platform-intrinsics" ones) that need to be added.

  • simd_neg
  • simd_overflowing_add etc
  • simd_trunc
  • simd_round
  • simd_lt_packed etc (all other packed intrinsics can be emulated with this one to start)
  • simd_sat_shl <-- only supported in recent LLVM
  • simd_abs
  • simd_sext (or some kind of simd_cast for integer -> mask)
  • simd_bitmask/simd_select_bitmask (these already exist, but they should be modified to accept arrays of u8
  • simd_bswap
@workingjubilee
Copy link
Member

On one hand, logically there isn't any reason it should yield the same results, as integers are simpler types. On the other hand, #97 still gives me the heebie-jeebies about adding simd_abs as an intrinsic.

What would simd_lt_packed be equivalent to?

@calebzulawski
Copy link
Member Author

I think I previously decided (but never updated this issue) that we don't need an intrinsics for operating on packed bit masks. I think we only need two intrinsics, one for sign extending a packed bit mask to a full width mask, and one for truncating a full width mask to a bit mask.

@calebzulawski
Copy link
Member Author

Actually, looking at the rustc codegen, I think simd_bitmask might be the truncation I'm talking about.

@workingjubilee workingjubilee added C-feature-request Category: a feature request, i.e. not implemented / a PR C-tracking-issue Ongoing issue with checkboxes for partial progress and such labels May 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: a feature request, i.e. not implemented / a PR C-tracking-issue Ongoing issue with checkboxes for partial progress and such
Projects
None yet
Development

No branches or pull requests

2 participants