-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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][jit] Add vector horizontal sums and ToScalar on arm64. #83675
Conversation
… their generalized variants. Added OP_EXTRACTx opcodes to arm64 codegen. Added horizontal sums.
src/mono/mono/mini/mini-arm64.c
Outdated
@@ -3715,6 +3723,57 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb) | |||
case OP_XCAST: | |||
break; | |||
|
|||
|
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.
Extra newline.
src/mono/mono/mini/mini-arm64.c
Outdated
case OP_EXTRACT_R4: | ||
case OP_EXTRACT_R8: | ||
if (ins->dreg != ins->sreg1 || ins->inst_c0 != 0) { | ||
const int t = get_type_size_macro (ins->inst_c1); |
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.
Indentation.
src/mono/mono/mini/simd-intrinsics.c
Outdated
@@ -1908,6 +1917,7 @@ emit_vector64_vector128_t (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign | |||
case SN_op_BitwiseAnd: | |||
case SN_op_BitwiseOr: | |||
case SN_op_ExclusiveOr: | |||
case SN_Sum: |
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.
This is not needed, as Sum
is not one of the API's of vector128_t. vector64_vector128_t_methods
contains all possible API's of vector128_t.
Added support for
OP_EXTRACT*
on arm64. The case when extracting the first float/double element into the first register is optimized out. Added support forOP_ARM64_XADDV
to mini JIT. These facilitate handlingSN_Sum
, which results fromVector128<T>.Sum
.Necessary instruction emit macros were added and fixed.
EDIT: This also adds
ToScalar
, since it is easily implemented withOP_EXTRACT*
.Contributes to #80566