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] Add intrinsics for several operators #66317

Merged
merged 10 commits into from
Mar 10, 2022

Conversation

mkhamoyan
Copy link
Contributor

@mkhamoyan mkhamoyan commented Mar 7, 2022

This PR contributes to #64072

Added intrinsics for following operators

  • Operator *
  • Operator /
  • Operator |
  • Operator &
  • Operator ^
  • Unary operator -
  • Unary operator ~

@mkhamoyan mkhamoyan marked this pull request as ready for review March 8, 2022 11:28
@fanyang-mono fanyang-mono changed the title Add intrinsics for several operators [Mono] Add intrinsics for several operators Mar 10, 2022
@fanyang-mono
Copy link
Member

@vargaz Could you please review again?

case SN_op_ExclusiveOr:
case SN_op_Multiply:
case SN_op_Subtraction: {
if (fsig->param_count != 2 )
Copy link
Member

Choose a reason for hiding this comment

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

Will have a follow-up PR to fix the extra space.

g_assert (fsig->param_count == 2 && fsig->ret->type == MONO_TYPE_BOOLEAN &&
mono_metadata_type_equal (fsig->params [0], type) &&
mono_metadata_type_equal (fsig->params [1], type));
if (fsig->param_count != 2 )
Copy link
Member

Choose a reason for hiding this comment

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

Ditto

switch (id) {
case SN_op_Equality: return emit_xequal (cfg, klass, args [0], args [1]);
case SN_op_Inequality: return emit_not_xequal (cfg, klass, args [0], args [1]);
default: g_assert_not_reached ();
}
case SN_op_OnesComplement:
case SN_op_UnaryNegation:
if (fsig->param_count != 1 )
Copy link
Member

Choose a reason for hiding this comment

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

Ditto

@fanyang-mono
Copy link
Member

The failures on CI are irrelevant to this PR.

@akoeplinger akoeplinger merged commit 4a7feea into dotnet:main Mar 10, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Apr 10, 2022
@mkhamoyan mkhamoyan deleted the merikhamoyan-vector-intrinisics-op branch August 19, 2022 12:45
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.

6 participants