diff --git a/src/tests/JIT/Regression/JitBlue/Runtime_38162/Runtime_38162.cs b/src/tests/JIT/Regression/JitBlue/Runtime_38162/Runtime_38162.cs new file mode 100644 index 0000000000000..1ec8156b92bd7 --- /dev/null +++ b/src/tests/JIT/Regression/JitBlue/Runtime_38162/Runtime_38162.cs @@ -0,0 +1,27 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using System.Reflection; +using System.Numerics; + +namespace Runtime_38162 +{ + class Program + { + static int Main(string[] args) + { + bool directCall = Vector.IsHardwareAccelerated; + bool reflectionCall = (bool)typeof(Vector).InvokeMember(nameof(Vector.IsHardwareAccelerated), BindingFlags.GetProperty, null, null, new object[0]); + + if (directCall != reflectionCall) + { + Console.WriteLine($"Direct call to Vector.IsHardwareAccelerated returns {directCall}"); + Console.WriteLine($"Reflection call to Vector.IsHardwareAccelerated returns {reflectionCall}"); + return 1; + } + + return 100; + } + } +} diff --git a/src/tests/JIT/Regression/JitBlue/Runtime_38162/Runtime_38162.csproj b/src/tests/JIT/Regression/JitBlue/Runtime_38162/Runtime_38162.csproj new file mode 100644 index 0000000000000..19781e26c20d8 --- /dev/null +++ b/src/tests/JIT/Regression/JitBlue/Runtime_38162/Runtime_38162.csproj @@ -0,0 +1,10 @@ + + + Exe + + True + + + + +