Skip to content

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?

Copy link
Member

@lateralusX lateralusX left a comment

Choose a reason for hiding this comment

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

LGTM!

@lewing
Copy link
Member

lewing commented Jul 2, 2025

/azp run runtime-extra-platforms

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@leecow
Copy link
Member

leecow commented Jul 16, 2025

@lewing - IBM was asking about this one. Do any of the failures need to be handled?

@lewing
Copy link
Member

lewing commented Jul 16, 2025

There were a couple of failures not known by the build analysis but they didn't look related so I'm not worried. I merged main if the regular tests look good we can take it.

I did run into something similar to the underlying issue in here in another place that that I hacked around
https://github.com/lewing/runtime/blob/b4aa80a2f3b485fec5d123fb6b3262536fa44c72/src/mono/mono/mini/intrinsics.c#L753-L757

@saitama951
Copy link
Contributor Author

saitama951 commented Jul 17, 2025

windows CI seems to be green now.

@lateralusX
Copy link
Member

lateralusX commented Jul 17, 2025

Its a Windows Mono runtime only change, so should only affect the Windows CI lanes.

@lewing
Copy link
Member

lewing commented Jul 17, 2025

/ba-g infrastructure timeouts are not related

@lewing lewing merged commit 3e239f8 into dotnet:main Jul 17, 2025
77 of 85 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Aug 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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

4 participants