Skip to content

AdvSimd tests don't run on native AOT #118234

Closed

Description

@MichalStrehovsky

Had to disable them because a newly added test uses dynamic keyword. Dynamic keyword is not compatible with trimming or AOT. I'm surprised to see it in a JIT test.

03:06:58.023 Running test: _AdvSimd_ro::JIT.HardwareIntrinsics.Arm._AdvSimd.Program.AddRoundedHighNarrowingLower_Vector64_Int16()
Beginning scenario: RunBasicScenario_UnsafeRead
System.ArgumentNullException: Value cannot be null. (Parameter 'key')
   at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior) + 0x3c8
   at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value) + 0x10
   at Microsoft.CSharp.RuntimeBinder.ExpressionTreeCallRewriter.VisitSAVE(ExprBinOp) + 0x5c
   at Microsoft.CSharp.RuntimeBinder.Semantics.ExprVisitorBase.Dispatch(Expr) + 0x408
   at Microsoft.CSharp.RuntimeBinder.ExpressionTreeCallRewriter.Rewrite(ExprBinOp, Expression[]) + 0x6c
   at Microsoft.CSharp.RuntimeBinder.RuntimeBinder.BindCore(ICSharpBinder, Expression[], DynamicMetaObject[], DynamicMetaObject&) + 0x1d4
   at Microsoft.CSharp.RuntimeBinder.RuntimeBinder.Bind(ICSharpBinder, Expression[], DynamicMetaObject[], DynamicMetaObject&) + 0x58
   at Microsoft.CSharp.RuntimeBinder.BinderHelper.Bind(ICSharpBinder, RuntimeBinder, DynamicMetaObject[], IEnumerable`1, DynamicMetaObject) + 0x490
   at System.Dynamic.DynamicMetaObjectBinder.Bind(Object[], ReadOnlyCollection`1, LabelTarget) + 0x148
   at System.Runtime.CompilerServices.CallSiteBinder.BindCore[T](CallSite`1, Object[]) + 0x94
   at HardwareIntrinsics_Arm_ro!<BaseAddress>+0x3e90fec
   at System.Reflection.DynamicInvokeInfo.InvokeWithFewArguments(IntPtr, Byte&, Byte&, Object[], BinderBundle, Boolean) + 0xd0
--- End of stack trace from previous location ---
   at System.Linq.Expressions.Interpreter.ExceptionHelpers.UnwrapAndRethrow(TargetInvocationException) + 0x18
   at System.Linq.Expressions.Interpreter.MethodInfoCallInstruction.Run(InterpretedFrame) + 0x1cc
   at System.Linq.Expressions.Interpreter.Interpreter.Run(InterpretedFrame) + 0x48
   at System.Linq.Expressions.Interpreter.LightLambda.Run(Object[] arguments) + 0x8c
   at HardwareIntrinsics_Arm_ro!<BaseAddress>+0x3ce7d60
   at JIT.HardwareIntrinsics.Arm.Helpers.AddRoundedHighNarrowing[W,N](W op1, W op2) + 0xa4
   at JIT.HardwareIntrinsics.Arm._AdvSimd.SimpleBinaryOpTest__AddRoundedHighNarrowingLower_Vector64_Int16.ValidateResult(Int32[] left, Int32[] right, Int16[] result, String method) + 0x90
   at JIT.HardwareIntrinsics.Arm._AdvSimd.Program.AddRoundedHighNarrowingLower_Vector64_Int16() + 0x3c
   at Program.<<Main>$>g__TestExecutor988|0_989(StreamWriter tempLogSw, StreamWriter statsCsvSw, Program.<>c__DisplayClass0_0&) + 0x114
03:06:58.025 Failed test: _AdvSimd_ro::JIT.HardwareIntrinsics.Arm._AdvSimd.Program.AddRoundedHighNarrowingLower_Vector64_Int16()

Activity

  1. added
    area-CodeGen-coreclr
    on Jul 31, 2025
  2. added
    untriaged
    on Jul 31, 2025
  3. dotnet-policy-service commented on Jul 31, 2025

    @dotnet-policy-service
    Contributor

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

  4. added
    disabled-test
    on Jul 31, 2025
  5. EgorBo commented on Jul 31, 2025

    @EgorBo
    Member

    Presumably introduced by #116914

    @snickolls-arm can we remove the dynamic keyword (and never use in the future for these tests) from there? it significantly reduces coverage on NativeAOT

  6. snickolls-arm commented on Jul 31, 2025

    @snickolls-arm
    Contributor

    Presumably introduced by #116914

    @snickolls-arm can we remove the dynamic keyword (and never use in the future for these tests) from there? it significantly reduces coverage on NativeAOT

    Yes noted, we'll stop using this in future and remove them. It was intended to help us abstract over the different sizes of integers when writing the tests but I didn't realize the impact on NativeAOT.

    We've only being trying this for SVE2 so this shouldn't be affecting the AdvSimd tests. The tests are all sharing a namespace, so I think there has been an unintended change due to overload resolution. Is it just this single case or are more intrinsics failing as well @MichalStrehovsky?

  7. added 2 commits that reference this issue on Aug 1, 2025
    554a2e0
    87e07fa
  8. removed
    untriaged
    on Aug 1, 2025
  9. added this to the 10.0.0 milestone on Aug 1, 2025
  10. added a commit that references this issue on Aug 5, 2025
    dfb2850
  11. locked and limited conversation to collaborators on Sep 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area-CodeGen-coreclrdisabled-test

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions