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

Implement the HWIntrinsics for SSE4.2 #9683

Closed
tannergooding opened this issue Feb 8, 2018 · 13 comments
Closed

Implement the HWIntrinsics for SSE4.2 #9683

tannergooding opened this issue Feb 8, 2018 · 13 comments
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Milestone

Comments

@tannergooding
Copy link
Member

category:reach
theme:intrinsics
skill-level:intermediate
cost:medium

@tannergooding tannergooding self-assigned this Feb 8, 2018
@tannergooding
Copy link
Member Author

@fiigii
Copy link
Contributor

fiigii commented Feb 8, 2018

@tannergooding Thanks for the work. After finish dotnet/coreclr#16183, I plan to implement a few of SSE4.1 intrinsics as well (e.g., certain AVX helper-intrinsics need Sse41.Insert ).

@tannergooding
Copy link
Member Author

@fiigii, sounds good to me.

We should probably sync up in the near future and decide how to split SSE4.1 between us.

@fiigii
Copy link
Contributor

fiigii commented Feb 8, 2018

We should probably sync up in the near future and decide how to split SSE4.1 between us.

Agree, we can discuss it after dotnet/coreclr#16249 merged.

@CarolEidt
Copy link
Contributor

We should probably sync up in the near future and decide how to split SSE4.1 between us.

From a logistical perspective, I propose that we leave this in the "To Do" column of https://github.com/dotnet/coreclr/projects/7, and then add sub-issues for the pieces that you plan to work on, assign them accordingly, link them here, and we can put those in the "In Progress" column. I think that will help keep track of who's working on what.

@tannergooding tannergooding changed the title Implement the HWIntrinsics for SSE4.1/SSE4.2 Implement the HWIntrinsics for SSE4.2 Feb 21, 2018
@tannergooding
Copy link
Member Author

@fiigii, @CarolEidt, @eerhardt, @RussKeldorph we should set up some time to discuss the API shape for the SSE42 intrinsics.

They currently take a ResultsFlag parameter, but the flags are a result written by the instruction rather than an input to them.

However, I'm also not sure we want to be returning an enum that represents the current flag state, as that makes the instructions unnecessarily more expensive

Additionally, given that the instructions write the Arithmetic flags in a non-standard manner, we should ensure that this won't have any unexpected impact on the JIT.

All in all, I think this needs a bit more thought/work before we can start implementing them.

@fiigii
Copy link
Contributor

fiigii commented Feb 21, 2018

They currently take a ResultsFlag parameter, but the flags are a result written by the instruction rather than an input to them.

I do not think the ResultsFlag is a result. We just use this flag to select the results that we want.
C++ fixes these flags in the function names, and the current .NET Core intrinsics take it as a parameter to avoid exploding APIs.

@tannergooding
Copy link
Member Author

I do not think the ResultsFlag is a result. We just use this flag to select the results that we want.
C++ fixes these flags in the function names, and the current .NET Core intrinsics take it as a parameter to avoid exploding APIs.

That is very non-obvious. It also includes flags that are always reset by the instructions which leads to other confusion as well.

@fiigii
Copy link
Contributor

fiigii commented Feb 21, 2018

Probably, we can just follow the C++ intrinsic design that fixes the flags in function names, which significantly simplifies the JIT implementation (especially fallback).

@fiigii
Copy link
Contributor

fiigii commented Dec 6, 2018

Please close this issue.

@tannergooding
Copy link
Member Author

Do we still have an issue tracking the remaining SSE4.2 APIs that still need API design/review?

@fiigii
Copy link
Contributor

fiigii commented Dec 6, 2018

Yes, we have the design PR at dotnet/coreclr#19958 and related issue at CoreFX.

@tannergooding
Copy link
Member Author

@msftgits msftgits transferred this issue from dotnet/coreclr Jan 31, 2020
@msftgits msftgits added this to the Future milestone Jan 31, 2020
@tannergooding tannergooding removed their assignment May 26, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
Development

No branches or pull requests

4 participants