dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.16k stars 4.71k forks source link

[JIT] ARM64 instructions `cmle` `cmlt` `fcmle` `fcmlt` are not emitted anywhere #64785

Open TIHan opened 2 years ago

TIHan commented 2 years ago

When doing this work: https://github.com/dotnet/runtime/pull/64783, I noticed that the ARM64 instructions cmle cmlt fcmle fcmlt are not being emitted anywhere and we have no corresponding HW intrinsic APIs for them. We should find places where we can take advantage of these instructions.

category:cq theme:emitter skill-level:beginner cost:small impact:small

ghost commented 2 years ago

Tagging subscribers to this area: @JulieLeeMSFT See info in area-owners.md if you want to be subscribed.

Issue Details
When doing this work: https://github.com/dotnet/runtime/pull/64783, I noticed that the ARM64 instructions `cmle` `cmlt` `fcmle` `fcmlt` are not being emitted anywhere and we have no corresponding HW intrinsic APIs to them.
Author: TIHan
Assignees: -
Labels: `area-CodeGen-coreclr`, `untriaged`
Milestone: -
TIHan commented 2 years ago

cc @tannergooding

tannergooding commented 2 years ago

👍. Just capturing what we were discussing offline...

This is one where we probably don't want a new managed intrinsic but rather where we can update lowering to do the containment and codegen to emit this for the existing AdvSimd.CompareLessThanOrEqual intrinsics when op2 is 0. -- Basically what you did in https://github.com/dotnet/runtime/pull/64783, but with the "is contained" and instruction change here: https://github.com/dotnet/runtime/blob/main/src/coreclr/jit/hwintrinsiccodegenarm64.cpp#L525-L538