-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[mono] MiniJIT OP_XEQUAL for floats #77770
Conversation
/azp run runtime-extra-platforms |
Azure Pipelines successfully started running 1 pipeline(s). |
For the integer case Keeping |
That was originally introduced by me in 1eab0fe. It mimicked what Mono/LLVM was producing at that time. There were some instructions where the B/W/D/Q variants were not introduced in the same CPU extension set. In this specific case |
Yes, there are many cases of the xplat functionality where you have to special case and decide on an alternative for SSE3-SSE4.2 specific functionality. That is normal and expected of the compiler handling these APIs. I called this out because while it "works" and is valid today, it leaves Mono as being suboptimal compared to RyuJIT and that will negatively impact several scenarios and provide an overall worse user experience for the .NET community when they need to use Mono, so it is something that should be eventually fixed and handled. |
I am fine with emitting
The Mini JIT is already a suboptimal case. It has notoriously bad register allocation for the vector use case (although it's still much better than a full software fallback). The main reason to maintain it is to keep the same feature set between the Mini JIT, LLVM JIT and LLVM AOT. Otherwise you run into cases where various |
Potential improvent for Current behavior:
Better behavior would be:
|
/azp run runtime-extra-platforms |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run runtime-extra-platforms |
Commenter does not have sufficient privileges for PR 77770 in repo dotnet/runtime |
/azp run runtime-extra-platforms |
Azure Pipelines successfully started running 1 pipeline(s). |
CI Test failures are not related to this PR. |
Floating points NaN must be treated differently. Adding check to MiniJIT for
OP_XEQUAL
to use floating point comparison.Before:
Emitting
pcmpeqd
for every input type.Now:
Emitting
cmpeqps
andcmpeqpd
for doubles and floats, respectively. For integer inputs emittingpcmpeqd
as before.Fixing : #74781