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

[mono][jit] Add vector horizontal sums and ToScalar on arm64. #83675

Merged
merged 5 commits into from
Mar 21, 2023

Conversation

jandupej
Copy link
Member

@jandupej jandupej commented Mar 20, 2023

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 for OP_ARM64_XADDV to mini JIT. These facilitate handling SN_Sum, which results from Vector128<T>.Sum.

Necessary instruction emit macros were added and fixed.

EDIT: This also adds ToScalar, since it is easily implemented with OP_EXTRACT*.

Contributes to #80566

… their generalized variants. Added OP_EXTRACTx opcodes to arm64 codegen. Added horizontal sums.
@jandupej jandupej added this to the 8.0.0 milestone Mar 20, 2023
@jandupej jandupej self-assigned this Mar 20, 2023
@@ -3715,6 +3723,57 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
case OP_XCAST:
break;


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra newline.

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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation.

@@ -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:
Copy link
Member

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.

@jandupej jandupej changed the title [mono][jit] Add vector horizontal sums on arm64. [mono][jit] Add vector horizontal sums and ToScalar on arm64. Mar 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants