-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Implemented abs saturate, absolute compare intrinsics. #48361
Conversation
58d7759
to
33a48e8
Compare
32d0aa6
to
620aaef
Compare
Looks good otherwise. |
9650be7
to
6779a12
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just nits, but the coding style throughout here is inconsistent and seems to have been done incorrectly in a few places and then copy-pasted. I fixed a few representative examples. There's also some problem with indentation that I'd like to see fixed.
e0029fb
to
c9c2d69
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few more you missed.
3cadaf5
to
cc05474
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - with couple of minor suggestions. I am also wondering how are these APIs tested? Does it use the tests in https://github.com/dotnet/runtime/tree/1d9e50cb4735df46d3de0cee5791e97295eaf588/src/tests/JIT/HardwareIntrinsics?
They should. That work is being done in #48397. We've been manually testing with small test programs on arm64 hardware in the interim. |
1275b8f
to
f617bb2
Compare
src/mono/mono/mini/mini.h
Outdated
SIMD_OP_LLVM_I8ABS_SATURATE, | ||
SIMD_OP_LLVM_I16ABS_SATURATE, | ||
SIMD_OP_LLVM_I32ABS_SATURATE, | ||
SIMD_OP_LLVM_I64ABS_SATURATE, | ||
SIMD_OP_LLVM_I4FABSOLUTE_COMPARE_GREATER_THAN, | ||
SIMD_OP_LLVM_DABSOLUTE_COMPARE_GREATER_THAN, | ||
SIMD_OP_LLVM_FABSOLUTE_COMPARE_GREATER_THAN_OR_EQUAL, | ||
SIMD_OP_LLVM_DABSOLUTE_COMPARE_GREATER_THAN_OR_EQUAL, | ||
SIMD_OP_LLVM_FABSOLUTE_COMPARE_LESS_THAN, | ||
SIMD_OP_LLVM_DABSOLUTE_COMPARE_LESS_THAN, | ||
SIMD_OP_LLVM_FABSOLUTE_COMPARE_LESS_THAN_OR_EQUAL, | ||
SIMD_OP_LLVM_DABSOLUTE_COMPARE_LESS_THAN_OR_EQUAL, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had been using SIMD_OP_ARM64_. You are using SIMD_OP_LLVM_. We should talk about the naming convention and agree on a set of rules.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I think calling them SIMD_OP_ARM64 makes more sense since this particular file is not llvm only (although they don't actually get intensified). I think I will fix that in a follow up PR since other ones need to be renamed also.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. No problem.
Implement more ARM64 Intrinsic:
Contributes to #42266