Skip to content

[Mono][Win] Incorrect decomposition of simd calls #116433

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

saitama951
Copy link
Contributor

simd decomposition for OP_ARG cases for simd calls in handled incorrectly
currently the decomposition intrinsic takes place based on a xcall but later on this xcall is decomposed into a vcall where the return register is removed.

fixes #116287

@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Jun 9, 2025
Copy link
Contributor

Tagging subscribers to this area: @steveisok, @vitek-karas
See info in area-owners.md if you want to be subscribed.

@saitama951
Copy link
Contributor Author

cc: @lateralusX

@lateralusX
Copy link
Member

lateralusX commented Jun 11, 2025

@saitama951 change seems to trigger some intrinsics error. Maybe we should keep the switch with instructions to decompose if the uses_simd_intrinsics is false. So pretty much add your exclude of the xcall ops in decompose_vtype_opt_uses_simd_intrinsics then keep the check on the uses_simd_intrinsics + the switch to decompose a well known set of SIMD ops as last option.

@saitama951 saitama951 force-pushed the main branch 2 times, most recently from 75c07fe to 210a2bb Compare June 11, 2025 17:11
simd decomposition for OP_ARG cases for simd calls in handled
incorrectly
currently the decomposition intrinsic takes place based on a xcall but
later on this xcall is decomposed into a vcall where the return register
is removed.

fixes dotnet#116287
@saitama951
Copy link
Contributor Author

saitama951 commented Jun 12, 2025

Done @lateralusX ,
All the test cases passes on windows.
Other failures seem to be unrelated.

@saitama951
Copy link
Contributor Author

I see a failure on windows-x64-release, looks to be unrelated to this change?

BEGIN EXECUTION
 "C:\h\w\B35D09DE\p\corerun.exe" -p "System.Reflection.Metadata.MetadataUpdater.IsSupported=false" -p "System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization=true"  nativeruntimeeventsource.dll 
buffer length=16
DOOVERLAPPEDIO
(Listener) [63, (Failed to listen, Was not heard or didn't fire)]
(Listener) [64, (Failed to listen, Was not heard or didn't fire)]
(Listener) [65, (Failed to listen, Was not heard or didn't fire)]




System.Exception: Condition 'listener.EventCount > 0' is not true
   at Tracing.Tests.NativeRuntimeEventSourceTest.Assert2.True(String name, Boolean condition)
   at Tracing.Tests.NativeRuntimeEventSourceTest.TestEntryPoint()
   at __GeneratedMainWrapper.Main()
Expected: 100
Actual: 101

@saitama951
Copy link
Contributor Author

@lateralusX can this be merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Codegen-JIT-mono community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Mono][Win][Amd] Incorrect decomposition for simd calls
2 participants