Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

tannergooding
Copy link
Member

case MONO_TYPE_I2:
opcode = OP_FCONV_TO_I2;
break;
#if TARGET_SIZEOF_VOID_P == 4
Copy link
Member

Choose a reason for hiding this comment

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

nit: in other places we use SIZEOF_REGISTER for these kinds of checks.

Copy link
Member

@matouskozak matouskozak Feb 6, 2025

Choose a reason for hiding this comment

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

looks like it varies based on a file, e.g., in simd-intrinsics.c, the TARGET_SIZEOF_VOID_P looks to be the dominant way.

Copy link
Member

@lateralusX lateralusX Feb 6, 2025

Choose a reason for hiding this comment

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

yeah its mixed, in this file SIZEOF_REGISTER seems to dominate. An interesting observation is that we have some code like this:

#if (SIZEOF_REGISTER > TARGET_SIZEOF_VOID_P) && (G_BYTE_ORDER == G_BIG_ENDIAN)

and we have this comment in mono-machine.h

SIZEOF_REGISTER is usually the same as TARGET_SIZEOF_VOID_P, except when MONO_ARCH_ILP32 is defined

Copy link
Member Author

@tannergooding tannergooding Feb 6, 2025

Choose a reason for hiding this comment

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

Conversions care about the size of a pointer, not the size of the register; hence why this one was selected. It matches how other code paths, such as method-to-ir, typically deal with MONO_TYPE_I.

@lateralusX
Copy link
Member

lateralusX commented Feb 6, 2025

Little curious if this should still be excluded on Mono (same for double), ConvertToIntegerNative ? For direct calls we would optimize calls using the new intrinsic implemented by this PR, but I would assume that indirect calls might end up in this implementation on Mono as well.

@tannergooding
Copy link
Member Author

Looks like this needs to explicitly add support to Mono Interpreter as well.

Copy link
Member

@kg kg left a comment

Choose a reason for hiding this comment

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

Interp parts LGTM, less certain about mini

@tannergooding
Copy link
Member Author

Cc. @BrzVlad for the mono mini side

@tannergooding tannergooding merged commit d05d6c2 into dotnet:main Feb 10, 2025
161 of 166 checks passed
@tannergooding tannergooding deleted the fix-49586 branch February 10, 2025 18:16
grendello added a commit to grendello/runtime that referenced this pull request Feb 11, 2025
* main:
  Code clean up in AP for NonNull* (dotnet#112027)
  JIT: Invalidate LSRA's DFS tree if we aren't running new layout phase (dotnet#112364)
  Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20250204.2 (dotnet#112339)
  Add doc on OS onboarding (dotnet#112026)
  Add `TypeName` APIs to simplify metadata lookup. (dotnet#111598)
  Internal monitor impl not using coop mutex causing deadlocks on Android. (dotnet#112358)
  Do not run NAOT arm64 OSX testing on all PRs (dotnet#112342)
  Special-case empty enumerables in AsyncEnumerable (dotnet#112321)
  Have mono handle ConvertToIntegerNative for Double and Single (dotnet#112206)
  Update dependencies from https://github.com/dotnet/arcade build 20250206.4 (dotnet#112338)
  System.Configuration.ConfigurationManager.Tests: use Assembly.Location to determine ThisApplicationPath. (dotnet#112231)
  Force write of local file header when "version needed to extract" changes (dotnet#112032)
  JIT: Don't reorder handler blocks (dotnet#112292)
  [RISC-V] Synthesize some floating constants inline (dotnet#111529)
  Enable `SA1000`: Spacing around keywords (dotnet#112302)
  Fix relocs for linux-riscv64 AOT (dotnet#112331)
@matouskozak
Copy link
Member

Thank you @tannergooding for the fix. The regressions got resolved
image

@github-actions github-actions bot locked and limited conversation to collaborators Mar 16, 2025
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.

[Perf] Linux/arm64: 5 Regressions on 2/1/2025 11:17:39 PM +00:00
5 participants