Improve Intel hardware intrinsic APIs (dotnet/coreclr#17637)
authorFei Peng <fei.peng@intel.com>
Mon, 18 Jun 2018 20:17:41 +0000 (13:17 -0700)
committerEric Erhardt <eric.erhardt@microsoft.com>
Mon, 18 Jun 2018 20:17:41 +0000 (15:17 -0500)
* Improve Intel hardware intrinsic APIs

* Simplify Avx.Extract non-const fallback

Commit migrated from https://github.com/dotnet/coreclr/commit/ea58e86b476c7a596b43b12f31b5bccfdbbeca67

40 files changed:
src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Avx_r.csproj
src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Avx_ro.csproj
src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int16.1.cs [deleted file]
src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int16.11.cs [deleted file]
src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int16.27.cs [deleted file]
src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.SByte.1.cs [deleted file]
src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.SByte.20.cs [deleted file]
src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.SByte.52.cs [deleted file]
src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/MaskLoad_r.csproj [deleted file]
src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/MaskLoad_ro.csproj [deleted file]
src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Program.Avx.cs
src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Shared/GenerateTests.csx
src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Extract.Int16.1.cs [deleted file]
src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Extract.Int16.129.cs [deleted file]
src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Program.Sse2.cs
src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Sse2_r.csproj
src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Sse2_ro.csproj
src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.SByte.1.cs [deleted file]
src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.SByte.129.cs [deleted file]
src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Single.1.cs [deleted file]
src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Single.128.cs [deleted file]
src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Single.129.cs [deleted file]
src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Single.16.cs [deleted file]
src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Single.192.cs [deleted file]
src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Single.2.cs [deleted file]
src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Single.217.cs [deleted file]
src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Single.32.cs [deleted file]
src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Single.4.cs [deleted file]
src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Single.48.cs [deleted file]
src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Single.64.cs [deleted file]
src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Single.8.cs [deleted file]
src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Program.Sse41.cs
src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Sse41_r.csproj
src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Sse41_ro.csproj
src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Avx.PlatformNotSupported.cs
src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Avx.cs
src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse2.PlatformNotSupported.cs
src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse2.cs
src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse41.PlatformNotSupported.cs
src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse41.cs

index 7f89b89..5a4658c 100644 (file)
     <Compile Include="DuplicateEvenIndexed.Single.cs" />
     <Compile Include="DuplicateOddIndexed.Single.cs" />
     <Compile Include="Extract.Byte.1.cs" />
-    <Compile Include="Extract.SByte.1.cs" />
     <Compile Include="Extract.Byte.20.cs" />
-    <Compile Include="Extract.SByte.20.cs" />
-    <Compile Include="Extract.Int16.1.cs" />
     <Compile Include="Extract.UInt16.1.cs" />
-    <Compile Include="Extract.Int16.11.cs" />
     <Compile Include="Extract.UInt16.11.cs" />
     <Compile Include="Extract.Int32.1.cs" />
     <Compile Include="Extract.UInt32.1.cs" />
@@ -61,8 +57,6 @@
     <Compile Include="Extract.Int64.3.cs" />
     <Compile Include="Extract.UInt64.3.cs" />
     <Compile Include="Extract.Byte.52.cs" />
-    <Compile Include="Extract.SByte.52.cs" />
-    <Compile Include="Extract.Int16.27.cs" />
     <Compile Include="Extract.UInt16.27.cs" />
     <Compile Include="Extract.Int32.22.cs" />
     <Compile Include="Extract.UInt32.22.cs" />
index 66eb86a..5ff97f7 100644 (file)
     <Compile Include="DuplicateEvenIndexed.Single.cs" />
     <Compile Include="DuplicateOddIndexed.Single.cs" />
     <Compile Include="Extract.Byte.1.cs" />
-    <Compile Include="Extract.SByte.1.cs" />
     <Compile Include="Extract.Byte.20.cs" />
-    <Compile Include="Extract.SByte.20.cs" />
-    <Compile Include="Extract.Int16.1.cs" />
     <Compile Include="Extract.UInt16.1.cs" />
-    <Compile Include="Extract.Int16.11.cs" />
     <Compile Include="Extract.UInt16.11.cs" />
     <Compile Include="Extract.Int32.1.cs" />
     <Compile Include="Extract.UInt32.1.cs" />
@@ -61,8 +57,6 @@
     <Compile Include="Extract.Int64.3.cs" />
     <Compile Include="Extract.UInt64.3.cs" />
     <Compile Include="Extract.Byte.52.cs" />
-    <Compile Include="Extract.SByte.52.cs" />
-    <Compile Include="Extract.Int16.27.cs" />
     <Compile Include="Extract.UInt16.27.cs" />
     <Compile Include="Extract.Int32.22.cs" />
     <Compile Include="Extract.UInt32.22.cs" />
diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int16.1.cs
deleted file mode 100644 (file)
index 157ae16..0000000
+++ /dev/null
@@ -1,309 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-/******************************************************************************
- * This file is auto-generated from a template file by the GenerateTests.csx  *
- * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make    *
- * changes, please update the corresponding template and run according to the *
- * directions listed in the file.                                             *
- ******************************************************************************/
-
-using System;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Runtime.Intrinsics;
-using System.Runtime.Intrinsics.X86;
-
-namespace JIT.HardwareIntrinsics.X86
-{
-    public static partial class Program
-    {
-        private static void ExtractInt161()
-        {
-            var test = new SimpleUnaryOpTest__ExtractInt161();
-            
-            try
-            {
-            if (test.IsSupported)
-            {
-                // Validates basic functionality works, using Unsafe.Read
-                test.RunBasicScenario_UnsafeRead();
-
-                if (Avx.IsSupported)
-                {
-                    // Validates basic functionality works, using Load
-                    test.RunBasicScenario_Load();
-
-                    // Validates basic functionality works, using LoadAligned
-                    test.RunBasicScenario_LoadAligned();
-                }
-
-                // Validates calling via reflection works, using Unsafe.Read
-                test.RunReflectionScenario_UnsafeRead();
-
-                if (Avx.IsSupported)
-                {
-                    // Validates calling via reflection works, using Load
-                    test.RunReflectionScenario_Load();
-
-                    // Validates calling via reflection works, using LoadAligned
-                    test.RunReflectionScenario_LoadAligned();
-                }
-
-                // Validates passing a static member works
-                test.RunClsVarScenario();
-
-                // Validates passing a local works, using Unsafe.Read
-                test.RunLclVarScenario_UnsafeRead();
-
-                if (Avx.IsSupported)
-                {
-                    // Validates passing a local works, using Load
-                    test.RunLclVarScenario_Load();
-
-                    // Validates passing a local works, using LoadAligned
-                    test.RunLclVarScenario_LoadAligned();
-                }
-
-                // Validates passing the field of a local works
-                test.RunLclFldScenario();
-
-                // Validates passing an instance member works
-                test.RunFldScenario();
-            }
-            else
-            {
-                // Validates we throw on unsupported hardware
-                test.RunUnsupportedScenario();
-            }
-            }
-            catch (PlatformNotSupportedException)
-            {
-                test.Succeeded = true;
-            }
-
-            if (!test.Succeeded)
-            {
-                throw new Exception("One or more scenarios did not complete as expected.");
-            }
-        }
-    }
-
-    public sealed unsafe class SimpleUnaryOpTest__ExtractInt161
-    {
-        private static readonly int LargestVectorSize = 32;
-
-        private static readonly int Op1ElementCount = Unsafe.SizeOf<Vector256<Int16>>() / sizeof(Int16);
-        private static readonly int RetElementCount = Unsafe.SizeOf<Vector256<Int16>>() / sizeof(Int16);
-
-        private static Int16[] _data = new Int16[Op1ElementCount];
-
-        private static Vector256<Int16> _clsVar;
-
-        private Vector256<Int16> _fld;
-
-        private SimpleUnaryOpTest__DataTable<Int16, Int16> _dataTable;
-
-        static SimpleUnaryOpTest__ExtractInt161()
-        {
-            var random = new Random();
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); }
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector256<Int16>, byte>(ref _clsVar), ref Unsafe.As<Int16, byte>(ref _data[0]), (uint)Unsafe.SizeOf<Vector256<Int16>>());
-        }
-
-        public SimpleUnaryOpTest__ExtractInt161()
-        {
-            Succeeded = true;
-
-            var random = new Random();
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); }
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector256<Int16>, byte>(ref _fld), ref Unsafe.As<Int16, byte>(ref _data[0]), (uint)Unsafe.SizeOf<Vector256<Int16>>());
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); }
-            _dataTable = new SimpleUnaryOpTest__DataTable<Int16, Int16>(_data, new Int16[RetElementCount], LargestVectorSize);
-        }
-
-        public bool IsSupported => Avx.IsSupported;
-
-        public bool Succeeded { get; set; }
-
-        public void RunBasicScenario_UnsafeRead()
-        {
-            var result = Avx.Extract(
-                Unsafe.Read<Vector256<Int16>>(_dataTable.inArrayPtr),
-                1
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunBasicScenario_Load()
-        {
-            var result = Avx.Extract(
-                Avx.LoadVector256((Int16*)(_dataTable.inArrayPtr)),
-                1
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunBasicScenario_LoadAligned()
-        {
-            var result = Avx.Extract(
-                Avx.LoadAlignedVector256((Int16*)(_dataTable.inArrayPtr)),
-                1
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_UnsafeRead()
-        {
-            var result = typeof(Avx).GetMethod(nameof(Avx.Extract), new Type[] { typeof(Vector256<Int16>), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Unsafe.Read<Vector256<Int16>>(_dataTable.inArrayPtr),
-                                        (byte)1
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Int16)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_Load()
-        {
-            var result = typeof(Avx).GetMethod(nameof(Avx.Extract), new Type[] { typeof(Vector256<Int16>), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Avx.LoadVector256((Int16*)(_dataTable.inArrayPtr)),
-                                        (byte)1
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Int16)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_LoadAligned()
-        {
-            var result = typeof(Avx).GetMethod(nameof(Avx.Extract), new Type[] { typeof(Vector256<Int16>), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Avx.LoadAlignedVector256((Int16*)(_dataTable.inArrayPtr)),
-                                        (byte)1
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Int16)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunClsVarScenario()
-        {
-            var result = Avx.Extract(
-                _clsVar,
-                1
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_clsVar, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_UnsafeRead()
-        {
-            var firstOp = Unsafe.Read<Vector256<Int16>>(_dataTable.inArrayPtr);
-            var result = Avx.Extract(firstOp, 1);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_Load()
-        {
-            var firstOp = Avx.LoadVector256((Int16*)(_dataTable.inArrayPtr));
-            var result = Avx.Extract(firstOp, 1);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_LoadAligned()
-        {
-            var firstOp = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArrayPtr));
-            var result = Avx.Extract(firstOp, 1);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclFldScenario()
-        {
-            var test = new SimpleUnaryOpTest__ExtractInt161();
-            var result = Avx.Extract(test._fld, 1);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(test._fld, _dataTable.outArrayPtr);
-        }
-
-        public void RunFldScenario()
-        {
-            var result = Avx.Extract(_fld, 1);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_fld, _dataTable.outArrayPtr);
-        }
-
-        public void RunUnsupportedScenario()
-        {
-            Succeeded = false;
-
-            try
-            {
-                RunBasicScenario_UnsafeRead();
-            }
-            catch (PlatformNotSupportedException)
-            {
-                Succeeded = true;
-            }
-        }
-
-        private void ValidateResult(Vector256<Int16> firstOp, void* result, [CallerMemberName] string method = "")
-        {
-            Int16[] inArray = new Int16[Op1ElementCount];
-            Int16[] outArray = new Int16[RetElementCount];
-
-            Unsafe.WriteUnaligned(ref Unsafe.As<Int16, byte>(ref inArray[0]), firstOp);
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Int16, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector256<Int16>>());
-
-            ValidateResult(inArray, outArray, method);
-        }
-
-        private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "")
-        {
-            Int16[] inArray = new Int16[Op1ElementCount];
-            Int16[] outArray = new Int16[RetElementCount];
-
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Int16, byte>(ref inArray[0]), ref Unsafe.AsRef<byte>(firstOp), (uint)Unsafe.SizeOf<Vector256<Int16>>());
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Int16, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector256<Int16>>());
-
-            ValidateResult(inArray, outArray, method);
-        }
-
-        private void ValidateResult(Int16[] firstOp, Int16[] result, [CallerMemberName] string method = "")
-        {
-            if ((result[0] != firstOp[1]))
-            {
-                Succeeded = false;
-            }
-
-            if (!Succeeded)
-            {
-                Console.WriteLine($"{nameof(Avx)}.{nameof(Avx.Extract)}<Int16>(Vector256<Int16><9>): {method} failed:");
-                Console.WriteLine($"  firstOp: ({string.Join(", ", firstOp)})");
-                Console.WriteLine($"   result: ({string.Join(", ", result)})");
-                Console.WriteLine();
-            }
-        }
-    }
-}
diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int16.11.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int16.11.cs
deleted file mode 100644 (file)
index ba511b8..0000000
+++ /dev/null
@@ -1,309 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-/******************************************************************************
- * This file is auto-generated from a template file by the GenerateTests.csx  *
- * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make    *
- * changes, please update the corresponding template and run according to the *
- * directions listed in the file.                                             *
- ******************************************************************************/
-
-using System;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Runtime.Intrinsics;
-using System.Runtime.Intrinsics.X86;
-
-namespace JIT.HardwareIntrinsics.X86
-{
-    public static partial class Program
-    {
-        private static void ExtractInt1611()
-        {
-            var test = new SimpleUnaryOpTest__ExtractInt1611();
-            
-            try
-            {
-            if (test.IsSupported)
-            {
-                // Validates basic functionality works, using Unsafe.Read
-                test.RunBasicScenario_UnsafeRead();
-
-                if (Avx.IsSupported)
-                {
-                    // Validates basic functionality works, using Load
-                    test.RunBasicScenario_Load();
-
-                    // Validates basic functionality works, using LoadAligned
-                    test.RunBasicScenario_LoadAligned();
-                }
-
-                // Validates calling via reflection works, using Unsafe.Read
-                test.RunReflectionScenario_UnsafeRead();
-
-                if (Avx.IsSupported)
-                {
-                    // Validates calling via reflection works, using Load
-                    test.RunReflectionScenario_Load();
-
-                    // Validates calling via reflection works, using LoadAligned
-                    test.RunReflectionScenario_LoadAligned();
-                }
-
-                // Validates passing a static member works
-                test.RunClsVarScenario();
-
-                // Validates passing a local works, using Unsafe.Read
-                test.RunLclVarScenario_UnsafeRead();
-
-                if (Avx.IsSupported)
-                {
-                    // Validates passing a local works, using Load
-                    test.RunLclVarScenario_Load();
-
-                    // Validates passing a local works, using LoadAligned
-                    test.RunLclVarScenario_LoadAligned();
-                }
-
-                // Validates passing the field of a local works
-                test.RunLclFldScenario();
-
-                // Validates passing an instance member works
-                test.RunFldScenario();
-            }
-            else
-            {
-                // Validates we throw on unsupported hardware
-                test.RunUnsupportedScenario();
-            }
-            }
-            catch (PlatformNotSupportedException)
-            {
-                test.Succeeded = true;
-            }
-
-            if (!test.Succeeded)
-            {
-                throw new Exception("One or more scenarios did not complete as expected.");
-            }
-        }
-    }
-
-    public sealed unsafe class SimpleUnaryOpTest__ExtractInt1611
-    {
-        private static readonly int LargestVectorSize = 32;
-
-        private static readonly int Op1ElementCount = Unsafe.SizeOf<Vector256<Int16>>() / sizeof(Int16);
-        private static readonly int RetElementCount = Unsafe.SizeOf<Vector256<Int16>>() / sizeof(Int16);
-
-        private static Int16[] _data = new Int16[Op1ElementCount];
-
-        private static Vector256<Int16> _clsVar;
-
-        private Vector256<Int16> _fld;
-
-        private SimpleUnaryOpTest__DataTable<Int16, Int16> _dataTable;
-
-        static SimpleUnaryOpTest__ExtractInt1611()
-        {
-            var random = new Random();
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); }
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector256<Int16>, byte>(ref _clsVar), ref Unsafe.As<Int16, byte>(ref _data[0]), (uint)Unsafe.SizeOf<Vector256<Int16>>());
-        }
-
-        public SimpleUnaryOpTest__ExtractInt1611()
-        {
-            Succeeded = true;
-
-            var random = new Random();
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); }
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector256<Int16>, byte>(ref _fld), ref Unsafe.As<Int16, byte>(ref _data[0]), (uint)Unsafe.SizeOf<Vector256<Int16>>());
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); }
-            _dataTable = new SimpleUnaryOpTest__DataTable<Int16, Int16>(_data, new Int16[RetElementCount], LargestVectorSize);
-        }
-
-        public bool IsSupported => Avx.IsSupported;
-
-        public bool Succeeded { get; set; }
-
-        public void RunBasicScenario_UnsafeRead()
-        {
-            var result = Avx.Extract(
-                Unsafe.Read<Vector256<Int16>>(_dataTable.inArrayPtr),
-                11
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunBasicScenario_Load()
-        {
-            var result = Avx.Extract(
-                Avx.LoadVector256((Int16*)(_dataTable.inArrayPtr)),
-                11
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunBasicScenario_LoadAligned()
-        {
-            var result = Avx.Extract(
-                Avx.LoadAlignedVector256((Int16*)(_dataTable.inArrayPtr)),
-                11
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_UnsafeRead()
-        {
-            var result = typeof(Avx).GetMethod(nameof(Avx.Extract), new Type[] { typeof(Vector256<Int16>), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Unsafe.Read<Vector256<Int16>>(_dataTable.inArrayPtr),
-                                        (byte)11
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Int16)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_Load()
-        {
-            var result = typeof(Avx).GetMethod(nameof(Avx.Extract), new Type[] { typeof(Vector256<Int16>), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Avx.LoadVector256((Int16*)(_dataTable.inArrayPtr)),
-                                        (byte)11
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Int16)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_LoadAligned()
-        {
-            var result = typeof(Avx).GetMethod(nameof(Avx.Extract), new Type[] { typeof(Vector256<Int16>), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Avx.LoadAlignedVector256((Int16*)(_dataTable.inArrayPtr)),
-                                        (byte)11
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Int16)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunClsVarScenario()
-        {
-            var result = Avx.Extract(
-                _clsVar,
-                11
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_clsVar, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_UnsafeRead()
-        {
-            var firstOp = Unsafe.Read<Vector256<Int16>>(_dataTable.inArrayPtr);
-            var result = Avx.Extract(firstOp, 11);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_Load()
-        {
-            var firstOp = Avx.LoadVector256((Int16*)(_dataTable.inArrayPtr));
-            var result = Avx.Extract(firstOp, 11);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_LoadAligned()
-        {
-            var firstOp = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArrayPtr));
-            var result = Avx.Extract(firstOp, 11);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclFldScenario()
-        {
-            var test = new SimpleUnaryOpTest__ExtractInt1611();
-            var result = Avx.Extract(test._fld, 11);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(test._fld, _dataTable.outArrayPtr);
-        }
-
-        public void RunFldScenario()
-        {
-            var result = Avx.Extract(_fld, 11);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_fld, _dataTable.outArrayPtr);
-        }
-
-        public void RunUnsupportedScenario()
-        {
-            Succeeded = false;
-
-            try
-            {
-                RunBasicScenario_UnsafeRead();
-            }
-            catch (PlatformNotSupportedException)
-            {
-                Succeeded = true;
-            }
-        }
-
-        private void ValidateResult(Vector256<Int16> firstOp, void* result, [CallerMemberName] string method = "")
-        {
-            Int16[] inArray = new Int16[Op1ElementCount];
-            Int16[] outArray = new Int16[RetElementCount];
-
-            Unsafe.WriteUnaligned(ref Unsafe.As<Int16, byte>(ref inArray[0]), firstOp);
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Int16, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector256<Int16>>());
-
-            ValidateResult(inArray, outArray, method);
-        }
-
-        private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "")
-        {
-            Int16[] inArray = new Int16[Op1ElementCount];
-            Int16[] outArray = new Int16[RetElementCount];
-
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Int16, byte>(ref inArray[0]), ref Unsafe.AsRef<byte>(firstOp), (uint)Unsafe.SizeOf<Vector256<Int16>>());
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Int16, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector256<Int16>>());
-
-            ValidateResult(inArray, outArray, method);
-        }
-
-        private void ValidateResult(Int16[] firstOp, Int16[] result, [CallerMemberName] string method = "")
-        {
-            if ((result[0] != firstOp[11]))
-            {
-                Succeeded = false;
-            }
-
-            if (!Succeeded)
-            {
-                Console.WriteLine($"{nameof(Avx)}.{nameof(Avx.Extract)}<Int16>(Vector256<Int16><9>): {method} failed:");
-                Console.WriteLine($"  firstOp: ({string.Join(", ", firstOp)})");
-                Console.WriteLine($"   result: ({string.Join(", ", result)})");
-                Console.WriteLine();
-            }
-        }
-    }
-}
diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int16.27.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int16.27.cs
deleted file mode 100644 (file)
index 83d73da..0000000
+++ /dev/null
@@ -1,309 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-/******************************************************************************
- * This file is auto-generated from a template file by the GenerateTests.csx  *
- * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make    *
- * changes, please update the corresponding template and run according to the *
- * directions listed in the file.                                             *
- ******************************************************************************/
-
-using System;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Runtime.Intrinsics;
-using System.Runtime.Intrinsics.X86;
-
-namespace JIT.HardwareIntrinsics.X86
-{
-    public static partial class Program
-    {
-        private static void ExtractInt1627()
-        {
-            var test = new SimpleUnaryOpTest__ExtractInt1627();
-            
-            try
-            {
-            if (test.IsSupported)
-            {
-                // Validates basic functionality works, using Unsafe.Read
-                test.RunBasicScenario_UnsafeRead();
-
-                if (Avx.IsSupported)
-                {
-                    // Validates basic functionality works, using Load
-                    test.RunBasicScenario_Load();
-
-                    // Validates basic functionality works, using LoadAligned
-                    test.RunBasicScenario_LoadAligned();
-                }
-
-                // Validates calling via reflection works, using Unsafe.Read
-                test.RunReflectionScenario_UnsafeRead();
-
-                if (Avx.IsSupported)
-                {
-                    // Validates calling via reflection works, using Load
-                    test.RunReflectionScenario_Load();
-
-                    // Validates calling via reflection works, using LoadAligned
-                    test.RunReflectionScenario_LoadAligned();
-                }
-
-                // Validates passing a static member works
-                test.RunClsVarScenario();
-
-                // Validates passing a local works, using Unsafe.Read
-                test.RunLclVarScenario_UnsafeRead();
-
-                if (Avx.IsSupported)
-                {
-                    // Validates passing a local works, using Load
-                    test.RunLclVarScenario_Load();
-
-                    // Validates passing a local works, using LoadAligned
-                    test.RunLclVarScenario_LoadAligned();
-                }
-
-                // Validates passing the field of a local works
-                test.RunLclFldScenario();
-
-                // Validates passing an instance member works
-                test.RunFldScenario();
-            }
-            else
-            {
-                // Validates we throw on unsupported hardware
-                test.RunUnsupportedScenario();
-            }
-            }
-            catch (PlatformNotSupportedException)
-            {
-                test.Succeeded = true;
-            }
-
-            if (!test.Succeeded)
-            {
-                throw new Exception("One or more scenarios did not complete as expected.");
-            }
-        }
-    }
-
-    public sealed unsafe class SimpleUnaryOpTest__ExtractInt1627
-    {
-        private static readonly int LargestVectorSize = 32;
-
-        private static readonly int Op1ElementCount = Unsafe.SizeOf<Vector256<Int16>>() / sizeof(Int16);
-        private static readonly int RetElementCount = Unsafe.SizeOf<Vector256<Int16>>() / sizeof(Int16);
-
-        private static Int16[] _data = new Int16[Op1ElementCount];
-
-        private static Vector256<Int16> _clsVar;
-
-        private Vector256<Int16> _fld;
-
-        private SimpleUnaryOpTest__DataTable<Int16, Int16> _dataTable;
-
-        static SimpleUnaryOpTest__ExtractInt1627()
-        {
-            var random = new Random();
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); }
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector256<Int16>, byte>(ref _clsVar), ref Unsafe.As<Int16, byte>(ref _data[0]), (uint)Unsafe.SizeOf<Vector256<Int16>>());
-        }
-
-        public SimpleUnaryOpTest__ExtractInt1627()
-        {
-            Succeeded = true;
-
-            var random = new Random();
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); }
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector256<Int16>, byte>(ref _fld), ref Unsafe.As<Int16, byte>(ref _data[0]), (uint)Unsafe.SizeOf<Vector256<Int16>>());
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); }
-            _dataTable = new SimpleUnaryOpTest__DataTable<Int16, Int16>(_data, new Int16[RetElementCount], LargestVectorSize);
-        }
-
-        public bool IsSupported => Avx.IsSupported;
-
-        public bool Succeeded { get; set; }
-
-        public void RunBasicScenario_UnsafeRead()
-        {
-            var result = Avx.Extract(
-                Unsafe.Read<Vector256<Int16>>(_dataTable.inArrayPtr),
-                27
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunBasicScenario_Load()
-        {
-            var result = Avx.Extract(
-                Avx.LoadVector256((Int16*)(_dataTable.inArrayPtr)),
-                27
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunBasicScenario_LoadAligned()
-        {
-            var result = Avx.Extract(
-                Avx.LoadAlignedVector256((Int16*)(_dataTable.inArrayPtr)),
-                27
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_UnsafeRead()
-        {
-            var result = typeof(Avx).GetMethod(nameof(Avx.Extract), new Type[] { typeof(Vector256<Int16>), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Unsafe.Read<Vector256<Int16>>(_dataTable.inArrayPtr),
-                                        (byte)27
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Int16)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_Load()
-        {
-            var result = typeof(Avx).GetMethod(nameof(Avx.Extract), new Type[] { typeof(Vector256<Int16>), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Avx.LoadVector256((Int16*)(_dataTable.inArrayPtr)),
-                                        (byte)27
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Int16)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_LoadAligned()
-        {
-            var result = typeof(Avx).GetMethod(nameof(Avx.Extract), new Type[] { typeof(Vector256<Int16>), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Avx.LoadAlignedVector256((Int16*)(_dataTable.inArrayPtr)),
-                                        (byte)27
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Int16)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunClsVarScenario()
-        {
-            var result = Avx.Extract(
-                _clsVar,
-                27
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_clsVar, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_UnsafeRead()
-        {
-            var firstOp = Unsafe.Read<Vector256<Int16>>(_dataTable.inArrayPtr);
-            var result = Avx.Extract(firstOp, 27);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_Load()
-        {
-            var firstOp = Avx.LoadVector256((Int16*)(_dataTable.inArrayPtr));
-            var result = Avx.Extract(firstOp, 27);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_LoadAligned()
-        {
-            var firstOp = Avx.LoadAlignedVector256((Int16*)(_dataTable.inArrayPtr));
-            var result = Avx.Extract(firstOp, 27);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclFldScenario()
-        {
-            var test = new SimpleUnaryOpTest__ExtractInt1627();
-            var result = Avx.Extract(test._fld, 27);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(test._fld, _dataTable.outArrayPtr);
-        }
-
-        public void RunFldScenario()
-        {
-            var result = Avx.Extract(_fld, 27);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_fld, _dataTable.outArrayPtr);
-        }
-
-        public void RunUnsupportedScenario()
-        {
-            Succeeded = false;
-
-            try
-            {
-                RunBasicScenario_UnsafeRead();
-            }
-            catch (PlatformNotSupportedException)
-            {
-                Succeeded = true;
-            }
-        }
-
-        private void ValidateResult(Vector256<Int16> firstOp, void* result, [CallerMemberName] string method = "")
-        {
-            Int16[] inArray = new Int16[Op1ElementCount];
-            Int16[] outArray = new Int16[RetElementCount];
-
-            Unsafe.WriteUnaligned(ref Unsafe.As<Int16, byte>(ref inArray[0]), firstOp);
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Int16, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector256<Int16>>());
-
-            ValidateResult(inArray, outArray, method);
-        }
-
-        private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "")
-        {
-            Int16[] inArray = new Int16[Op1ElementCount];
-            Int16[] outArray = new Int16[RetElementCount];
-
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Int16, byte>(ref inArray[0]), ref Unsafe.AsRef<byte>(firstOp), (uint)Unsafe.SizeOf<Vector256<Int16>>());
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Int16, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector256<Int16>>());
-
-            ValidateResult(inArray, outArray, method);
-        }
-
-        private void ValidateResult(Int16[] firstOp, Int16[] result, [CallerMemberName] string method = "")
-        {
-            if ((result[0] != firstOp[11]))
-            {
-                Succeeded = false;
-            }
-
-            if (!Succeeded)
-            {
-                Console.WriteLine($"{nameof(Avx)}.{nameof(Avx.Extract)}<Int16>(Vector256<Int16><9>): {method} failed:");
-                Console.WriteLine($"  firstOp: ({string.Join(", ", firstOp)})");
-                Console.WriteLine($"   result: ({string.Join(", ", result)})");
-                Console.WriteLine();
-            }
-        }
-    }
-}
diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.SByte.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.SByte.1.cs
deleted file mode 100644 (file)
index 387e00b..0000000
+++ /dev/null
@@ -1,309 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-/******************************************************************************
- * This file is auto-generated from a template file by the GenerateTests.csx  *
- * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make    *
- * changes, please update the corresponding template and run according to the *
- * directions listed in the file.                                             *
- ******************************************************************************/
-
-using System;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Runtime.Intrinsics;
-using System.Runtime.Intrinsics.X86;
-
-namespace JIT.HardwareIntrinsics.X86
-{
-    public static partial class Program
-    {
-        private static void ExtractSByte1()
-        {
-            var test = new SimpleUnaryOpTest__ExtractSByte1();
-            
-            try
-            {
-            if (test.IsSupported)
-            {
-                // Validates basic functionality works, using Unsafe.Read
-                test.RunBasicScenario_UnsafeRead();
-
-                if (Avx.IsSupported)
-                {
-                    // Validates basic functionality works, using Load
-                    test.RunBasicScenario_Load();
-
-                    // Validates basic functionality works, using LoadAligned
-                    test.RunBasicScenario_LoadAligned();
-                }
-
-                // Validates calling via reflection works, using Unsafe.Read
-                test.RunReflectionScenario_UnsafeRead();
-
-                if (Avx.IsSupported)
-                {
-                    // Validates calling via reflection works, using Load
-                    test.RunReflectionScenario_Load();
-
-                    // Validates calling via reflection works, using LoadAligned
-                    test.RunReflectionScenario_LoadAligned();
-                }
-
-                // Validates passing a static member works
-                test.RunClsVarScenario();
-
-                // Validates passing a local works, using Unsafe.Read
-                test.RunLclVarScenario_UnsafeRead();
-
-                if (Avx.IsSupported)
-                {
-                    // Validates passing a local works, using Load
-                    test.RunLclVarScenario_Load();
-
-                    // Validates passing a local works, using LoadAligned
-                    test.RunLclVarScenario_LoadAligned();
-                }
-
-                // Validates passing the field of a local works
-                test.RunLclFldScenario();
-
-                // Validates passing an instance member works
-                test.RunFldScenario();
-            }
-            else
-            {
-                // Validates we throw on unsupported hardware
-                test.RunUnsupportedScenario();
-            }
-            }
-            catch (PlatformNotSupportedException)
-            {
-                test.Succeeded = true;
-            }
-
-            if (!test.Succeeded)
-            {
-                throw new Exception("One or more scenarios did not complete as expected.");
-            }
-        }
-    }
-
-    public sealed unsafe class SimpleUnaryOpTest__ExtractSByte1
-    {
-        private static readonly int LargestVectorSize = 32;
-
-        private static readonly int Op1ElementCount = Unsafe.SizeOf<Vector256<SByte>>() / sizeof(SByte);
-        private static readonly int RetElementCount = Unsafe.SizeOf<Vector256<SByte>>() / sizeof(SByte);
-
-        private static SByte[] _data = new SByte[Op1ElementCount];
-
-        private static Vector256<SByte> _clsVar;
-
-        private Vector256<SByte> _fld;
-
-        private SimpleUnaryOpTest__DataTable<SByte, SByte> _dataTable;
-
-        static SimpleUnaryOpTest__ExtractSByte1()
-        {
-            var random = new Random();
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); }
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector256<SByte>, byte>(ref _clsVar), ref Unsafe.As<SByte, byte>(ref _data[0]), (uint)Unsafe.SizeOf<Vector256<SByte>>());
-        }
-
-        public SimpleUnaryOpTest__ExtractSByte1()
-        {
-            Succeeded = true;
-
-            var random = new Random();
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); }
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector256<SByte>, byte>(ref _fld), ref Unsafe.As<SByte, byte>(ref _data[0]), (uint)Unsafe.SizeOf<Vector256<SByte>>());
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); }
-            _dataTable = new SimpleUnaryOpTest__DataTable<SByte, SByte>(_data, new SByte[RetElementCount], LargestVectorSize);
-        }
-
-        public bool IsSupported => Avx.IsSupported;
-
-        public bool Succeeded { get; set; }
-
-        public void RunBasicScenario_UnsafeRead()
-        {
-            var result = Avx.Extract(
-                Unsafe.Read<Vector256<SByte>>(_dataTable.inArrayPtr),
-                1
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunBasicScenario_Load()
-        {
-            var result = Avx.Extract(
-                Avx.LoadVector256((SByte*)(_dataTable.inArrayPtr)),
-                1
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunBasicScenario_LoadAligned()
-        {
-            var result = Avx.Extract(
-                Avx.LoadAlignedVector256((SByte*)(_dataTable.inArrayPtr)),
-                1
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_UnsafeRead()
-        {
-            var result = typeof(Avx).GetMethod(nameof(Avx.Extract), new Type[] { typeof(Vector256<SByte>), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Unsafe.Read<Vector256<SByte>>(_dataTable.inArrayPtr),
-                                        (byte)1
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (SByte)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_Load()
-        {
-            var result = typeof(Avx).GetMethod(nameof(Avx.Extract), new Type[] { typeof(Vector256<SByte>), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Avx.LoadVector256((SByte*)(_dataTable.inArrayPtr)),
-                                        (byte)1
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (SByte)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_LoadAligned()
-        {
-            var result = typeof(Avx).GetMethod(nameof(Avx.Extract), new Type[] { typeof(Vector256<SByte>), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Avx.LoadAlignedVector256((SByte*)(_dataTable.inArrayPtr)),
-                                        (byte)1
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (SByte)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunClsVarScenario()
-        {
-            var result = Avx.Extract(
-                _clsVar,
-                1
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_clsVar, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_UnsafeRead()
-        {
-            var firstOp = Unsafe.Read<Vector256<SByte>>(_dataTable.inArrayPtr);
-            var result = Avx.Extract(firstOp, 1);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_Load()
-        {
-            var firstOp = Avx.LoadVector256((SByte*)(_dataTable.inArrayPtr));
-            var result = Avx.Extract(firstOp, 1);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_LoadAligned()
-        {
-            var firstOp = Avx.LoadAlignedVector256((SByte*)(_dataTable.inArrayPtr));
-            var result = Avx.Extract(firstOp, 1);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclFldScenario()
-        {
-            var test = new SimpleUnaryOpTest__ExtractSByte1();
-            var result = Avx.Extract(test._fld, 1);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(test._fld, _dataTable.outArrayPtr);
-        }
-
-        public void RunFldScenario()
-        {
-            var result = Avx.Extract(_fld, 1);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_fld, _dataTable.outArrayPtr);
-        }
-
-        public void RunUnsupportedScenario()
-        {
-            Succeeded = false;
-
-            try
-            {
-                RunBasicScenario_UnsafeRead();
-            }
-            catch (PlatformNotSupportedException)
-            {
-                Succeeded = true;
-            }
-        }
-
-        private void ValidateResult(Vector256<SByte> firstOp, void* result, [CallerMemberName] string method = "")
-        {
-            SByte[] inArray = new SByte[Op1ElementCount];
-            SByte[] outArray = new SByte[RetElementCount];
-
-            Unsafe.WriteUnaligned(ref Unsafe.As<SByte, byte>(ref inArray[0]), firstOp);
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<SByte, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector256<SByte>>());
-
-            ValidateResult(inArray, outArray, method);
-        }
-
-        private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "")
-        {
-            SByte[] inArray = new SByte[Op1ElementCount];
-            SByte[] outArray = new SByte[RetElementCount];
-
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<SByte, byte>(ref inArray[0]), ref Unsafe.AsRef<byte>(firstOp), (uint)Unsafe.SizeOf<Vector256<SByte>>());
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<SByte, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector256<SByte>>());
-
-            ValidateResult(inArray, outArray, method);
-        }
-
-        private void ValidateResult(SByte[] firstOp, SByte[] result, [CallerMemberName] string method = "")
-        {
-            if ((result[0] != firstOp[1]))
-            {
-                Succeeded = false;
-            }
-
-            if (!Succeeded)
-            {
-                Console.WriteLine($"{nameof(Avx)}.{nameof(Avx.Extract)}<SByte>(Vector256<SByte><9>): {method} failed:");
-                Console.WriteLine($"  firstOp: ({string.Join(", ", firstOp)})");
-                Console.WriteLine($"   result: ({string.Join(", ", result)})");
-                Console.WriteLine();
-            }
-        }
-    }
-}
diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.SByte.20.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.SByte.20.cs
deleted file mode 100644 (file)
index 4fb463a..0000000
+++ /dev/null
@@ -1,309 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-/******************************************************************************
- * This file is auto-generated from a template file by the GenerateTests.csx  *
- * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make    *
- * changes, please update the corresponding template and run according to the *
- * directions listed in the file.                                             *
- ******************************************************************************/
-
-using System;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Runtime.Intrinsics;
-using System.Runtime.Intrinsics.X86;
-
-namespace JIT.HardwareIntrinsics.X86
-{
-    public static partial class Program
-    {
-        private static void ExtractSByte20()
-        {
-            var test = new SimpleUnaryOpTest__ExtractSByte20();
-            
-            try
-            {
-            if (test.IsSupported)
-            {
-                // Validates basic functionality works, using Unsafe.Read
-                test.RunBasicScenario_UnsafeRead();
-
-                if (Avx.IsSupported)
-                {
-                    // Validates basic functionality works, using Load
-                    test.RunBasicScenario_Load();
-
-                    // Validates basic functionality works, using LoadAligned
-                    test.RunBasicScenario_LoadAligned();
-                }
-
-                // Validates calling via reflection works, using Unsafe.Read
-                test.RunReflectionScenario_UnsafeRead();
-
-                if (Avx.IsSupported)
-                {
-                    // Validates calling via reflection works, using Load
-                    test.RunReflectionScenario_Load();
-
-                    // Validates calling via reflection works, using LoadAligned
-                    test.RunReflectionScenario_LoadAligned();
-                }
-
-                // Validates passing a static member works
-                test.RunClsVarScenario();
-
-                // Validates passing a local works, using Unsafe.Read
-                test.RunLclVarScenario_UnsafeRead();
-
-                if (Avx.IsSupported)
-                {
-                    // Validates passing a local works, using Load
-                    test.RunLclVarScenario_Load();
-
-                    // Validates passing a local works, using LoadAligned
-                    test.RunLclVarScenario_LoadAligned();
-                }
-
-                // Validates passing the field of a local works
-                test.RunLclFldScenario();
-
-                // Validates passing an instance member works
-                test.RunFldScenario();
-            }
-            else
-            {
-                // Validates we throw on unsupported hardware
-                test.RunUnsupportedScenario();
-            }
-            }
-            catch (PlatformNotSupportedException)
-            {
-                test.Succeeded = true;
-            }
-
-            if (!test.Succeeded)
-            {
-                throw new Exception("One or more scenarios did not complete as expected.");
-            }
-        }
-    }
-
-    public sealed unsafe class SimpleUnaryOpTest__ExtractSByte20
-    {
-        private static readonly int LargestVectorSize = 32;
-
-        private static readonly int Op1ElementCount = Unsafe.SizeOf<Vector256<SByte>>() / sizeof(SByte);
-        private static readonly int RetElementCount = Unsafe.SizeOf<Vector256<SByte>>() / sizeof(SByte);
-
-        private static SByte[] _data = new SByte[Op1ElementCount];
-
-        private static Vector256<SByte> _clsVar;
-
-        private Vector256<SByte> _fld;
-
-        private SimpleUnaryOpTest__DataTable<SByte, SByte> _dataTable;
-
-        static SimpleUnaryOpTest__ExtractSByte20()
-        {
-            var random = new Random();
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); }
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector256<SByte>, byte>(ref _clsVar), ref Unsafe.As<SByte, byte>(ref _data[0]), (uint)Unsafe.SizeOf<Vector256<SByte>>());
-        }
-
-        public SimpleUnaryOpTest__ExtractSByte20()
-        {
-            Succeeded = true;
-
-            var random = new Random();
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); }
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector256<SByte>, byte>(ref _fld), ref Unsafe.As<SByte, byte>(ref _data[0]), (uint)Unsafe.SizeOf<Vector256<SByte>>());
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); }
-            _dataTable = new SimpleUnaryOpTest__DataTable<SByte, SByte>(_data, new SByte[RetElementCount], LargestVectorSize);
-        }
-
-        public bool IsSupported => Avx.IsSupported;
-
-        public bool Succeeded { get; set; }
-
-        public void RunBasicScenario_UnsafeRead()
-        {
-            var result = Avx.Extract(
-                Unsafe.Read<Vector256<SByte>>(_dataTable.inArrayPtr),
-                20
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunBasicScenario_Load()
-        {
-            var result = Avx.Extract(
-                Avx.LoadVector256((SByte*)(_dataTable.inArrayPtr)),
-                20
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunBasicScenario_LoadAligned()
-        {
-            var result = Avx.Extract(
-                Avx.LoadAlignedVector256((SByte*)(_dataTable.inArrayPtr)),
-                20
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_UnsafeRead()
-        {
-            var result = typeof(Avx).GetMethod(nameof(Avx.Extract), new Type[] { typeof(Vector256<SByte>), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Unsafe.Read<Vector256<SByte>>(_dataTable.inArrayPtr),
-                                        (byte)20
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (SByte)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_Load()
-        {
-            var result = typeof(Avx).GetMethod(nameof(Avx.Extract), new Type[] { typeof(Vector256<SByte>), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Avx.LoadVector256((SByte*)(_dataTable.inArrayPtr)),
-                                        (byte)20
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (SByte)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_LoadAligned()
-        {
-            var result = typeof(Avx).GetMethod(nameof(Avx.Extract), new Type[] { typeof(Vector256<SByte>), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Avx.LoadAlignedVector256((SByte*)(_dataTable.inArrayPtr)),
-                                        (byte)20
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (SByte)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunClsVarScenario()
-        {
-            var result = Avx.Extract(
-                _clsVar,
-                20
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_clsVar, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_UnsafeRead()
-        {
-            var firstOp = Unsafe.Read<Vector256<SByte>>(_dataTable.inArrayPtr);
-            var result = Avx.Extract(firstOp, 20);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_Load()
-        {
-            var firstOp = Avx.LoadVector256((SByte*)(_dataTable.inArrayPtr));
-            var result = Avx.Extract(firstOp, 20);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_LoadAligned()
-        {
-            var firstOp = Avx.LoadAlignedVector256((SByte*)(_dataTable.inArrayPtr));
-            var result = Avx.Extract(firstOp, 20);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclFldScenario()
-        {
-            var test = new SimpleUnaryOpTest__ExtractSByte20();
-            var result = Avx.Extract(test._fld, 20);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(test._fld, _dataTable.outArrayPtr);
-        }
-
-        public void RunFldScenario()
-        {
-            var result = Avx.Extract(_fld, 20);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_fld, _dataTable.outArrayPtr);
-        }
-
-        public void RunUnsupportedScenario()
-        {
-            Succeeded = false;
-
-            try
-            {
-                RunBasicScenario_UnsafeRead();
-            }
-            catch (PlatformNotSupportedException)
-            {
-                Succeeded = true;
-            }
-        }
-
-        private void ValidateResult(Vector256<SByte> firstOp, void* result, [CallerMemberName] string method = "")
-        {
-            SByte[] inArray = new SByte[Op1ElementCount];
-            SByte[] outArray = new SByte[RetElementCount];
-
-            Unsafe.WriteUnaligned(ref Unsafe.As<SByte, byte>(ref inArray[0]), firstOp);
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<SByte, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector256<SByte>>());
-
-            ValidateResult(inArray, outArray, method);
-        }
-
-        private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "")
-        {
-            SByte[] inArray = new SByte[Op1ElementCount];
-            SByte[] outArray = new SByte[RetElementCount];
-
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<SByte, byte>(ref inArray[0]), ref Unsafe.AsRef<byte>(firstOp), (uint)Unsafe.SizeOf<Vector256<SByte>>());
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<SByte, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector256<SByte>>());
-
-            ValidateResult(inArray, outArray, method);
-        }
-
-        private void ValidateResult(SByte[] firstOp, SByte[] result, [CallerMemberName] string method = "")
-        {
-            if ((result[0] != firstOp[20]))
-            {
-                Succeeded = false;
-            }
-
-            if (!Succeeded)
-            {
-                Console.WriteLine($"{nameof(Avx)}.{nameof(Avx.Extract)}<SByte>(Vector256<SByte><9>): {method} failed:");
-                Console.WriteLine($"  firstOp: ({string.Join(", ", firstOp)})");
-                Console.WriteLine($"   result: ({string.Join(", ", result)})");
-                Console.WriteLine();
-            }
-        }
-    }
-}
diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.SByte.52.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.SByte.52.cs
deleted file mode 100644 (file)
index 391703f..0000000
+++ /dev/null
@@ -1,309 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-/******************************************************************************
- * This file is auto-generated from a template file by the GenerateTests.csx  *
- * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make    *
- * changes, please update the corresponding template and run according to the *
- * directions listed in the file.                                             *
- ******************************************************************************/
-
-using System;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Runtime.Intrinsics;
-using System.Runtime.Intrinsics.X86;
-
-namespace JIT.HardwareIntrinsics.X86
-{
-    public static partial class Program
-    {
-        private static void ExtractSByte52()
-        {
-            var test = new SimpleUnaryOpTest__ExtractSByte52();
-            
-            try
-            {
-            if (test.IsSupported)
-            {
-                // Validates basic functionality works, using Unsafe.Read
-                test.RunBasicScenario_UnsafeRead();
-
-                if (Avx.IsSupported)
-                {
-                    // Validates basic functionality works, using Load
-                    test.RunBasicScenario_Load();
-
-                    // Validates basic functionality works, using LoadAligned
-                    test.RunBasicScenario_LoadAligned();
-                }
-
-                // Validates calling via reflection works, using Unsafe.Read
-                test.RunReflectionScenario_UnsafeRead();
-
-                if (Avx.IsSupported)
-                {
-                    // Validates calling via reflection works, using Load
-                    test.RunReflectionScenario_Load();
-
-                    // Validates calling via reflection works, using LoadAligned
-                    test.RunReflectionScenario_LoadAligned();
-                }
-
-                // Validates passing a static member works
-                test.RunClsVarScenario();
-
-                // Validates passing a local works, using Unsafe.Read
-                test.RunLclVarScenario_UnsafeRead();
-
-                if (Avx.IsSupported)
-                {
-                    // Validates passing a local works, using Load
-                    test.RunLclVarScenario_Load();
-
-                    // Validates passing a local works, using LoadAligned
-                    test.RunLclVarScenario_LoadAligned();
-                }
-
-                // Validates passing the field of a local works
-                test.RunLclFldScenario();
-
-                // Validates passing an instance member works
-                test.RunFldScenario();
-            }
-            else
-            {
-                // Validates we throw on unsupported hardware
-                test.RunUnsupportedScenario();
-            }
-            }
-            catch (PlatformNotSupportedException)
-            {
-                test.Succeeded = true;
-            }
-
-            if (!test.Succeeded)
-            {
-                throw new Exception("One or more scenarios did not complete as expected.");
-            }
-        }
-    }
-
-    public sealed unsafe class SimpleUnaryOpTest__ExtractSByte52
-    {
-        private static readonly int LargestVectorSize = 32;
-
-        private static readonly int Op1ElementCount = Unsafe.SizeOf<Vector256<SByte>>() / sizeof(SByte);
-        private static readonly int RetElementCount = Unsafe.SizeOf<Vector256<SByte>>() / sizeof(SByte);
-
-        private static SByte[] _data = new SByte[Op1ElementCount];
-
-        private static Vector256<SByte> _clsVar;
-
-        private Vector256<SByte> _fld;
-
-        private SimpleUnaryOpTest__DataTable<SByte, SByte> _dataTable;
-
-        static SimpleUnaryOpTest__ExtractSByte52()
-        {
-            var random = new Random();
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); }
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector256<SByte>, byte>(ref _clsVar), ref Unsafe.As<SByte, byte>(ref _data[0]), (uint)Unsafe.SizeOf<Vector256<SByte>>());
-        }
-
-        public SimpleUnaryOpTest__ExtractSByte52()
-        {
-            Succeeded = true;
-
-            var random = new Random();
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); }
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector256<SByte>, byte>(ref _fld), ref Unsafe.As<SByte, byte>(ref _data[0]), (uint)Unsafe.SizeOf<Vector256<SByte>>());
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); }
-            _dataTable = new SimpleUnaryOpTest__DataTable<SByte, SByte>(_data, new SByte[RetElementCount], LargestVectorSize);
-        }
-
-        public bool IsSupported => Avx.IsSupported;
-
-        public bool Succeeded { get; set; }
-
-        public void RunBasicScenario_UnsafeRead()
-        {
-            var result = Avx.Extract(
-                Unsafe.Read<Vector256<SByte>>(_dataTable.inArrayPtr),
-                52
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunBasicScenario_Load()
-        {
-            var result = Avx.Extract(
-                Avx.LoadVector256((SByte*)(_dataTable.inArrayPtr)),
-                52
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunBasicScenario_LoadAligned()
-        {
-            var result = Avx.Extract(
-                Avx.LoadAlignedVector256((SByte*)(_dataTable.inArrayPtr)),
-                52
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_UnsafeRead()
-        {
-            var result = typeof(Avx).GetMethod(nameof(Avx.Extract), new Type[] { typeof(Vector256<SByte>), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Unsafe.Read<Vector256<SByte>>(_dataTable.inArrayPtr),
-                                        (byte)52
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (SByte)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_Load()
-        {
-            var result = typeof(Avx).GetMethod(nameof(Avx.Extract), new Type[] { typeof(Vector256<SByte>), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Avx.LoadVector256((SByte*)(_dataTable.inArrayPtr)),
-                                        (byte)52
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (SByte)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_LoadAligned()
-        {
-            var result = typeof(Avx).GetMethod(nameof(Avx.Extract), new Type[] { typeof(Vector256<SByte>), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Avx.LoadAlignedVector256((SByte*)(_dataTable.inArrayPtr)),
-                                        (byte)52
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (SByte)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunClsVarScenario()
-        {
-            var result = Avx.Extract(
-                _clsVar,
-                52
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_clsVar, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_UnsafeRead()
-        {
-            var firstOp = Unsafe.Read<Vector256<SByte>>(_dataTable.inArrayPtr);
-            var result = Avx.Extract(firstOp, 52);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_Load()
-        {
-            var firstOp = Avx.LoadVector256((SByte*)(_dataTable.inArrayPtr));
-            var result = Avx.Extract(firstOp, 52);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_LoadAligned()
-        {
-            var firstOp = Avx.LoadAlignedVector256((SByte*)(_dataTable.inArrayPtr));
-            var result = Avx.Extract(firstOp, 52);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclFldScenario()
-        {
-            var test = new SimpleUnaryOpTest__ExtractSByte52();
-            var result = Avx.Extract(test._fld, 52);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(test._fld, _dataTable.outArrayPtr);
-        }
-
-        public void RunFldScenario()
-        {
-            var result = Avx.Extract(_fld, 52);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_fld, _dataTable.outArrayPtr);
-        }
-
-        public void RunUnsupportedScenario()
-        {
-            Succeeded = false;
-
-            try
-            {
-                RunBasicScenario_UnsafeRead();
-            }
-            catch (PlatformNotSupportedException)
-            {
-                Succeeded = true;
-            }
-        }
-
-        private void ValidateResult(Vector256<SByte> firstOp, void* result, [CallerMemberName] string method = "")
-        {
-            SByte[] inArray = new SByte[Op1ElementCount];
-            SByte[] outArray = new SByte[RetElementCount];
-
-            Unsafe.WriteUnaligned(ref Unsafe.As<SByte, byte>(ref inArray[0]), firstOp);
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<SByte, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector256<SByte>>());
-
-            ValidateResult(inArray, outArray, method);
-        }
-
-        private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "")
-        {
-            SByte[] inArray = new SByte[Op1ElementCount];
-            SByte[] outArray = new SByte[RetElementCount];
-
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<SByte, byte>(ref inArray[0]), ref Unsafe.AsRef<byte>(firstOp), (uint)Unsafe.SizeOf<Vector256<SByte>>());
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<SByte, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector256<SByte>>());
-
-            ValidateResult(inArray, outArray, method);
-        }
-
-        private void ValidateResult(SByte[] firstOp, SByte[] result, [CallerMemberName] string method = "")
-        {
-            if ((result[0] != firstOp[20]))
-            {
-                Succeeded = false;
-            }
-
-            if (!Succeeded)
-            {
-                Console.WriteLine($"{nameof(Avx)}.{nameof(Avx.Extract)}<SByte>(Vector256<SByte><9>): {method} failed:");
-                Console.WriteLine($"  firstOp: ({string.Join(", ", firstOp)})");
-                Console.WriteLine($"   result: ({string.Join(", ", result)})");
-                Console.WriteLine();
-            }
-        }
-    }
-}
diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/MaskLoad_r.csproj b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/MaskLoad_r.csproj
deleted file mode 100644 (file)
index a35fbf8..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <SchemaVersion>2.0</SchemaVersion>
-    <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
-    <OutputType>Exe</OutputType>
-    <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
-    <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
-    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
-  </PropertyGroup>
-  <!-- Default configurations to help VS understand the configurations -->
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "></PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " />
-  <ItemGroup>
-    <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
-      <Visible>False</Visible>
-    </CodeAnalysisDependentAssemblyPaths>
-  </ItemGroup>
-  <PropertyGroup>
-    <DebugType>None</DebugType>
-    <Optimize></Optimize>
-  </PropertyGroup>
-  <ItemGroup>
-    <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="MaskLoad.cs" />
-  </ItemGroup>
-  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
-  <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' "></PropertyGroup>
-</Project>
diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/MaskLoad_ro.csproj b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/MaskLoad_ro.csproj
deleted file mode 100644 (file)
index d0a0a9c..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <SchemaVersion>2.0</SchemaVersion>
-    <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
-    <OutputType>Exe</OutputType>
-    <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
-    <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
-    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
-  </PropertyGroup>
-  <!-- Default configurations to help VS understand the configurations -->
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "></PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " />
-  <ItemGroup>
-    <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
-      <Visible>False</Visible>
-    </CodeAnalysisDependentAssemblyPaths>
-  </ItemGroup>
-  <PropertyGroup>
-    <DebugType>None</DebugType>
-    <Optimize>True</Optimize>
-  </PropertyGroup>
-  <ItemGroup>
-    <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="MaskLoad.cs" />
-  </ItemGroup>
-  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
-  <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' "></PropertyGroup>
-</Project>
index 9c52458..0b40b21 100644 (file)
@@ -30,16 +30,10 @@ namespace JIT.HardwareIntrinsics.X86
                 ["DuplicateEvenIndexed.Single"] = DuplicateEvenIndexedSingle,
                 ["DuplicateOddIndexed.Single"] = DuplicateOddIndexedSingle,
                 ["Extract.Byte.1"] = ExtractByte1,
-                ["Extract.SByte.1"] = ExtractSByte1,
                 ["Extract.Byte.20"] = ExtractByte20,
-                ["Extract.SByte.20"] = ExtractSByte20,
                 ["Extract.Byte.52"] = ExtractByte52,
-                ["Extract.SByte.52"] = ExtractSByte52,
-                ["Extract.Int16.1"] = ExtractInt161,
                 ["Extract.UInt16.1"] = ExtractUInt161,
-                ["Extract.Int16.11"] = ExtractInt1611,
                 ["Extract.UInt16.11"] = ExtractUInt1611,
-                ["Extract.Int16.27"] = ExtractInt1627,
                 ["Extract.UInt16.27"] = ExtractUInt1627,
                 ["Extract.Int32.1"] = ExtractInt321,
                 ["Extract.UInt32.1"] = ExtractUInt321,
index e8f44cd..13c621f 100644 (file)
@@ -137,9 +137,7 @@ private static readonly (string templateFileName, Dictionary<string, string> tem
     ("SimpleBinOpTest.template",        new Dictionary<string, string> { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "CompareUnordered",             ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double",                                          ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(double)(random.NextDouble())",                         ["NextValueOp2"] = "(double)(random.NextDouble())",                                     ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != ((double.IsNaN(left[0]) || double.IsNaN(right[0])) ? -1 : 0)",                          ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != ((double.IsNaN(left[i]) || double.IsNaN(right[i])) ? -1 : 0)"}),
     ("SimpleBinOpTest.template",        new Dictionary<string, string> { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Divide",                       ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double",                                          ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(double)(random.NextDouble())",                         ["NextValueOp2"] = "(double)(random.NextDouble())",                                     ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(left[0] / right[0]) != BitConverter.DoubleToInt64Bits(result[0])",                                    ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(left[i] / right[i]) != BitConverter.DoubleToInt64Bits(result[i])"}),
     ("SimpleBinOpTest.template",        new Dictionary<string, string> { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "DivideScalar",                 ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double",                                          ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(double)(random.NextDouble())",                         ["NextValueOp2"] = "(double)(random.NextDouble())",                                     ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(left[0] / right[0]) != BitConverter.DoubleToInt64Bits(result[0])",                                    ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(left[i]) != BitConverter.DoubleToInt64Bits(result[i])"}),
-    ("ExtractScalarTest.template",      new Dictionary<string, string> { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Extract",                      ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16",  ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16",                                                                                       ["Imm"] = "1",   ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(short)(random.Next(0, int.MaxValue))",                                                                                                         ["ValidateFirstResult"] = "(result[0] != firstOp[1])"}),
     ("ExtractScalarTest.template",      new Dictionary<string, string> { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Extract",                      ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16",                                                                                      ["Imm"] = "1",   ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(ushort)(random.Next(0, int.MaxValue))",                                                                                                        ["ValidateFirstResult"] = "(result[0] != firstOp[1])"}),
-    ("ExtractScalarTest.template",      new Dictionary<string, string> { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Extract",                      ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16",  ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16",                                                                                       ["Imm"] = "129", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(short)(random.Next(0, int.MaxValue))",                                                                                                         ["ValidateFirstResult"] = "(result[0] != firstOp[1])"}),
     ("ExtractScalarTest.template",      new Dictionary<string, string> { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Extract",                      ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16",                                                                                      ["Imm"] = "129", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(ushort)(random.Next(0, int.MaxValue))",                                                                                                        ["ValidateFirstResult"] = "(result[0] != firstOp[1])"}),
     ("InsertScalarTest.template",       new Dictionary<string, string> { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Insert",                       ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16",  ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16",                                                               ["Data"] = "(short)2",  ["Imm"] = "1",   ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(short)0",                                                                                                                                      ["ValidateFirstResult"] = "(i == 1 ? result[i] != 2 : result[i] != 0)"}),
     ("InsertScalarTest.template",       new Dictionary<string, string> { ["Isa"] = "Sse2", ["LoadIsa"] = "Sse2", ["Method"] = "Insert",                       ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16",                                                              ["Data"] = "(ushort)2", ["Imm"] = "1",   ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(ushort)0",                                                                                                                                     ["ValidateFirstResult"] = "(i == 1 ? result[i] != 2 : result[i] != 0)"}),
@@ -284,14 +282,12 @@ private static readonly (string templateFileName, Dictionary<string, string> tem
     ("SimpleBinOpTest.template",     new Dictionary<string, string> { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "CompareEqual",                  ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64",   ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Int64",  ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64",                                                                                                       ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(long)(random.Next(int.MinValue, int.MaxValue))",      ["NextValueOp2"] = "(long)(random.Next(int.MinValue, int.MaxValue))",                                                                  ["ValidateFirstResult"] = "result[0] != ((left[0] == right[0]) ? unchecked((long)(-1)) : 0)",                                                                                                                                                                                   ["ValidateRemainingResults"] = "result[i] != ((left[i] == right[i]) ? unchecked((long)(-1)) : 0)"}),
     ("SimpleBinOpTest.template",     new Dictionary<string, string> { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "CompareEqual",                  ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64",  ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64",                                                                                                      ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(ulong)(random.Next(0, int.MaxValue))",                ["NextValueOp2"] = "(ulong)(random.Next(0, int.MaxValue))",                                                                            ["ValidateFirstResult"] = "result[0] != ((left[0] == right[0]) ? unchecked((ulong)(-1)) : 0)",                                                                                                                                                                                  ["ValidateRemainingResults"] = "result[i] != ((left[i] == right[i]) ? unchecked((ulong)(-1)) : 0)"}),
     ("ExtractScalarTest.template",   new Dictionary<string, string> { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "Extract",                       ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte",    ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Byte",                                                                                                                                                    ["Imm"] = "1",   ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(byte)(random.Next(0, byte.MaxValue))",                                                                                                                                                       ["ValidateFirstResult"] = "(result[0] != firstOp[1])"}),
-    ("ExtractScalarTest.template",   new Dictionary<string, string> { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "Extract",                       ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte",   ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "SByte",                                                                                                                                                   ["Imm"] = "1",   ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(sbyte)(random.Next(0, sbyte.MaxValue))",                                                                                                                                                     ["ValidateFirstResult"] = "(result[0] != firstOp[1])"}),
     ("ExtractScalarTest.template",   new Dictionary<string, string> { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "Extract",                       ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32",   ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Int32",                                                                                                                                                   ["Imm"] = "1",   ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(int)(random.Next(0, int.MaxValue))",                                                                                                                                                         ["ValidateFirstResult"] = "(result[0] != firstOp[1])"}),
     ("ExtractScalarTest.template",   new Dictionary<string, string> { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "Extract",                       ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32",  ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "UInt32",                                                                                                                                                  ["Imm"] = "1",   ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(uint)(random.Next(0, int.MaxValue))",                                                                                                                                                        ["ValidateFirstResult"] = "(result[0] != firstOp[1])"}),
     ("ExtractScalarTest.template",   new Dictionary<string, string> { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "Extract",                       ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64",   ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Int64",                                                                                                                                                   ["Imm"] = "1",   ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(long)(random.Next(0, int.MaxValue))",                                                                                                                                                        ["ValidateFirstResult"] = "(result[0] != firstOp[1])"}),
     ("ExtractScalarTest.template",   new Dictionary<string, string> { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "Extract",                       ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64",  ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "UInt64",                                                                                                                                                  ["Imm"] = "1",   ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(ulong)(random.Next(0, int.MaxValue))",                                                                                                                                                       ["ValidateFirstResult"] = "(result[0] != firstOp[1])"}),
     ("ExtractScalarTest.template",   new Dictionary<string, string> { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse",  ["Method"] = "Extract",                       ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single",  ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Single",                                                                                                                                                  ["Imm"] = "1",   ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(float)(random.NextDouble())",                                                                                                                                                                ["ValidateFirstResult"] = "(BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(firstOp[1]))"}),
     ("ExtractScalarTest.template",   new Dictionary<string, string> { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "Extract",                       ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte",    ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Byte",                                                                                                                                                    ["Imm"] = "129", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(byte)(random.Next(0, byte.MaxValue))",                                                                                                                                                       ["ValidateFirstResult"] = "(result[0] != firstOp[1])"}),
-    ("ExtractScalarTest.template",   new Dictionary<string, string> { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "Extract",                       ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte",   ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "SByte",                                                                                                                                                   ["Imm"] = "129", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(sbyte)(random.Next(0, sbyte.MaxValue))",                                                                                                                                                     ["ValidateFirstResult"] = "(result[0] != firstOp[1])"}),
     ("ExtractScalarTest.template",   new Dictionary<string, string> { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "Extract",                       ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32",   ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Int32",                                                                                                                                                   ["Imm"] = "129", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(int)(random.Next(0, int.MaxValue))",                                                                                                                                                         ["ValidateFirstResult"] = "(result[0] != firstOp[1])"}),
     ("ExtractScalarTest.template",   new Dictionary<string, string> { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "Extract",                       ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32",  ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "UInt32",                                                                                                                                                  ["Imm"] = "129", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(uint)(random.Next(0, int.MaxValue))",                                                                                                                                                        ["ValidateFirstResult"] = "(result[0] != firstOp[1])"}),
     ("ExtractScalarTest.template",   new Dictionary<string, string> { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "Extract",                       ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64",   ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Int64",                                                                                                                                                   ["Imm"] = "129", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(long)(random.Next(0, int.MaxValue))",                                                                                                                                                        ["ValidateFirstResult"] = "(result[0] != firstOp[1])"}),
@@ -301,30 +297,18 @@ private static readonly (string templateFileName, Dictionary<string, string> tem
     ("SimpleUnOpTest.template",      new Dictionary<string, string> { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse",  ["Method"] = "Floor",                         ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single",  ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Single",                                                                                                                                                                   ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(float)(random.NextDouble())",                                                                                                                                                                ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Floor(firstOp[0]))",                                                                                                                                               ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(MathF.Floor(firstOp[i]))"}),
     ("SimpleBinOpTest.template",     new Dictionary<string, string> { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "FloorScalar",                   ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double",  ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double",                                                                                                      ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(double)(random.NextDouble())",                        ["NextValueOp2"] = "(double)(random.NextDouble())",                                                                                    ["ValidateFirstResult"] = "BitConverter.DoubleToInt64Bits(result[0]) != BitConverter.DoubleToInt64Bits(Math.Floor(right[0]))",                                                                                                                                                  ["ValidateRemainingResults"] = "BitConverter.DoubleToInt64Bits(result[i]) != BitConverter.DoubleToInt64Bits(left[i])"}),
     ("SimpleBinOpTest.template",     new Dictionary<string, string> { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse",  ["Method"] = "FloorScalar",                   ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single",  ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single",                                                                                                      ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(float)(random.NextDouble())",                         ["NextValueOp2"] = "(float)(random.NextDouble())",                                                                                     ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(result[0]) != BitConverter.SingleToInt32Bits(MathF.Floor(right[0]))",                                                                                                                                                 ["ValidateRemainingResults"] = "BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(left[i])"}),
-    ("InsertScalarTest.template",    new Dictionary<string, string> { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse",  ["Method"] = "Insert",                        ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single",  ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Single",                                                                                                                           ["Data"] = "(float)2", ["Imm"] = "0",   ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(float)(random.NextDouble())",                                                                                                                                                                ["ValidateFirstResult"] = "(i == 0 ? BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(2.0f) : BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(firstOp[i]))"}),
     ("InsertScalarTest.template",    new Dictionary<string, string> { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "Insert",                        ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte",    ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Byte",                                                                                                                             ["Data"] = "(byte)2",  ["Imm"] = "1",   ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(byte)(random.Next(0, byte.MaxValue))",                                                                                                                                                       ["ValidateFirstResult"] = "(i == 1 ? result[i] != 2 : result[i] != firstOp[i])"}),
     ("InsertScalarTest.template",    new Dictionary<string, string> { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "Insert",                        ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte",   ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "SByte",                                                                                                                            ["Data"] = "(sbyte)2", ["Imm"] = "1",   ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(sbyte)(random.Next(0, sbyte.MaxValue))",                                                                                                                                                     ["ValidateFirstResult"] = "(i == 1 ? result[i] != 2 : result[i] != firstOp[i])"}),
     ("InsertScalarTest.template",    new Dictionary<string, string> { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "Insert",                        ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32",   ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Int32",                                                                                                                            ["Data"] = "(int)2",   ["Imm"] = "1",   ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(int)(random.Next(0, int.MaxValue))",                                                                                                                                                         ["ValidateFirstResult"] = "(i == 1 ? result[i] != 2 : result[i] != firstOp[i])"}),
     ("InsertScalarTest.template",    new Dictionary<string, string> { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "Insert",                        ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32",  ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "UInt32",                                                                                                                           ["Data"] = "(uint)2",  ["Imm"] = "1",   ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(uint)(random.Next(0, int.MaxValue))",                                                                                                                                                        ["ValidateFirstResult"] = "(i == 1 ? result[i] != 2 : result[i] != firstOp[i])"}),
     ("InsertScalarTest.template",    new Dictionary<string, string> { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "Insert",                        ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64",   ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Int64",                                                                                                                            ["Data"] = "(long)2",  ["Imm"] = "1",   ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(long)(random.Next(0, int.MaxValue))",                                                                                                                                                        ["ValidateFirstResult"] = "(i == 1 ? result[i] != 2 : result[i] != firstOp[i])"}),
     ("InsertScalarTest.template",    new Dictionary<string, string> { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "Insert",                        ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64",  ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "UInt64",                                                                                                                           ["Data"] = "(ulong)2", ["Imm"] = "1",   ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(ulong)(random.Next(0, int.MaxValue))",                                                                                                                                                       ["ValidateFirstResult"] = "(i == 1 ? result[i] != 2 : result[i] != firstOp[i])"}),
-    ("InsertScalarTest.template",    new Dictionary<string, string> { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse",  ["Method"] = "Insert",                        ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single",  ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Single",                                                                                                                           ["Data"] = "(float)2", ["Imm"] = "1",   ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(float)(random.NextDouble())",                                                                                                                                                                ["ValidateFirstResult"] = "(i == 0 ? BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(0.0f) : BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(firstOp[i]))"}),
-    ("InsertScalarTest.template",    new Dictionary<string, string> { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse",  ["Method"] = "Insert",                        ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single",  ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Single",                                                                                                                           ["Data"] = "(float)2", ["Imm"] = "2",   ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(float)(random.NextDouble())",                                                                                                                                                                ["ValidateFirstResult"] = "(i == 0 ? BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(2.0f) : i == 1 ? BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(0.0f) : BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(firstOp[i]))"}),
-    ("InsertScalarTest.template",    new Dictionary<string, string> { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse",  ["Method"] = "Insert",                        ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single",  ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Single",                                                                                                                           ["Data"] = "(float)2", ["Imm"] = "4",   ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(float)(random.NextDouble())",                                                                                                                                                                ["ValidateFirstResult"] = "(i == 0 ? BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(2.0f) : i == 2 ? BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(0.0f) : BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(firstOp[i]))"}),
-    ("InsertScalarTest.template",    new Dictionary<string, string> { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse",  ["Method"] = "Insert",                        ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single",  ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Single",                                                                                                                           ["Data"] = "(float)2", ["Imm"] = "8",   ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(float)(random.NextDouble())",                                                                                                                                                                ["ValidateFirstResult"] = "(i == 0 ? BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(2.0f) : i == 3 ? BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(0.0f) : BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(firstOp[i]))"}),
-    ("InsertScalarTest.template",    new Dictionary<string, string> { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse",  ["Method"] = "Insert",                        ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single",  ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Single",                                                                                                                           ["Data"] = "(float)2", ["Imm"] = "16",  ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(float)(random.NextDouble())",                                                                                                                                                                ["ValidateFirstResult"] = "(i == 1 ? BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(2.0f) : BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(firstOp[i]))"}),
-    ("InsertScalarTest.template",    new Dictionary<string, string> { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse",  ["Method"] = "Insert",                        ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single",  ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Single",                                                                                                                           ["Data"] = "(float)2", ["Imm"] = "32",  ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(float)(random.NextDouble())",                                                                                                                                                                ["ValidateFirstResult"] = "(i == 2 ? BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(2.0f) : BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(firstOp[i]))"}),
-    ("InsertScalarTest.template",    new Dictionary<string, string> { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse",  ["Method"] = "Insert",                        ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single",  ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Single",                                                                                                                           ["Data"] = "(float)2", ["Imm"] = "48",  ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(float)(random.NextDouble())",                                                                                                                                                                ["ValidateFirstResult"] = "(i == 3 ? BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(2.0f) : BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(firstOp[i]))"}),
-    ("InsertScalarTest.template",    new Dictionary<string, string> { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse",  ["Method"] = "Insert",                        ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single",  ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Single",                                                                                                                           ["Data"] = "(float)2", ["Imm"] = "64",  ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(float)(random.NextDouble())",                                                                                                                                                                ["ValidateFirstResult"] = "(i == 0 ? BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(2.0f) : BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(firstOp[i]))"}),
-    ("InsertScalarTest.template",    new Dictionary<string, string> { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse",  ["Method"] = "Insert",                        ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single",  ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Single",                                                                                                                           ["Data"] = "(float)2", ["Imm"] = "128", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(float)(random.NextDouble())",                                                                                                                                                                ["ValidateFirstResult"] = "(i == 0 ? BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(2.0f) : BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(firstOp[i]))"}),
     ("InsertScalarTest.template",    new Dictionary<string, string> { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "Insert",                        ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte",    ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Byte",                                                                                                                             ["Data"] = "(byte)2",  ["Imm"] = "129", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(byte)(random.Next(0, byte.MaxValue))",                                                                                                                                                       ["ValidateFirstResult"] = "(i == 1 ? result[i] != 2 : result[i] != firstOp[i])"}),
     ("InsertScalarTest.template",    new Dictionary<string, string> { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "Insert",                        ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte",   ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "SByte",                                                                                                                            ["Data"] = "(sbyte)2", ["Imm"] = "129", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(sbyte)(random.Next(0, sbyte.MaxValue))",                                                                                                                                                     ["ValidateFirstResult"] = "(i == 1 ? result[i] != 2 : result[i] != firstOp[i])"}),
     ("InsertScalarTest.template",    new Dictionary<string, string> { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "Insert",                        ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32",   ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Int32",                                                                                                                            ["Data"] = "(int)2",   ["Imm"] = "129", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(int)(random.Next(0, int.MaxValue))",                                                                                                                                                         ["ValidateFirstResult"] = "(i == 1 ? result[i] != 2 : result[i] != firstOp[i])"}),
     ("InsertScalarTest.template",    new Dictionary<string, string> { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "Insert",                        ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32",  ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "UInt32",                                                                                                                           ["Data"] = "(uint)2",  ["Imm"] = "129", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(uint)(random.Next(0, int.MaxValue))",                                                                                                                                                        ["ValidateFirstResult"] = "(i == 1 ? result[i] != 2 : result[i] != firstOp[i])"}),
     ("InsertScalarTest.template",    new Dictionary<string, string> { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "Insert",                        ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64",   ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Int64",                                                                                                                            ["Data"] = "(long)2",  ["Imm"] = "129", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(long)(random.Next(0, int.MaxValue))",                                                                                                                                                        ["ValidateFirstResult"] = "(i == 1 ? result[i] != 2 : result[i] != firstOp[i])"}),
     ("InsertScalarTest.template",    new Dictionary<string, string> { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "Insert",                        ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64",  ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "UInt64",                                                                                                                           ["Data"] = "(ulong)2", ["Imm"] = "129", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(ulong)(random.Next(0, int.MaxValue))",                                                                                                                                                       ["ValidateFirstResult"] = "(i == 1 ? result[i] != 2 : result[i] != firstOp[i])"}),
-    ("InsertScalarTest.template",    new Dictionary<string, string> { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse",  ["Method"] = "Insert",                        ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single",  ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Single",                                                                                                                           ["Data"] = "(float)2", ["Imm"] = "129", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(float)(random.NextDouble())",                                                                                                                                                                ["ValidateFirstResult"] = "(i == 0 ? BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(0.0f) : BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(firstOp[i]))"}),
-    ("InsertScalarTest.template",    new Dictionary<string, string> { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse",  ["Method"] = "Insert",                        ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single",  ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Single",                                                                                                                           ["Data"] = "(float)2", ["Imm"] = "192", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(float)(random.NextDouble())",                                                                                                                                                                ["ValidateFirstResult"] = "(i == 0 ? BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(2.0f) : BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(firstOp[i]))"}),
     ("SimpleBinOpTest.template",     new Dictionary<string, string> { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "Max",                           ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32",   ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "Int32",  ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32",                                                                                                       ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(int)(random.Next(int.MinValue, int.MaxValue))",       ["NextValueOp2"] = "(int)(random.Next(int.MinValue, int.MaxValue))",                                                                   ["ValidateFirstResult"] = "result[0] != Math.Max(left[0], right[0])",                                                                                                                                                                                                           ["ValidateRemainingResults"] = "result[i] != Math.Max(left[i], right[i])"}),
     ("SimpleBinOpTest.template",     new Dictionary<string, string> { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "Max",                           ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte",   ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "SByte",  ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte",                                                                                                       ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue))", ["NextValueOp2"] = "(sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue))",                                                             ["ValidateFirstResult"] = "result[0] != Math.Max(left[0], right[0])",                                                                                                                                                                                                           ["ValidateRemainingResults"] = "result[i] != Math.Max(left[i], right[i])"}),
     ("SimpleBinOpTest.template",     new Dictionary<string, string> { ["Isa"] = "Sse41", ["LoadIsa"] = "Sse2", ["Method"] = "Max",                           ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16",  ["Op1VectorType"] ="Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16",                                                                                                      ["LargestVectorSize"] = "16", ["NextValueOp1"] = "(ushort)(random.Next(0, ushort.MaxValue))",            ["NextValueOp2"] = "(ushort)(random.Next(0, ushort.MaxValue))",                                                                        ["ValidateFirstResult"] = "result[0] != Math.Max(left[0], right[0])",                                                                                                                                                                                                           ["ValidateRemainingResults"] = "result[i] != Math.Max(left[i], right[i])"}),
@@ -430,16 +414,10 @@ private static readonly (string templateFileName, Dictionary<string, string> tem
     ("SimpleUnOpTest.template",      new Dictionary<string, string> { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "DuplicateEvenIndexed",    ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single",                                                                                                                           ["LargestVectorSize"] = "32", ["NextValueOp1"] = "(float)(random.NextDouble())",                                                                                                                                         ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(firstOp[0]) != BitConverter.SingleToInt32Bits(result[0])",                                                                                                                                                            ["ValidateRemainingResults"] = "(i % 2 == 0) ? (BitConverter.SingleToInt32Bits(firstOp[i]) != BitConverter.SingleToInt32Bits(result[i])) : (BitConverter.SingleToInt32Bits(firstOp[i - 1]) != BitConverter.SingleToInt32Bits(result[i]))"}),
     ("SimpleUnOpTest.template",      new Dictionary<string, string> { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "DuplicateOddIndexed",     ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector256", ["Op1BaseType"] = "Single",                                                                                                                           ["LargestVectorSize"] = "32", ["NextValueOp1"] = "(float)(random.NextDouble())",                                                                                                                                         ["ValidateFirstResult"] = "BitConverter.SingleToInt32Bits(firstOp[1]) != BitConverter.SingleToInt32Bits(result[0])",                                                                                                                                                            ["ValidateRemainingResults"] = "(i % 2 == 0) ? (BitConverter.SingleToInt32Bits(firstOp[i + 1]) != BitConverter.SingleToInt32Bits(result[i])) : (BitConverter.SingleToInt32Bits(firstOp[i]) != BitConverter.SingleToInt32Bits(result[i]))"}),
     ("ExtractScalarTest.template",   new Dictionary<string, string> { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Extract",                 ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Byte",   ["Op1VectorType"] ="Vector256",  ["Op1BaseType"] = "Byte",                                                                                                            ["Imm"] = "1",   ["LargestVectorSize"] = "32", ["NextValueOp1"] = "(byte)(random.Next(0, byte.MaxValue))",                                                                                                                                ["ValidateFirstResult"] = "(result[0] != firstOp[1])"}),
-    ("ExtractScalarTest.template",   new Dictionary<string, string> { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Extract",                 ["RetVectorType"] = "Vector256", ["RetBaseType"] = "SByte",  ["Op1VectorType"] ="Vector256",  ["Op1BaseType"] = "SByte",                                                                                                           ["Imm"] = "1",   ["LargestVectorSize"] = "32", ["NextValueOp1"] = "(sbyte)(random.Next(0, sbyte.MaxValue))",                                                                                                                              ["ValidateFirstResult"] = "(result[0] != firstOp[1])"}),
     ("ExtractScalarTest.template",   new Dictionary<string, string> { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Extract",                 ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Byte",   ["Op1VectorType"] ="Vector256",  ["Op1BaseType"] = "Byte",                                                                                                            ["Imm"] = "20",  ["LargestVectorSize"] = "32", ["NextValueOp1"] = "(byte)(random.Next(0, byte.MaxValue))",                                                                                                                                ["ValidateFirstResult"] = "(result[0] != firstOp[20])"}),
-    ("ExtractScalarTest.template",   new Dictionary<string, string> { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Extract",                 ["RetVectorType"] = "Vector256", ["RetBaseType"] = "SByte",  ["Op1VectorType"] ="Vector256",  ["Op1BaseType"] = "SByte",                                                                                                           ["Imm"] = "20",  ["LargestVectorSize"] = "32", ["NextValueOp1"] = "(sbyte)(random.Next(0, sbyte.MaxValue))",                                                                                                                              ["ValidateFirstResult"] = "(result[0] != firstOp[20])"}),
     ("ExtractScalarTest.template",   new Dictionary<string, string> { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Extract",                 ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Byte",   ["Op1VectorType"] ="Vector256",  ["Op1BaseType"] = "Byte",                                                                                                            ["Imm"] = "52",  ["LargestVectorSize"] = "32", ["NextValueOp1"] = "(byte)(random.Next(0, byte.MaxValue))",                                                                                                                                ["ValidateFirstResult"] = "(result[0] != firstOp[20])"}),
-    ("ExtractScalarTest.template",   new Dictionary<string, string> { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Extract",                 ["RetVectorType"] = "Vector256", ["RetBaseType"] = "SByte",  ["Op1VectorType"] ="Vector256",  ["Op1BaseType"] = "SByte",                                                                                                           ["Imm"] = "52",  ["LargestVectorSize"] = "32", ["NextValueOp1"] = "(sbyte)(random.Next(0, sbyte.MaxValue))",                                                                                                                              ["ValidateFirstResult"] = "(result[0] != firstOp[20])"}),
-    ("ExtractScalarTest.template",   new Dictionary<string, string> { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Extract",                 ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16",  ["Op1VectorType"] ="Vector256",  ["Op1BaseType"] = "Int16",                                                                                                           ["Imm"] = "1",   ["LargestVectorSize"] = "32", ["NextValueOp1"] = "(short)(random.Next(0, short.MaxValue))",                                                                                                                              ["ValidateFirstResult"] = "(result[0] != firstOp[1])"}),
     ("ExtractScalarTest.template",   new Dictionary<string, string> { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Extract",                 ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] ="Vector256",  ["Op1BaseType"] = "UInt16",                                                                                                          ["Imm"] = "1",   ["LargestVectorSize"] = "32", ["NextValueOp1"] = "(ushort)(random.Next(0, ushort.MaxValue))",                                                                                                                            ["ValidateFirstResult"] = "(result[0] != firstOp[1])"}),
-    ("ExtractScalarTest.template",   new Dictionary<string, string> { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Extract",                 ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16",  ["Op1VectorType"] ="Vector256",  ["Op1BaseType"] = "Int16",                                                                                                           ["Imm"] = "11",  ["LargestVectorSize"] = "32", ["NextValueOp1"] = "(short)(random.Next(0, short.MaxValue))",                                                                                                                              ["ValidateFirstResult"] = "(result[0] != firstOp[11])"}),
     ("ExtractScalarTest.template",   new Dictionary<string, string> { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Extract",                 ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] ="Vector256",  ["Op1BaseType"] = "UInt16",                                                                                                          ["Imm"] = "11",  ["LargestVectorSize"] = "32", ["NextValueOp1"] = "(ushort)(random.Next(0, ushort.MaxValue))",                                                                                                                            ["ValidateFirstResult"] = "(result[0] != firstOp[11])"}),
-    ("ExtractScalarTest.template",   new Dictionary<string, string> { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Extract",                 ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int16",  ["Op1VectorType"] ="Vector256",  ["Op1BaseType"] = "Int16",                                                                                                           ["Imm"] = "27",  ["LargestVectorSize"] = "32", ["NextValueOp1"] = "(short)(random.Next(0, short.MaxValue))",                                                                                                                              ["ValidateFirstResult"] = "(result[0] != firstOp[11])"}),
     ("ExtractScalarTest.template",   new Dictionary<string, string> { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Extract",                 ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt16", ["Op1VectorType"] ="Vector256",  ["Op1BaseType"] = "UInt16",                                                                                                          ["Imm"] = "27",  ["LargestVectorSize"] = "32", ["NextValueOp1"] = "(ushort)(random.Next(0, ushort.MaxValue))",                                                                                                                            ["ValidateFirstResult"] = "(result[0] != firstOp[11])"}),
     ("ExtractScalarTest.template",   new Dictionary<string, string> { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Extract",                 ["RetVectorType"] = "Vector256", ["RetBaseType"] = "Int32",  ["Op1VectorType"] ="Vector256",  ["Op1BaseType"] = "Int32",                                                                                                           ["Imm"] = "1",   ["LargestVectorSize"] = "32", ["NextValueOp1"] = "(int)(random.Next(0, int.MaxValue))",                                                                                                                                  ["ValidateFirstResult"] = "(result[0] != firstOp[1])"}),
     ("ExtractScalarTest.template",   new Dictionary<string, string> { ["Isa"] = "Avx", ["LoadIsa"] = "Avx", ["Method"] = "Extract",                 ["RetVectorType"] = "Vector256", ["RetBaseType"] = "UInt32", ["Op1VectorType"] ="Vector256",  ["Op1BaseType"] = "UInt32",                                                                                                          ["Imm"] = "1",   ["LargestVectorSize"] = "32", ["NextValueOp1"] = "(uint)(random.Next(0, int.MaxValue))",                                                                                                                                 ["ValidateFirstResult"] = "(result[0] != firstOp[1])"}),
diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Extract.Int16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Extract.Int16.1.cs
deleted file mode 100644 (file)
index f2f1195..0000000
+++ /dev/null
@@ -1,309 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-/******************************************************************************
- * This file is auto-generated from a template file by the GenerateTests.csx  *
- * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make    *
- * changes, please update the corresponding template and run according to the *
- * directions listed in the file.                                             *
- ******************************************************************************/
-
-using System;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Runtime.Intrinsics;
-using System.Runtime.Intrinsics.X86;
-
-namespace JIT.HardwareIntrinsics.X86
-{
-    public static partial class Program
-    {
-        private static void ExtractInt161()
-        {
-            var test = new SimpleUnaryOpTest__ExtractInt161();
-            
-            try
-            {
-            if (test.IsSupported)
-            {
-                // Validates basic functionality works, using Unsafe.Read
-                test.RunBasicScenario_UnsafeRead();
-
-                if (Sse2.IsSupported)
-                {
-                    // Validates basic functionality works, using Load
-                    test.RunBasicScenario_Load();
-
-                    // Validates basic functionality works, using LoadAligned
-                    test.RunBasicScenario_LoadAligned();
-                }
-
-                // Validates calling via reflection works, using Unsafe.Read
-                test.RunReflectionScenario_UnsafeRead();
-
-                if (Sse2.IsSupported)
-                {
-                    // Validates calling via reflection works, using Load
-                    test.RunReflectionScenario_Load();
-
-                    // Validates calling via reflection works, using LoadAligned
-                    test.RunReflectionScenario_LoadAligned();
-                }
-
-                // Validates passing a static member works
-                test.RunClsVarScenario();
-
-                // Validates passing a local works, using Unsafe.Read
-                test.RunLclVarScenario_UnsafeRead();
-
-                if (Sse2.IsSupported)
-                {
-                    // Validates passing a local works, using Load
-                    test.RunLclVarScenario_Load();
-
-                    // Validates passing a local works, using LoadAligned
-                    test.RunLclVarScenario_LoadAligned();
-                }
-
-                // Validates passing the field of a local works
-                test.RunLclFldScenario();
-
-                // Validates passing an instance member works
-                test.RunFldScenario();
-            }
-            else
-            {
-                // Validates we throw on unsupported hardware
-                test.RunUnsupportedScenario();
-            }
-            }
-            catch (PlatformNotSupportedException)
-            {
-                test.Succeeded = true;
-            }
-
-            if (!test.Succeeded)
-            {
-                throw new Exception("One or more scenarios did not complete as expected.");
-            }
-        }
-    }
-
-    public sealed unsafe class SimpleUnaryOpTest__ExtractInt161
-    {
-        private static readonly int LargestVectorSize = 16;
-
-        private static readonly int Op1ElementCount = Unsafe.SizeOf<Vector128<Int16>>() / sizeof(Int16);
-        private static readonly int RetElementCount = Unsafe.SizeOf<Vector128<Int16>>() / sizeof(Int16);
-
-        private static Int16[] _data = new Int16[Op1ElementCount];
-
-        private static Vector128<Int16> _clsVar;
-
-        private Vector128<Int16> _fld;
-
-        private SimpleUnaryOpTest__DataTable<Int16, Int16> _dataTable;
-
-        static SimpleUnaryOpTest__ExtractInt161()
-        {
-            var random = new Random();
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, int.MaxValue)); }
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Int16>, byte>(ref _clsVar), ref Unsafe.As<Int16, byte>(ref _data[0]), (uint)Unsafe.SizeOf<Vector128<Int16>>());
-        }
-
-        public SimpleUnaryOpTest__ExtractInt161()
-        {
-            Succeeded = true;
-
-            var random = new Random();
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, int.MaxValue)); }
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Int16>, byte>(ref _fld), ref Unsafe.As<Int16, byte>(ref _data[0]), (uint)Unsafe.SizeOf<Vector128<Int16>>());
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, int.MaxValue)); }
-            _dataTable = new SimpleUnaryOpTest__DataTable<Int16, Int16>(_data, new Int16[RetElementCount], LargestVectorSize);
-        }
-
-        public bool IsSupported => Sse2.IsSupported;
-
-        public bool Succeeded { get; set; }
-
-        public void RunBasicScenario_UnsafeRead()
-        {
-            var result = Sse2.Extract(
-                Unsafe.Read<Vector128<Int16>>(_dataTable.inArrayPtr),
-                1
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunBasicScenario_Load()
-        {
-            var result = Sse2.Extract(
-                Sse2.LoadVector128((Int16*)(_dataTable.inArrayPtr)),
-                1
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunBasicScenario_LoadAligned()
-        {
-            var result = Sse2.Extract(
-                Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArrayPtr)),
-                1
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_UnsafeRead()
-        {
-            var result = typeof(Sse2).GetMethod(nameof(Sse2.Extract), new Type[] { typeof(Vector128<Int16>), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Unsafe.Read<Vector128<Int16>>(_dataTable.inArrayPtr),
-                                        (byte)1
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Int16)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_Load()
-        {
-            var result = typeof(Sse2).GetMethod(nameof(Sse2.Extract), new Type[] { typeof(Vector128<Int16>), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Sse2.LoadVector128((Int16*)(_dataTable.inArrayPtr)),
-                                        (byte)1
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Int16)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_LoadAligned()
-        {
-            var result = typeof(Sse2).GetMethod(nameof(Sse2.Extract), new Type[] { typeof(Vector128<Int16>), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArrayPtr)),
-                                        (byte)1
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Int16)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunClsVarScenario()
-        {
-            var result = Sse2.Extract(
-                _clsVar,
-                1
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_clsVar, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_UnsafeRead()
-        {
-            var firstOp = Unsafe.Read<Vector128<Int16>>(_dataTable.inArrayPtr);
-            var result = Sse2.Extract(firstOp, 1);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_Load()
-        {
-            var firstOp = Sse2.LoadVector128((Int16*)(_dataTable.inArrayPtr));
-            var result = Sse2.Extract(firstOp, 1);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_LoadAligned()
-        {
-            var firstOp = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArrayPtr));
-            var result = Sse2.Extract(firstOp, 1);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclFldScenario()
-        {
-            var test = new SimpleUnaryOpTest__ExtractInt161();
-            var result = Sse2.Extract(test._fld, 1);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(test._fld, _dataTable.outArrayPtr);
-        }
-
-        public void RunFldScenario()
-        {
-            var result = Sse2.Extract(_fld, 1);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_fld, _dataTable.outArrayPtr);
-        }
-
-        public void RunUnsupportedScenario()
-        {
-            Succeeded = false;
-
-            try
-            {
-                RunBasicScenario_UnsafeRead();
-            }
-            catch (PlatformNotSupportedException)
-            {
-                Succeeded = true;
-            }
-        }
-
-        private void ValidateResult(Vector128<Int16> firstOp, void* result, [CallerMemberName] string method = "")
-        {
-            Int16[] inArray = new Int16[Op1ElementCount];
-            Int16[] outArray = new Int16[RetElementCount];
-
-            Unsafe.WriteUnaligned(ref Unsafe.As<Int16, byte>(ref inArray[0]), firstOp);
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Int16, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector128<Int16>>());
-
-            ValidateResult(inArray, outArray, method);
-        }
-
-        private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "")
-        {
-            Int16[] inArray = new Int16[Op1ElementCount];
-            Int16[] outArray = new Int16[RetElementCount];
-
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Int16, byte>(ref inArray[0]), ref Unsafe.AsRef<byte>(firstOp), (uint)Unsafe.SizeOf<Vector128<Int16>>());
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Int16, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector128<Int16>>());
-
-            ValidateResult(inArray, outArray, method);
-        }
-
-        private void ValidateResult(Int16[] firstOp, Int16[] result, [CallerMemberName] string method = "")
-        {
-            if ((result[0] != firstOp[1]))
-            {
-                Succeeded = false;
-            }
-
-            if (!Succeeded)
-            {
-                Console.WriteLine($"{nameof(Sse2)}.{nameof(Sse2.Extract)}<Int16>(Vector128<Int16><9>): {method} failed:");
-                Console.WriteLine($"  firstOp: ({string.Join(", ", firstOp)})");
-                Console.WriteLine($"   result: ({string.Join(", ", result)})");
-                Console.WriteLine();
-            }
-        }
-    }
-}
diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Extract.Int16.129.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Extract.Int16.129.cs
deleted file mode 100644 (file)
index e2d3a00..0000000
+++ /dev/null
@@ -1,309 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-/******************************************************************************
- * This file is auto-generated from a template file by the GenerateTests.csx  *
- * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make    *
- * changes, please update the corresponding template and run according to the *
- * directions listed in the file.                                             *
- ******************************************************************************/
-
-using System;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Runtime.Intrinsics;
-using System.Runtime.Intrinsics.X86;
-
-namespace JIT.HardwareIntrinsics.X86
-{
-    public static partial class Program
-    {
-        private static void ExtractInt16129()
-        {
-            var test = new SimpleUnaryOpTest__ExtractInt16129();
-            
-            try
-            {
-            if (test.IsSupported)
-            {
-                // Validates basic functionality works, using Unsafe.Read
-                test.RunBasicScenario_UnsafeRead();
-
-                if (Sse2.IsSupported)
-                {
-                    // Validates basic functionality works, using Load
-                    test.RunBasicScenario_Load();
-
-                    // Validates basic functionality works, using LoadAligned
-                    test.RunBasicScenario_LoadAligned();
-                }
-
-                // Validates calling via reflection works, using Unsafe.Read
-                test.RunReflectionScenario_UnsafeRead();
-
-                if (Sse2.IsSupported)
-                {
-                    // Validates calling via reflection works, using Load
-                    test.RunReflectionScenario_Load();
-
-                    // Validates calling via reflection works, using LoadAligned
-                    test.RunReflectionScenario_LoadAligned();
-                }
-
-                // Validates passing a static member works
-                test.RunClsVarScenario();
-
-                // Validates passing a local works, using Unsafe.Read
-                test.RunLclVarScenario_UnsafeRead();
-
-                if (Sse2.IsSupported)
-                {
-                    // Validates passing a local works, using Load
-                    test.RunLclVarScenario_Load();
-
-                    // Validates passing a local works, using LoadAligned
-                    test.RunLclVarScenario_LoadAligned();
-                }
-
-                // Validates passing the field of a local works
-                test.RunLclFldScenario();
-
-                // Validates passing an instance member works
-                test.RunFldScenario();
-            }
-            else
-            {
-                // Validates we throw on unsupported hardware
-                test.RunUnsupportedScenario();
-            }
-            }
-            catch (PlatformNotSupportedException)
-            {
-                test.Succeeded = true;
-            }
-
-            if (!test.Succeeded)
-            {
-                throw new Exception("One or more scenarios did not complete as expected.");
-            }
-        }
-    }
-
-    public sealed unsafe class SimpleUnaryOpTest__ExtractInt16129
-    {
-        private static readonly int LargestVectorSize = 16;
-
-        private static readonly int Op1ElementCount = Unsafe.SizeOf<Vector128<Int16>>() / sizeof(Int16);
-        private static readonly int RetElementCount = Unsafe.SizeOf<Vector128<Int16>>() / sizeof(Int16);
-
-        private static Int16[] _data = new Int16[Op1ElementCount];
-
-        private static Vector128<Int16> _clsVar;
-
-        private Vector128<Int16> _fld;
-
-        private SimpleUnaryOpTest__DataTable<Int16, Int16> _dataTable;
-
-        static SimpleUnaryOpTest__ExtractInt16129()
-        {
-            var random = new Random();
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, int.MaxValue)); }
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Int16>, byte>(ref _clsVar), ref Unsafe.As<Int16, byte>(ref _data[0]), (uint)Unsafe.SizeOf<Vector128<Int16>>());
-        }
-
-        public SimpleUnaryOpTest__ExtractInt16129()
-        {
-            Succeeded = true;
-
-            var random = new Random();
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, int.MaxValue)); }
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Int16>, byte>(ref _fld), ref Unsafe.As<Int16, byte>(ref _data[0]), (uint)Unsafe.SizeOf<Vector128<Int16>>());
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, int.MaxValue)); }
-            _dataTable = new SimpleUnaryOpTest__DataTable<Int16, Int16>(_data, new Int16[RetElementCount], LargestVectorSize);
-        }
-
-        public bool IsSupported => Sse2.IsSupported;
-
-        public bool Succeeded { get; set; }
-
-        public void RunBasicScenario_UnsafeRead()
-        {
-            var result = Sse2.Extract(
-                Unsafe.Read<Vector128<Int16>>(_dataTable.inArrayPtr),
-                129
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunBasicScenario_Load()
-        {
-            var result = Sse2.Extract(
-                Sse2.LoadVector128((Int16*)(_dataTable.inArrayPtr)),
-                129
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunBasicScenario_LoadAligned()
-        {
-            var result = Sse2.Extract(
-                Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArrayPtr)),
-                129
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_UnsafeRead()
-        {
-            var result = typeof(Sse2).GetMethod(nameof(Sse2.Extract), new Type[] { typeof(Vector128<Int16>), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Unsafe.Read<Vector128<Int16>>(_dataTable.inArrayPtr),
-                                        (byte)129
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Int16)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_Load()
-        {
-            var result = typeof(Sse2).GetMethod(nameof(Sse2.Extract), new Type[] { typeof(Vector128<Int16>), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Sse2.LoadVector128((Int16*)(_dataTable.inArrayPtr)),
-                                        (byte)129
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Int16)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_LoadAligned()
-        {
-            var result = typeof(Sse2).GetMethod(nameof(Sse2.Extract), new Type[] { typeof(Vector128<Int16>), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArrayPtr)),
-                                        (byte)129
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Int16)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunClsVarScenario()
-        {
-            var result = Sse2.Extract(
-                _clsVar,
-                129
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_clsVar, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_UnsafeRead()
-        {
-            var firstOp = Unsafe.Read<Vector128<Int16>>(_dataTable.inArrayPtr);
-            var result = Sse2.Extract(firstOp, 129);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_Load()
-        {
-            var firstOp = Sse2.LoadVector128((Int16*)(_dataTable.inArrayPtr));
-            var result = Sse2.Extract(firstOp, 129);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_LoadAligned()
-        {
-            var firstOp = Sse2.LoadAlignedVector128((Int16*)(_dataTable.inArrayPtr));
-            var result = Sse2.Extract(firstOp, 129);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclFldScenario()
-        {
-            var test = new SimpleUnaryOpTest__ExtractInt16129();
-            var result = Sse2.Extract(test._fld, 129);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(test._fld, _dataTable.outArrayPtr);
-        }
-
-        public void RunFldScenario()
-        {
-            var result = Sse2.Extract(_fld, 129);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_fld, _dataTable.outArrayPtr);
-        }
-
-        public void RunUnsupportedScenario()
-        {
-            Succeeded = false;
-
-            try
-            {
-                RunBasicScenario_UnsafeRead();
-            }
-            catch (PlatformNotSupportedException)
-            {
-                Succeeded = true;
-            }
-        }
-
-        private void ValidateResult(Vector128<Int16> firstOp, void* result, [CallerMemberName] string method = "")
-        {
-            Int16[] inArray = new Int16[Op1ElementCount];
-            Int16[] outArray = new Int16[RetElementCount];
-
-            Unsafe.WriteUnaligned(ref Unsafe.As<Int16, byte>(ref inArray[0]), firstOp);
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Int16, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector128<Int16>>());
-
-            ValidateResult(inArray, outArray, method);
-        }
-
-        private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "")
-        {
-            Int16[] inArray = new Int16[Op1ElementCount];
-            Int16[] outArray = new Int16[RetElementCount];
-
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Int16, byte>(ref inArray[0]), ref Unsafe.AsRef<byte>(firstOp), (uint)Unsafe.SizeOf<Vector128<Int16>>());
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Int16, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector128<Int16>>());
-
-            ValidateResult(inArray, outArray, method);
-        }
-
-        private void ValidateResult(Int16[] firstOp, Int16[] result, [CallerMemberName] string method = "")
-        {
-            if ((result[0] != firstOp[1]))
-            {
-                Succeeded = false;
-            }
-
-            if (!Succeeded)
-            {
-                Console.WriteLine($"{nameof(Sse2)}.{nameof(Sse2.Extract)}<Int16>(Vector128<Int16><9>): {method} failed:");
-                Console.WriteLine($"  firstOp: ({string.Join(", ", firstOp)})");
-                Console.WriteLine($"   result: ({string.Join(", ", result)})");
-                Console.WriteLine();
-            }
-        }
-    }
-}
index 10782bc..e2ab97d 100644 (file)
@@ -72,9 +72,7 @@ namespace JIT.HardwareIntrinsics.X86
                 ["CompareUnordered.Double"] = CompareUnorderedDouble,
                 ["Divide.Double"] = DivideDouble,
                 ["DivideScalar.Double"] = DivideScalarDouble,
-                ["Extract.Int16.1"] = ExtractInt161,
                 ["Extract.UInt16.1"] = ExtractUInt161,
-                ["Extract.Int16.129"] = ExtractInt16129,
                 ["Extract.UInt16.129"] = ExtractUInt16129,
                 ["Insert.Int16.1"] = InsertInt161,
                 ["Insert.UInt16.1"] = InsertUInt161,
index fec034c..0769a9d 100644 (file)
@@ -87,9 +87,7 @@
     <Compile Include="CompareUnordered.Double.cs" />
     <Compile Include="Divide.Double.cs" />
     <Compile Include="DivideScalar.Double.cs" />
-    <Compile Include="Extract.Int16.1.cs" />
     <Compile Include="Extract.UInt16.1.cs" />
-    <Compile Include="Extract.Int16.129.cs" />
     <Compile Include="Extract.UInt16.129.cs" />
     <Compile Include="Insert.Int16.1.cs" />
     <Compile Include="Insert.UInt16.1.cs" />
index 8c82568..cdf3e71 100644 (file)
@@ -87,9 +87,7 @@
     <Compile Include="CompareUnordered.Double.cs" />
     <Compile Include="Divide.Double.cs" />
     <Compile Include="DivideScalar.Double.cs" />
-    <Compile Include="Extract.Int16.1.cs" />
     <Compile Include="Extract.UInt16.1.cs" />
-    <Compile Include="Extract.Int16.129.cs" />
     <Compile Include="Extract.UInt16.129.cs" />
     <Compile Include="Insert.Int16.1.cs" />
     <Compile Include="Insert.UInt16.1.cs" />
diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.SByte.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.SByte.1.cs
deleted file mode 100644 (file)
index 8265030..0000000
+++ /dev/null
@@ -1,309 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-/******************************************************************************
- * This file is auto-generated from a template file by the GenerateTests.csx  *
- * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make    *
- * changes, please update the corresponding template and run according to the *
- * directions listed in the file.                                             *
- ******************************************************************************/
-
-using System;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Runtime.Intrinsics;
-using System.Runtime.Intrinsics.X86;
-
-namespace JIT.HardwareIntrinsics.X86
-{
-    public static partial class Program
-    {
-        private static void ExtractSByte1()
-        {
-            var test = new SimpleUnaryOpTest__ExtractSByte1();
-            
-            try
-            {
-            if (test.IsSupported)
-            {
-                // Validates basic functionality works, using Unsafe.Read
-                test.RunBasicScenario_UnsafeRead();
-
-                if (Sse2.IsSupported)
-                {
-                    // Validates basic functionality works, using Load
-                    test.RunBasicScenario_Load();
-
-                    // Validates basic functionality works, using LoadAligned
-                    test.RunBasicScenario_LoadAligned();
-                }
-
-                // Validates calling via reflection works, using Unsafe.Read
-                test.RunReflectionScenario_UnsafeRead();
-
-                if (Sse2.IsSupported)
-                {
-                    // Validates calling via reflection works, using Load
-                    test.RunReflectionScenario_Load();
-
-                    // Validates calling via reflection works, using LoadAligned
-                    test.RunReflectionScenario_LoadAligned();
-                }
-
-                // Validates passing a static member works
-                test.RunClsVarScenario();
-
-                // Validates passing a local works, using Unsafe.Read
-                test.RunLclVarScenario_UnsafeRead();
-
-                if (Sse2.IsSupported)
-                {
-                    // Validates passing a local works, using Load
-                    test.RunLclVarScenario_Load();
-
-                    // Validates passing a local works, using LoadAligned
-                    test.RunLclVarScenario_LoadAligned();
-                }
-
-                // Validates passing the field of a local works
-                test.RunLclFldScenario();
-
-                // Validates passing an instance member works
-                test.RunFldScenario();
-            }
-            else
-            {
-                // Validates we throw on unsupported hardware
-                test.RunUnsupportedScenario();
-            }
-            }
-            catch (PlatformNotSupportedException)
-            {
-                test.Succeeded = true;
-            }
-
-            if (!test.Succeeded)
-            {
-                throw new Exception("One or more scenarios did not complete as expected.");
-            }
-        }
-    }
-
-    public sealed unsafe class SimpleUnaryOpTest__ExtractSByte1
-    {
-        private static readonly int LargestVectorSize = 16;
-
-        private static readonly int Op1ElementCount = Unsafe.SizeOf<Vector128<SByte>>() / sizeof(SByte);
-        private static readonly int RetElementCount = Unsafe.SizeOf<Vector128<SByte>>() / sizeof(SByte);
-
-        private static SByte[] _data = new SByte[Op1ElementCount];
-
-        private static Vector128<SByte> _clsVar;
-
-        private Vector128<SByte> _fld;
-
-        private SimpleUnaryOpTest__DataTable<SByte, SByte> _dataTable;
-
-        static SimpleUnaryOpTest__ExtractSByte1()
-        {
-            var random = new Random();
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); }
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<SByte>, byte>(ref _clsVar), ref Unsafe.As<SByte, byte>(ref _data[0]), (uint)Unsafe.SizeOf<Vector128<SByte>>());
-        }
-
-        public SimpleUnaryOpTest__ExtractSByte1()
-        {
-            Succeeded = true;
-
-            var random = new Random();
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); }
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<SByte>, byte>(ref _fld), ref Unsafe.As<SByte, byte>(ref _data[0]), (uint)Unsafe.SizeOf<Vector128<SByte>>());
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); }
-            _dataTable = new SimpleUnaryOpTest__DataTable<SByte, SByte>(_data, new SByte[RetElementCount], LargestVectorSize);
-        }
-
-        public bool IsSupported => Sse41.IsSupported;
-
-        public bool Succeeded { get; set; }
-
-        public void RunBasicScenario_UnsafeRead()
-        {
-            var result = Sse41.Extract(
-                Unsafe.Read<Vector128<SByte>>(_dataTable.inArrayPtr),
-                1
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunBasicScenario_Load()
-        {
-            var result = Sse41.Extract(
-                Sse2.LoadVector128((SByte*)(_dataTable.inArrayPtr)),
-                1
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunBasicScenario_LoadAligned()
-        {
-            var result = Sse41.Extract(
-                Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArrayPtr)),
-                1
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_UnsafeRead()
-        {
-            var result = typeof(Sse41).GetMethod(nameof(Sse41.Extract), new Type[] { typeof(Vector128<SByte>), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Unsafe.Read<Vector128<SByte>>(_dataTable.inArrayPtr),
-                                        (byte)1
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (SByte)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_Load()
-        {
-            var result = typeof(Sse41).GetMethod(nameof(Sse41.Extract), new Type[] { typeof(Vector128<SByte>), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Sse2.LoadVector128((SByte*)(_dataTable.inArrayPtr)),
-                                        (byte)1
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (SByte)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_LoadAligned()
-        {
-            var result = typeof(Sse41).GetMethod(nameof(Sse41.Extract), new Type[] { typeof(Vector128<SByte>), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArrayPtr)),
-                                        (byte)1
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (SByte)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunClsVarScenario()
-        {
-            var result = Sse41.Extract(
-                _clsVar,
-                1
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_clsVar, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_UnsafeRead()
-        {
-            var firstOp = Unsafe.Read<Vector128<SByte>>(_dataTable.inArrayPtr);
-            var result = Sse41.Extract(firstOp, 1);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_Load()
-        {
-            var firstOp = Sse2.LoadVector128((SByte*)(_dataTable.inArrayPtr));
-            var result = Sse41.Extract(firstOp, 1);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_LoadAligned()
-        {
-            var firstOp = Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArrayPtr));
-            var result = Sse41.Extract(firstOp, 1);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclFldScenario()
-        {
-            var test = new SimpleUnaryOpTest__ExtractSByte1();
-            var result = Sse41.Extract(test._fld, 1);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(test._fld, _dataTable.outArrayPtr);
-        }
-
-        public void RunFldScenario()
-        {
-            var result = Sse41.Extract(_fld, 1);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_fld, _dataTable.outArrayPtr);
-        }
-
-        public void RunUnsupportedScenario()
-        {
-            Succeeded = false;
-
-            try
-            {
-                RunBasicScenario_UnsafeRead();
-            }
-            catch (PlatformNotSupportedException)
-            {
-                Succeeded = true;
-            }
-        }
-
-        private void ValidateResult(Vector128<SByte> firstOp, void* result, [CallerMemberName] string method = "")
-        {
-            SByte[] inArray = new SByte[Op1ElementCount];
-            SByte[] outArray = new SByte[RetElementCount];
-
-            Unsafe.WriteUnaligned(ref Unsafe.As<SByte, byte>(ref inArray[0]), firstOp);
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<SByte, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector128<SByte>>());
-
-            ValidateResult(inArray, outArray, method);
-        }
-
-        private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "")
-        {
-            SByte[] inArray = new SByte[Op1ElementCount];
-            SByte[] outArray = new SByte[RetElementCount];
-
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<SByte, byte>(ref inArray[0]), ref Unsafe.AsRef<byte>(firstOp), (uint)Unsafe.SizeOf<Vector128<SByte>>());
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<SByte, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector128<SByte>>());
-
-            ValidateResult(inArray, outArray, method);
-        }
-
-        private void ValidateResult(SByte[] firstOp, SByte[] result, [CallerMemberName] string method = "")
-        {
-            if ((result[0] != firstOp[1]))
-            {
-                Succeeded = false;
-            }
-
-            if (!Succeeded)
-            {
-                Console.WriteLine($"{nameof(Sse41)}.{nameof(Sse41.Extract)}<SByte>(Vector128<SByte><9>): {method} failed:");
-                Console.WriteLine($"  firstOp: ({string.Join(", ", firstOp)})");
-                Console.WriteLine($"   result: ({string.Join(", ", result)})");
-                Console.WriteLine();
-            }
-        }
-    }
-}
diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.SByte.129.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.SByte.129.cs
deleted file mode 100644 (file)
index f4c2258..0000000
+++ /dev/null
@@ -1,309 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-/******************************************************************************
- * This file is auto-generated from a template file by the GenerateTests.csx  *
- * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make    *
- * changes, please update the corresponding template and run according to the *
- * directions listed in the file.                                             *
- ******************************************************************************/
-
-using System;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Runtime.Intrinsics;
-using System.Runtime.Intrinsics.X86;
-
-namespace JIT.HardwareIntrinsics.X86
-{
-    public static partial class Program
-    {
-        private static void ExtractSByte129()
-        {
-            var test = new SimpleUnaryOpTest__ExtractSByte129();
-            
-            try
-            {
-            if (test.IsSupported)
-            {
-                // Validates basic functionality works, using Unsafe.Read
-                test.RunBasicScenario_UnsafeRead();
-
-                if (Sse2.IsSupported)
-                {
-                    // Validates basic functionality works, using Load
-                    test.RunBasicScenario_Load();
-
-                    // Validates basic functionality works, using LoadAligned
-                    test.RunBasicScenario_LoadAligned();
-                }
-
-                // Validates calling via reflection works, using Unsafe.Read
-                test.RunReflectionScenario_UnsafeRead();
-
-                if (Sse2.IsSupported)
-                {
-                    // Validates calling via reflection works, using Load
-                    test.RunReflectionScenario_Load();
-
-                    // Validates calling via reflection works, using LoadAligned
-                    test.RunReflectionScenario_LoadAligned();
-                }
-
-                // Validates passing a static member works
-                test.RunClsVarScenario();
-
-                // Validates passing a local works, using Unsafe.Read
-                test.RunLclVarScenario_UnsafeRead();
-
-                if (Sse2.IsSupported)
-                {
-                    // Validates passing a local works, using Load
-                    test.RunLclVarScenario_Load();
-
-                    // Validates passing a local works, using LoadAligned
-                    test.RunLclVarScenario_LoadAligned();
-                }
-
-                // Validates passing the field of a local works
-                test.RunLclFldScenario();
-
-                // Validates passing an instance member works
-                test.RunFldScenario();
-            }
-            else
-            {
-                // Validates we throw on unsupported hardware
-                test.RunUnsupportedScenario();
-            }
-            }
-            catch (PlatformNotSupportedException)
-            {
-                test.Succeeded = true;
-            }
-
-            if (!test.Succeeded)
-            {
-                throw new Exception("One or more scenarios did not complete as expected.");
-            }
-        }
-    }
-
-    public sealed unsafe class SimpleUnaryOpTest__ExtractSByte129
-    {
-        private static readonly int LargestVectorSize = 16;
-
-        private static readonly int Op1ElementCount = Unsafe.SizeOf<Vector128<SByte>>() / sizeof(SByte);
-        private static readonly int RetElementCount = Unsafe.SizeOf<Vector128<SByte>>() / sizeof(SByte);
-
-        private static SByte[] _data = new SByte[Op1ElementCount];
-
-        private static Vector128<SByte> _clsVar;
-
-        private Vector128<SByte> _fld;
-
-        private SimpleUnaryOpTest__DataTable<SByte, SByte> _dataTable;
-
-        static SimpleUnaryOpTest__ExtractSByte129()
-        {
-            var random = new Random();
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); }
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<SByte>, byte>(ref _clsVar), ref Unsafe.As<SByte, byte>(ref _data[0]), (uint)Unsafe.SizeOf<Vector128<SByte>>());
-        }
-
-        public SimpleUnaryOpTest__ExtractSByte129()
-        {
-            Succeeded = true;
-
-            var random = new Random();
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); }
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<SByte>, byte>(ref _fld), ref Unsafe.As<SByte, byte>(ref _data[0]), (uint)Unsafe.SizeOf<Vector128<SByte>>());
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); }
-            _dataTable = new SimpleUnaryOpTest__DataTable<SByte, SByte>(_data, new SByte[RetElementCount], LargestVectorSize);
-        }
-
-        public bool IsSupported => Sse41.IsSupported;
-
-        public bool Succeeded { get; set; }
-
-        public void RunBasicScenario_UnsafeRead()
-        {
-            var result = Sse41.Extract(
-                Unsafe.Read<Vector128<SByte>>(_dataTable.inArrayPtr),
-                129
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunBasicScenario_Load()
-        {
-            var result = Sse41.Extract(
-                Sse2.LoadVector128((SByte*)(_dataTable.inArrayPtr)),
-                129
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunBasicScenario_LoadAligned()
-        {
-            var result = Sse41.Extract(
-                Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArrayPtr)),
-                129
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_UnsafeRead()
-        {
-            var result = typeof(Sse41).GetMethod(nameof(Sse41.Extract), new Type[] { typeof(Vector128<SByte>), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Unsafe.Read<Vector128<SByte>>(_dataTable.inArrayPtr),
-                                        (byte)129
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (SByte)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_Load()
-        {
-            var result = typeof(Sse41).GetMethod(nameof(Sse41.Extract), new Type[] { typeof(Vector128<SByte>), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Sse2.LoadVector128((SByte*)(_dataTable.inArrayPtr)),
-                                        (byte)129
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (SByte)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_LoadAligned()
-        {
-            var result = typeof(Sse41).GetMethod(nameof(Sse41.Extract), new Type[] { typeof(Vector128<SByte>), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArrayPtr)),
-                                        (byte)129
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (SByte)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunClsVarScenario()
-        {
-            var result = Sse41.Extract(
-                _clsVar,
-                129
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_clsVar, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_UnsafeRead()
-        {
-            var firstOp = Unsafe.Read<Vector128<SByte>>(_dataTable.inArrayPtr);
-            var result = Sse41.Extract(firstOp, 129);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_Load()
-        {
-            var firstOp = Sse2.LoadVector128((SByte*)(_dataTable.inArrayPtr));
-            var result = Sse41.Extract(firstOp, 129);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_LoadAligned()
-        {
-            var firstOp = Sse2.LoadAlignedVector128((SByte*)(_dataTable.inArrayPtr));
-            var result = Sse41.Extract(firstOp, 129);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclFldScenario()
-        {
-            var test = new SimpleUnaryOpTest__ExtractSByte129();
-            var result = Sse41.Extract(test._fld, 129);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(test._fld, _dataTable.outArrayPtr);
-        }
-
-        public void RunFldScenario()
-        {
-            var result = Sse41.Extract(_fld, 129);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_fld, _dataTable.outArrayPtr);
-        }
-
-        public void RunUnsupportedScenario()
-        {
-            Succeeded = false;
-
-            try
-            {
-                RunBasicScenario_UnsafeRead();
-            }
-            catch (PlatformNotSupportedException)
-            {
-                Succeeded = true;
-            }
-        }
-
-        private void ValidateResult(Vector128<SByte> firstOp, void* result, [CallerMemberName] string method = "")
-        {
-            SByte[] inArray = new SByte[Op1ElementCount];
-            SByte[] outArray = new SByte[RetElementCount];
-
-            Unsafe.WriteUnaligned(ref Unsafe.As<SByte, byte>(ref inArray[0]), firstOp);
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<SByte, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector128<SByte>>());
-
-            ValidateResult(inArray, outArray, method);
-        }
-
-        private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "")
-        {
-            SByte[] inArray = new SByte[Op1ElementCount];
-            SByte[] outArray = new SByte[RetElementCount];
-
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<SByte, byte>(ref inArray[0]), ref Unsafe.AsRef<byte>(firstOp), (uint)Unsafe.SizeOf<Vector128<SByte>>());
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<SByte, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector128<SByte>>());
-
-            ValidateResult(inArray, outArray, method);
-        }
-
-        private void ValidateResult(SByte[] firstOp, SByte[] result, [CallerMemberName] string method = "")
-        {
-            if ((result[0] != firstOp[1]))
-            {
-                Succeeded = false;
-            }
-
-            if (!Succeeded)
-            {
-                Console.WriteLine($"{nameof(Sse41)}.{nameof(Sse41.Extract)}<SByte>(Vector128<SByte><9>): {method} failed:");
-                Console.WriteLine($"  firstOp: ({string.Join(", ", firstOp)})");
-                Console.WriteLine($"   result: ({string.Join(", ", result)})");
-                Console.WriteLine();
-            }
-        }
-    }
-}
diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Single.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Single.1.cs
deleted file mode 100644 (file)
index 537fe66..0000000
+++ /dev/null
@@ -1,321 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-/******************************************************************************
- * This file is auto-generated from a template file by the GenerateTests.csx  *
- * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make    *
- * changes, please update the corresponding template and run according to the *
- * directions listed in the file.                                             *
- ******************************************************************************/
-
-using System;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Runtime.Intrinsics;
-using System.Runtime.Intrinsics.X86;
-
-namespace JIT.HardwareIntrinsics.X86
-{
-    public static partial class Program
-    {
-        private static void InsertSingle1()
-        {
-            var test = new SimpleUnaryOpTest__InsertSingle1();
-            
-            try
-            {
-            if (test.IsSupported)
-            {
-                // Validates basic functionality works, using Unsafe.Read
-                test.RunBasicScenario_UnsafeRead();
-
-                if (Sse.IsSupported)
-                {
-                    // Validates basic functionality works, using Load
-                    test.RunBasicScenario_Load();
-
-                    // Validates basic functionality works, using LoadAligned
-                    test.RunBasicScenario_LoadAligned();
-                }
-
-                // Validates calling via reflection works, using Unsafe.Read
-                test.RunReflectionScenario_UnsafeRead();
-
-                if (Sse.IsSupported)
-                {
-                    // Validates calling via reflection works, using Load
-                    test.RunReflectionScenario_Load();
-
-                    // Validates calling via reflection works, using LoadAligned
-                    test.RunReflectionScenario_LoadAligned();
-                }
-
-                // Validates passing a static member works
-                test.RunClsVarScenario();
-
-                // Validates passing a local works, using Unsafe.Read
-                test.RunLclVarScenario_UnsafeRead();
-
-                if (Sse.IsSupported)
-                {
-                    // Validates passing a local works, using Load
-                    test.RunLclVarScenario_Load();
-
-                    // Validates passing a local works, using LoadAligned
-                    test.RunLclVarScenario_LoadAligned();
-                }
-
-                // Validates passing the field of a local works
-                test.RunLclFldScenario();
-
-                // Validates passing an instance member works
-                test.RunFldScenario();
-            }
-            else
-            {
-                // Validates we throw on unsupported hardware
-                test.RunUnsupportedScenario();
-            }
-            }
-            catch (PlatformNotSupportedException)
-            {
-                test.Succeeded = true;
-            }
-
-            if (!test.Succeeded)
-            {
-                throw new Exception("One or more scenarios did not complete as expected.");
-            }
-        }
-    }
-
-    public sealed unsafe class SimpleUnaryOpTest__InsertSingle1
-    {
-        private static readonly int LargestVectorSize = 16;
-
-        private static readonly int Op1ElementCount = Unsafe.SizeOf<Vector128<Single>>() / sizeof(Single);
-        private static readonly int RetElementCount = Unsafe.SizeOf<Vector128<Single>>() / sizeof(Single);
-
-        private static Single[] _data = new Single[Op1ElementCount];
-
-        private static Vector128<Single> _clsVar;
-
-        private Vector128<Single> _fld;
-
-        private SimpleUnaryOpTest__DataTable<Single, Single> _dataTable;
-
-        static SimpleUnaryOpTest__InsertSingle1()
-        {
-            var random = new Random();
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (float)(random.NextDouble()); }
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Single>, byte>(ref _clsVar), ref Unsafe.As<Single, byte>(ref _data[0]), (uint)Unsafe.SizeOf<Vector128<Single>>());
-        }
-
-        public SimpleUnaryOpTest__InsertSingle1()
-        {
-            Succeeded = true;
-
-            var random = new Random();
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (float)(random.NextDouble()); }
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Single>, byte>(ref _fld), ref Unsafe.As<Single, byte>(ref _data[0]), (uint)Unsafe.SizeOf<Vector128<Single>>());
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (float)(random.NextDouble()); }
-            _dataTable = new SimpleUnaryOpTest__DataTable<Single, Single>(_data, new Single[RetElementCount], LargestVectorSize);
-        }
-
-        public bool IsSupported => Sse41.IsSupported;
-
-        public bool Succeeded { get; set; }
-
-        public void RunBasicScenario_UnsafeRead()
-        {
-            var result = Sse41.Insert(
-                Unsafe.Read<Vector128<Single>>(_dataTable.inArrayPtr),
-                (float)2,
-                1
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunBasicScenario_Load()
-        {
-            var result = Sse41.Insert(
-                Sse.LoadVector128((Single*)(_dataTable.inArrayPtr)),
-                (float)2,
-                1
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunBasicScenario_LoadAligned()
-        {
-            var result = Sse41.Insert(
-                Sse.LoadAlignedVector128((Single*)(_dataTable.inArrayPtr)),
-                (float)2,
-                1
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_UnsafeRead()
-        {
-            var result = typeof(Sse41).GetMethod(nameof(Sse41.Insert), new Type[] { typeof(Vector128<Single>), typeof(Single), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Unsafe.Read<Vector128<Single>>(_dataTable.inArrayPtr),
-                                        (float)2,
-                                        (byte)1
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Vector128<Single>)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_Load()
-        {
-            var result = typeof(Sse41).GetMethod(nameof(Sse41.Insert), new Type[] { typeof(Vector128<Single>), typeof(Single), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Sse.LoadVector128((Single*)(_dataTable.inArrayPtr)),
-                                        (float)2,
-                                        (byte)1
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Vector128<Single>)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_LoadAligned()
-        {
-            var result = typeof(Sse41).GetMethod(nameof(Sse41.Insert), new Type[] { typeof(Vector128<Single>), typeof(Single), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Sse.LoadAlignedVector128((Single*)(_dataTable.inArrayPtr)),
-                                        (float)2,
-                                        (byte)1
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Vector128<Single>)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunClsVarScenario()
-        {
-            var result = Sse41.Insert(
-                _clsVar,
-                (float)2,
-                1
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_clsVar, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_UnsafeRead()
-        {
-            var firstOp = Unsafe.Read<Vector128<Single>>(_dataTable.inArrayPtr);
-            var result = Sse41.Insert(firstOp, (float)2, 1);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_Load()
-        {
-            var firstOp = Sse.LoadVector128((Single*)(_dataTable.inArrayPtr));
-            var result = Sse41.Insert(firstOp, (float)2, 1);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_LoadAligned()
-        {
-            var firstOp = Sse.LoadAlignedVector128((Single*)(_dataTable.inArrayPtr));
-            var result = Sse41.Insert(firstOp, (float)2, 1);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclFldScenario()
-        {
-            var test = new SimpleUnaryOpTest__InsertSingle1();
-            var result = Sse41.Insert(test._fld, (float)2, 1);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(test._fld, _dataTable.outArrayPtr);
-        }
-
-        public void RunFldScenario()
-        {
-            var result = Sse41.Insert(_fld, (float)2, 1);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_fld, _dataTable.outArrayPtr);
-        }
-
-        public void RunUnsupportedScenario()
-        {
-            Succeeded = false;
-
-            try
-            {
-                RunBasicScenario_UnsafeRead();
-            }
-            catch (PlatformNotSupportedException)
-            {
-                Succeeded = true;
-            }
-        }
-
-        private void ValidateResult(Vector128<Single> firstOp, void* result, [CallerMemberName] string method = "")
-        {
-            Single[] inArray = new Single[Op1ElementCount];
-            Single[] outArray = new Single[RetElementCount];
-
-            Unsafe.WriteUnaligned(ref Unsafe.As<Single, byte>(ref inArray[0]), firstOp);
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Single, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector128<Single>>());
-
-            ValidateResult(inArray, outArray, method);
-        }
-
-        private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "")
-        {
-            Single[] inArray = new Single[Op1ElementCount];
-            Single[] outArray = new Single[RetElementCount];
-
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Single, byte>(ref inArray[0]), ref Unsafe.AsRef<byte>(firstOp), (uint)Unsafe.SizeOf<Vector128<Single>>());
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Single, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector128<Single>>());
-
-            ValidateResult(inArray, outArray, method);
-        }
-
-        private void ValidateResult(Single[] firstOp, Single[] result, [CallerMemberName] string method = "")
-        {
-
-            for (var i = 0; i < RetElementCount; i++)
-            {
-                if ((i == 0 ? BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(0.0f) : BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(firstOp[i])))
-                {
-                    Succeeded = false;
-                    break;
-                }
-            }
-
-            if (!Succeeded)
-            {
-                Console.WriteLine($"{nameof(Sse41)}.{nameof(Sse41.Insert)}<Single>(Vector128<Single><9>): {method} failed:");
-                Console.WriteLine($"  firstOp: ({string.Join(", ", firstOp)})");
-                Console.WriteLine($"   result: ({string.Join(", ", result)})");
-                Console.WriteLine();
-            }
-        }
-    }
-}
diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Single.128.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Single.128.cs
deleted file mode 100644 (file)
index 0ca4931..0000000
+++ /dev/null
@@ -1,321 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-/******************************************************************************
- * This file is auto-generated from a template file by the GenerateTests.csx  *
- * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make    *
- * changes, please update the corresponding template and run according to the *
- * directions listed in the file.                                             *
- ******************************************************************************/
-
-using System;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Runtime.Intrinsics;
-using System.Runtime.Intrinsics.X86;
-
-namespace JIT.HardwareIntrinsics.X86
-{
-    public static partial class Program
-    {
-        private static void InsertSingle128()
-        {
-            var test = new SimpleUnaryOpTest__InsertSingle128();
-            
-            try
-            {
-            if (test.IsSupported)
-            {
-                // Validates basic functionality works, using Unsafe.Read
-                test.RunBasicScenario_UnsafeRead();
-
-                if (Sse.IsSupported)
-                {
-                    // Validates basic functionality works, using Load
-                    test.RunBasicScenario_Load();
-
-                    // Validates basic functionality works, using LoadAligned
-                    test.RunBasicScenario_LoadAligned();
-                }
-
-                // Validates calling via reflection works, using Unsafe.Read
-                test.RunReflectionScenario_UnsafeRead();
-
-                if (Sse.IsSupported)
-                {
-                    // Validates calling via reflection works, using Load
-                    test.RunReflectionScenario_Load();
-
-                    // Validates calling via reflection works, using LoadAligned
-                    test.RunReflectionScenario_LoadAligned();
-                }
-
-                // Validates passing a static member works
-                test.RunClsVarScenario();
-
-                // Validates passing a local works, using Unsafe.Read
-                test.RunLclVarScenario_UnsafeRead();
-
-                if (Sse.IsSupported)
-                {
-                    // Validates passing a local works, using Load
-                    test.RunLclVarScenario_Load();
-
-                    // Validates passing a local works, using LoadAligned
-                    test.RunLclVarScenario_LoadAligned();
-                }
-
-                // Validates passing the field of a local works
-                test.RunLclFldScenario();
-
-                // Validates passing an instance member works
-                test.RunFldScenario();
-            }
-            else
-            {
-                // Validates we throw on unsupported hardware
-                test.RunUnsupportedScenario();
-            }
-            }
-            catch (PlatformNotSupportedException)
-            {
-                test.Succeeded = true;
-            }
-
-            if (!test.Succeeded)
-            {
-                throw new Exception("One or more scenarios did not complete as expected.");
-            }
-        }
-    }
-
-    public sealed unsafe class SimpleUnaryOpTest__InsertSingle128
-    {
-        private static readonly int LargestVectorSize = 16;
-
-        private static readonly int Op1ElementCount = Unsafe.SizeOf<Vector128<Single>>() / sizeof(Single);
-        private static readonly int RetElementCount = Unsafe.SizeOf<Vector128<Single>>() / sizeof(Single);
-
-        private static Single[] _data = new Single[Op1ElementCount];
-
-        private static Vector128<Single> _clsVar;
-
-        private Vector128<Single> _fld;
-
-        private SimpleUnaryOpTest__DataTable<Single, Single> _dataTable;
-
-        static SimpleUnaryOpTest__InsertSingle128()
-        {
-            var random = new Random();
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (float)(random.NextDouble()); }
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Single>, byte>(ref _clsVar), ref Unsafe.As<Single, byte>(ref _data[0]), (uint)Unsafe.SizeOf<Vector128<Single>>());
-        }
-
-        public SimpleUnaryOpTest__InsertSingle128()
-        {
-            Succeeded = true;
-
-            var random = new Random();
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (float)(random.NextDouble()); }
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Single>, byte>(ref _fld), ref Unsafe.As<Single, byte>(ref _data[0]), (uint)Unsafe.SizeOf<Vector128<Single>>());
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (float)(random.NextDouble()); }
-            _dataTable = new SimpleUnaryOpTest__DataTable<Single, Single>(_data, new Single[RetElementCount], LargestVectorSize);
-        }
-
-        public bool IsSupported => Sse41.IsSupported;
-
-        public bool Succeeded { get; set; }
-
-        public void RunBasicScenario_UnsafeRead()
-        {
-            var result = Sse41.Insert(
-                Unsafe.Read<Vector128<Single>>(_dataTable.inArrayPtr),
-                (float)2,
-                128
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunBasicScenario_Load()
-        {
-            var result = Sse41.Insert(
-                Sse.LoadVector128((Single*)(_dataTable.inArrayPtr)),
-                (float)2,
-                128
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunBasicScenario_LoadAligned()
-        {
-            var result = Sse41.Insert(
-                Sse.LoadAlignedVector128((Single*)(_dataTable.inArrayPtr)),
-                (float)2,
-                128
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_UnsafeRead()
-        {
-            var result = typeof(Sse41).GetMethod(nameof(Sse41.Insert), new Type[] { typeof(Vector128<Single>), typeof(Single), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Unsafe.Read<Vector128<Single>>(_dataTable.inArrayPtr),
-                                        (float)2,
-                                        (byte)128
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Vector128<Single>)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_Load()
-        {
-            var result = typeof(Sse41).GetMethod(nameof(Sse41.Insert), new Type[] { typeof(Vector128<Single>), typeof(Single), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Sse.LoadVector128((Single*)(_dataTable.inArrayPtr)),
-                                        (float)2,
-                                        (byte)128
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Vector128<Single>)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_LoadAligned()
-        {
-            var result = typeof(Sse41).GetMethod(nameof(Sse41.Insert), new Type[] { typeof(Vector128<Single>), typeof(Single), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Sse.LoadAlignedVector128((Single*)(_dataTable.inArrayPtr)),
-                                        (float)2,
-                                        (byte)128
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Vector128<Single>)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunClsVarScenario()
-        {
-            var result = Sse41.Insert(
-                _clsVar,
-                (float)2,
-                128
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_clsVar, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_UnsafeRead()
-        {
-            var firstOp = Unsafe.Read<Vector128<Single>>(_dataTable.inArrayPtr);
-            var result = Sse41.Insert(firstOp, (float)2, 128);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_Load()
-        {
-            var firstOp = Sse.LoadVector128((Single*)(_dataTable.inArrayPtr));
-            var result = Sse41.Insert(firstOp, (float)2, 128);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_LoadAligned()
-        {
-            var firstOp = Sse.LoadAlignedVector128((Single*)(_dataTable.inArrayPtr));
-            var result = Sse41.Insert(firstOp, (float)2, 128);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclFldScenario()
-        {
-            var test = new SimpleUnaryOpTest__InsertSingle128();
-            var result = Sse41.Insert(test._fld, (float)2, 128);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(test._fld, _dataTable.outArrayPtr);
-        }
-
-        public void RunFldScenario()
-        {
-            var result = Sse41.Insert(_fld, (float)2, 128);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_fld, _dataTable.outArrayPtr);
-        }
-
-        public void RunUnsupportedScenario()
-        {
-            Succeeded = false;
-
-            try
-            {
-                RunBasicScenario_UnsafeRead();
-            }
-            catch (PlatformNotSupportedException)
-            {
-                Succeeded = true;
-            }
-        }
-
-        private void ValidateResult(Vector128<Single> firstOp, void* result, [CallerMemberName] string method = "")
-        {
-            Single[] inArray = new Single[Op1ElementCount];
-            Single[] outArray = new Single[RetElementCount];
-
-            Unsafe.WriteUnaligned(ref Unsafe.As<Single, byte>(ref inArray[0]), firstOp);
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Single, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector128<Single>>());
-
-            ValidateResult(inArray, outArray, method);
-        }
-
-        private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "")
-        {
-            Single[] inArray = new Single[Op1ElementCount];
-            Single[] outArray = new Single[RetElementCount];
-
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Single, byte>(ref inArray[0]), ref Unsafe.AsRef<byte>(firstOp), (uint)Unsafe.SizeOf<Vector128<Single>>());
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Single, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector128<Single>>());
-
-            ValidateResult(inArray, outArray, method);
-        }
-
-        private void ValidateResult(Single[] firstOp, Single[] result, [CallerMemberName] string method = "")
-        {
-
-            for (var i = 0; i < RetElementCount; i++)
-            {
-                if ((i == 0 ? BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(2.0f) : BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(firstOp[i])))
-                {
-                    Succeeded = false;
-                    break;
-                }
-            }
-
-            if (!Succeeded)
-            {
-                Console.WriteLine($"{nameof(Sse41)}.{nameof(Sse41.Insert)}<Single>(Vector128<Single><9>): {method} failed:");
-                Console.WriteLine($"  firstOp: ({string.Join(", ", firstOp)})");
-                Console.WriteLine($"   result: ({string.Join(", ", result)})");
-                Console.WriteLine();
-            }
-        }
-    }
-}
diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Single.129.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Single.129.cs
deleted file mode 100644 (file)
index 8b30e9f..0000000
+++ /dev/null
@@ -1,321 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-/******************************************************************************
- * This file is auto-generated from a template file by the GenerateTests.csx  *
- * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make    *
- * changes, please update the corresponding template and run according to the *
- * directions listed in the file.                                             *
- ******************************************************************************/
-
-using System;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Runtime.Intrinsics;
-using System.Runtime.Intrinsics.X86;
-
-namespace JIT.HardwareIntrinsics.X86
-{
-    public static partial class Program
-    {
-        private static void InsertSingle129()
-        {
-            var test = new SimpleUnaryOpTest__InsertSingle129();
-            
-            try
-            {
-            if (test.IsSupported)
-            {
-                // Validates basic functionality works, using Unsafe.Read
-                test.RunBasicScenario_UnsafeRead();
-
-                if (Sse.IsSupported)
-                {
-                    // Validates basic functionality works, using Load
-                    test.RunBasicScenario_Load();
-
-                    // Validates basic functionality works, using LoadAligned
-                    test.RunBasicScenario_LoadAligned();
-                }
-
-                // Validates calling via reflection works, using Unsafe.Read
-                test.RunReflectionScenario_UnsafeRead();
-
-                if (Sse.IsSupported)
-                {
-                    // Validates calling via reflection works, using Load
-                    test.RunReflectionScenario_Load();
-
-                    // Validates calling via reflection works, using LoadAligned
-                    test.RunReflectionScenario_LoadAligned();
-                }
-
-                // Validates passing a static member works
-                test.RunClsVarScenario();
-
-                // Validates passing a local works, using Unsafe.Read
-                test.RunLclVarScenario_UnsafeRead();
-
-                if (Sse.IsSupported)
-                {
-                    // Validates passing a local works, using Load
-                    test.RunLclVarScenario_Load();
-
-                    // Validates passing a local works, using LoadAligned
-                    test.RunLclVarScenario_LoadAligned();
-                }
-
-                // Validates passing the field of a local works
-                test.RunLclFldScenario();
-
-                // Validates passing an instance member works
-                test.RunFldScenario();
-            }
-            else
-            {
-                // Validates we throw on unsupported hardware
-                test.RunUnsupportedScenario();
-            }
-            }
-            catch (PlatformNotSupportedException)
-            {
-                test.Succeeded = true;
-            }
-
-            if (!test.Succeeded)
-            {
-                throw new Exception("One or more scenarios did not complete as expected.");
-            }
-        }
-    }
-
-    public sealed unsafe class SimpleUnaryOpTest__InsertSingle129
-    {
-        private static readonly int LargestVectorSize = 16;
-
-        private static readonly int Op1ElementCount = Unsafe.SizeOf<Vector128<Single>>() / sizeof(Single);
-        private static readonly int RetElementCount = Unsafe.SizeOf<Vector128<Single>>() / sizeof(Single);
-
-        private static Single[] _data = new Single[Op1ElementCount];
-
-        private static Vector128<Single> _clsVar;
-
-        private Vector128<Single> _fld;
-
-        private SimpleUnaryOpTest__DataTable<Single, Single> _dataTable;
-
-        static SimpleUnaryOpTest__InsertSingle129()
-        {
-            var random = new Random();
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (float)(random.NextDouble()); }
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Single>, byte>(ref _clsVar), ref Unsafe.As<Single, byte>(ref _data[0]), (uint)Unsafe.SizeOf<Vector128<Single>>());
-        }
-
-        public SimpleUnaryOpTest__InsertSingle129()
-        {
-            Succeeded = true;
-
-            var random = new Random();
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (float)(random.NextDouble()); }
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Single>, byte>(ref _fld), ref Unsafe.As<Single, byte>(ref _data[0]), (uint)Unsafe.SizeOf<Vector128<Single>>());
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (float)(random.NextDouble()); }
-            _dataTable = new SimpleUnaryOpTest__DataTable<Single, Single>(_data, new Single[RetElementCount], LargestVectorSize);
-        }
-
-        public bool IsSupported => Sse41.IsSupported;
-
-        public bool Succeeded { get; set; }
-
-        public void RunBasicScenario_UnsafeRead()
-        {
-            var result = Sse41.Insert(
-                Unsafe.Read<Vector128<Single>>(_dataTable.inArrayPtr),
-                (float)2,
-                129
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunBasicScenario_Load()
-        {
-            var result = Sse41.Insert(
-                Sse.LoadVector128((Single*)(_dataTable.inArrayPtr)),
-                (float)2,
-                129
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunBasicScenario_LoadAligned()
-        {
-            var result = Sse41.Insert(
-                Sse.LoadAlignedVector128((Single*)(_dataTable.inArrayPtr)),
-                (float)2,
-                129
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_UnsafeRead()
-        {
-            var result = typeof(Sse41).GetMethod(nameof(Sse41.Insert), new Type[] { typeof(Vector128<Single>), typeof(Single), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Unsafe.Read<Vector128<Single>>(_dataTable.inArrayPtr),
-                                        (float)2,
-                                        (byte)129
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Vector128<Single>)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_Load()
-        {
-            var result = typeof(Sse41).GetMethod(nameof(Sse41.Insert), new Type[] { typeof(Vector128<Single>), typeof(Single), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Sse.LoadVector128((Single*)(_dataTable.inArrayPtr)),
-                                        (float)2,
-                                        (byte)129
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Vector128<Single>)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_LoadAligned()
-        {
-            var result = typeof(Sse41).GetMethod(nameof(Sse41.Insert), new Type[] { typeof(Vector128<Single>), typeof(Single), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Sse.LoadAlignedVector128((Single*)(_dataTable.inArrayPtr)),
-                                        (float)2,
-                                        (byte)129
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Vector128<Single>)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunClsVarScenario()
-        {
-            var result = Sse41.Insert(
-                _clsVar,
-                (float)2,
-                129
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_clsVar, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_UnsafeRead()
-        {
-            var firstOp = Unsafe.Read<Vector128<Single>>(_dataTable.inArrayPtr);
-            var result = Sse41.Insert(firstOp, (float)2, 129);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_Load()
-        {
-            var firstOp = Sse.LoadVector128((Single*)(_dataTable.inArrayPtr));
-            var result = Sse41.Insert(firstOp, (float)2, 129);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_LoadAligned()
-        {
-            var firstOp = Sse.LoadAlignedVector128((Single*)(_dataTable.inArrayPtr));
-            var result = Sse41.Insert(firstOp, (float)2, 129);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclFldScenario()
-        {
-            var test = new SimpleUnaryOpTest__InsertSingle129();
-            var result = Sse41.Insert(test._fld, (float)2, 129);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(test._fld, _dataTable.outArrayPtr);
-        }
-
-        public void RunFldScenario()
-        {
-            var result = Sse41.Insert(_fld, (float)2, 129);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_fld, _dataTable.outArrayPtr);
-        }
-
-        public void RunUnsupportedScenario()
-        {
-            Succeeded = false;
-
-            try
-            {
-                RunBasicScenario_UnsafeRead();
-            }
-            catch (PlatformNotSupportedException)
-            {
-                Succeeded = true;
-            }
-        }
-
-        private void ValidateResult(Vector128<Single> firstOp, void* result, [CallerMemberName] string method = "")
-        {
-            Single[] inArray = new Single[Op1ElementCount];
-            Single[] outArray = new Single[RetElementCount];
-
-            Unsafe.WriteUnaligned(ref Unsafe.As<Single, byte>(ref inArray[0]), firstOp);
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Single, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector128<Single>>());
-
-            ValidateResult(inArray, outArray, method);
-        }
-
-        private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "")
-        {
-            Single[] inArray = new Single[Op1ElementCount];
-            Single[] outArray = new Single[RetElementCount];
-
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Single, byte>(ref inArray[0]), ref Unsafe.AsRef<byte>(firstOp), (uint)Unsafe.SizeOf<Vector128<Single>>());
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Single, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector128<Single>>());
-
-            ValidateResult(inArray, outArray, method);
-        }
-
-        private void ValidateResult(Single[] firstOp, Single[] result, [CallerMemberName] string method = "")
-        {
-
-            for (var i = 0; i < RetElementCount; i++)
-            {
-                if ((i == 0 ? BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(0.0f) : BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(firstOp[i])))
-                {
-                    Succeeded = false;
-                    break;
-                }
-            }
-
-            if (!Succeeded)
-            {
-                Console.WriteLine($"{nameof(Sse41)}.{nameof(Sse41.Insert)}<Single>(Vector128<Single><9>): {method} failed:");
-                Console.WriteLine($"  firstOp: ({string.Join(", ", firstOp)})");
-                Console.WriteLine($"   result: ({string.Join(", ", result)})");
-                Console.WriteLine();
-            }
-        }
-    }
-}
diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Single.16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Single.16.cs
deleted file mode 100644 (file)
index a491c10..0000000
+++ /dev/null
@@ -1,321 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-/******************************************************************************
- * This file is auto-generated from a template file by the GenerateTests.csx  *
- * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make    *
- * changes, please update the corresponding template and run according to the *
- * directions listed in the file.                                             *
- ******************************************************************************/
-
-using System;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Runtime.Intrinsics;
-using System.Runtime.Intrinsics.X86;
-
-namespace JIT.HardwareIntrinsics.X86
-{
-    public static partial class Program
-    {
-        private static void InsertSingle16()
-        {
-            var test = new SimpleUnaryOpTest__InsertSingle16();
-            
-            try
-            {
-            if (test.IsSupported)
-            {
-                // Validates basic functionality works, using Unsafe.Read
-                test.RunBasicScenario_UnsafeRead();
-
-                if (Sse.IsSupported)
-                {
-                    // Validates basic functionality works, using Load
-                    test.RunBasicScenario_Load();
-
-                    // Validates basic functionality works, using LoadAligned
-                    test.RunBasicScenario_LoadAligned();
-                }
-
-                // Validates calling via reflection works, using Unsafe.Read
-                test.RunReflectionScenario_UnsafeRead();
-
-                if (Sse.IsSupported)
-                {
-                    // Validates calling via reflection works, using Load
-                    test.RunReflectionScenario_Load();
-
-                    // Validates calling via reflection works, using LoadAligned
-                    test.RunReflectionScenario_LoadAligned();
-                }
-
-                // Validates passing a static member works
-                test.RunClsVarScenario();
-
-                // Validates passing a local works, using Unsafe.Read
-                test.RunLclVarScenario_UnsafeRead();
-
-                if (Sse.IsSupported)
-                {
-                    // Validates passing a local works, using Load
-                    test.RunLclVarScenario_Load();
-
-                    // Validates passing a local works, using LoadAligned
-                    test.RunLclVarScenario_LoadAligned();
-                }
-
-                // Validates passing the field of a local works
-                test.RunLclFldScenario();
-
-                // Validates passing an instance member works
-                test.RunFldScenario();
-            }
-            else
-            {
-                // Validates we throw on unsupported hardware
-                test.RunUnsupportedScenario();
-            }
-            }
-            catch (PlatformNotSupportedException)
-            {
-                test.Succeeded = true;
-            }
-
-            if (!test.Succeeded)
-            {
-                throw new Exception("One or more scenarios did not complete as expected.");
-            }
-        }
-    }
-
-    public sealed unsafe class SimpleUnaryOpTest__InsertSingle16
-    {
-        private static readonly int LargestVectorSize = 16;
-
-        private static readonly int Op1ElementCount = Unsafe.SizeOf<Vector128<Single>>() / sizeof(Single);
-        private static readonly int RetElementCount = Unsafe.SizeOf<Vector128<Single>>() / sizeof(Single);
-
-        private static Single[] _data = new Single[Op1ElementCount];
-
-        private static Vector128<Single> _clsVar;
-
-        private Vector128<Single> _fld;
-
-        private SimpleUnaryOpTest__DataTable<Single, Single> _dataTable;
-
-        static SimpleUnaryOpTest__InsertSingle16()
-        {
-            var random = new Random();
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (float)(random.NextDouble()); }
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Single>, byte>(ref _clsVar), ref Unsafe.As<Single, byte>(ref _data[0]), (uint)Unsafe.SizeOf<Vector128<Single>>());
-        }
-
-        public SimpleUnaryOpTest__InsertSingle16()
-        {
-            Succeeded = true;
-
-            var random = new Random();
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (float)(random.NextDouble()); }
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Single>, byte>(ref _fld), ref Unsafe.As<Single, byte>(ref _data[0]), (uint)Unsafe.SizeOf<Vector128<Single>>());
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (float)(random.NextDouble()); }
-            _dataTable = new SimpleUnaryOpTest__DataTable<Single, Single>(_data, new Single[RetElementCount], LargestVectorSize);
-        }
-
-        public bool IsSupported => Sse41.IsSupported;
-
-        public bool Succeeded { get; set; }
-
-        public void RunBasicScenario_UnsafeRead()
-        {
-            var result = Sse41.Insert(
-                Unsafe.Read<Vector128<Single>>(_dataTable.inArrayPtr),
-                (float)2,
-                16
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunBasicScenario_Load()
-        {
-            var result = Sse41.Insert(
-                Sse.LoadVector128((Single*)(_dataTable.inArrayPtr)),
-                (float)2,
-                16
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunBasicScenario_LoadAligned()
-        {
-            var result = Sse41.Insert(
-                Sse.LoadAlignedVector128((Single*)(_dataTable.inArrayPtr)),
-                (float)2,
-                16
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_UnsafeRead()
-        {
-            var result = typeof(Sse41).GetMethod(nameof(Sse41.Insert), new Type[] { typeof(Vector128<Single>), typeof(Single), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Unsafe.Read<Vector128<Single>>(_dataTable.inArrayPtr),
-                                        (float)2,
-                                        (byte)16
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Vector128<Single>)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_Load()
-        {
-            var result = typeof(Sse41).GetMethod(nameof(Sse41.Insert), new Type[] { typeof(Vector128<Single>), typeof(Single), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Sse.LoadVector128((Single*)(_dataTable.inArrayPtr)),
-                                        (float)2,
-                                        (byte)16
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Vector128<Single>)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_LoadAligned()
-        {
-            var result = typeof(Sse41).GetMethod(nameof(Sse41.Insert), new Type[] { typeof(Vector128<Single>), typeof(Single), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Sse.LoadAlignedVector128((Single*)(_dataTable.inArrayPtr)),
-                                        (float)2,
-                                        (byte)16
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Vector128<Single>)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunClsVarScenario()
-        {
-            var result = Sse41.Insert(
-                _clsVar,
-                (float)2,
-                16
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_clsVar, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_UnsafeRead()
-        {
-            var firstOp = Unsafe.Read<Vector128<Single>>(_dataTable.inArrayPtr);
-            var result = Sse41.Insert(firstOp, (float)2, 16);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_Load()
-        {
-            var firstOp = Sse.LoadVector128((Single*)(_dataTable.inArrayPtr));
-            var result = Sse41.Insert(firstOp, (float)2, 16);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_LoadAligned()
-        {
-            var firstOp = Sse.LoadAlignedVector128((Single*)(_dataTable.inArrayPtr));
-            var result = Sse41.Insert(firstOp, (float)2, 16);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclFldScenario()
-        {
-            var test = new SimpleUnaryOpTest__InsertSingle16();
-            var result = Sse41.Insert(test._fld, (float)2, 16);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(test._fld, _dataTable.outArrayPtr);
-        }
-
-        public void RunFldScenario()
-        {
-            var result = Sse41.Insert(_fld, (float)2, 16);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_fld, _dataTable.outArrayPtr);
-        }
-
-        public void RunUnsupportedScenario()
-        {
-            Succeeded = false;
-
-            try
-            {
-                RunBasicScenario_UnsafeRead();
-            }
-            catch (PlatformNotSupportedException)
-            {
-                Succeeded = true;
-            }
-        }
-
-        private void ValidateResult(Vector128<Single> firstOp, void* result, [CallerMemberName] string method = "")
-        {
-            Single[] inArray = new Single[Op1ElementCount];
-            Single[] outArray = new Single[RetElementCount];
-
-            Unsafe.WriteUnaligned(ref Unsafe.As<Single, byte>(ref inArray[0]), firstOp);
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Single, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector128<Single>>());
-
-            ValidateResult(inArray, outArray, method);
-        }
-
-        private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "")
-        {
-            Single[] inArray = new Single[Op1ElementCount];
-            Single[] outArray = new Single[RetElementCount];
-
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Single, byte>(ref inArray[0]), ref Unsafe.AsRef<byte>(firstOp), (uint)Unsafe.SizeOf<Vector128<Single>>());
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Single, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector128<Single>>());
-
-            ValidateResult(inArray, outArray, method);
-        }
-
-        private void ValidateResult(Single[] firstOp, Single[] result, [CallerMemberName] string method = "")
-        {
-
-            for (var i = 0; i < RetElementCount; i++)
-            {
-                if ((i == 1 ? BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(2.0f) : BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(firstOp[i])))
-                {
-                    Succeeded = false;
-                    break;
-                }
-            }
-
-            if (!Succeeded)
-            {
-                Console.WriteLine($"{nameof(Sse41)}.{nameof(Sse41.Insert)}<Single>(Vector128<Single><9>): {method} failed:");
-                Console.WriteLine($"  firstOp: ({string.Join(", ", firstOp)})");
-                Console.WriteLine($"   result: ({string.Join(", ", result)})");
-                Console.WriteLine();
-            }
-        }
-    }
-}
diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Single.192.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Single.192.cs
deleted file mode 100644 (file)
index f8908e3..0000000
+++ /dev/null
@@ -1,321 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-/******************************************************************************
- * This file is auto-generated from a template file by the GenerateTests.csx  *
- * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make    *
- * changes, please update the corresponding template and run according to the *
- * directions listed in the file.                                             *
- ******************************************************************************/
-
-using System;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Runtime.Intrinsics;
-using System.Runtime.Intrinsics.X86;
-
-namespace JIT.HardwareIntrinsics.X86
-{
-    public static partial class Program
-    {
-        private static void InsertSingle192()
-        {
-            var test = new SimpleUnaryOpTest__InsertSingle192();
-            
-            try
-            {
-            if (test.IsSupported)
-            {
-                // Validates basic functionality works, using Unsafe.Read
-                test.RunBasicScenario_UnsafeRead();
-
-                if (Sse.IsSupported)
-                {
-                    // Validates basic functionality works, using Load
-                    test.RunBasicScenario_Load();
-
-                    // Validates basic functionality works, using LoadAligned
-                    test.RunBasicScenario_LoadAligned();
-                }
-
-                // Validates calling via reflection works, using Unsafe.Read
-                test.RunReflectionScenario_UnsafeRead();
-
-                if (Sse.IsSupported)
-                {
-                    // Validates calling via reflection works, using Load
-                    test.RunReflectionScenario_Load();
-
-                    // Validates calling via reflection works, using LoadAligned
-                    test.RunReflectionScenario_LoadAligned();
-                }
-
-                // Validates passing a static member works
-                test.RunClsVarScenario();
-
-                // Validates passing a local works, using Unsafe.Read
-                test.RunLclVarScenario_UnsafeRead();
-
-                if (Sse.IsSupported)
-                {
-                    // Validates passing a local works, using Load
-                    test.RunLclVarScenario_Load();
-
-                    // Validates passing a local works, using LoadAligned
-                    test.RunLclVarScenario_LoadAligned();
-                }
-
-                // Validates passing the field of a local works
-                test.RunLclFldScenario();
-
-                // Validates passing an instance member works
-                test.RunFldScenario();
-            }
-            else
-            {
-                // Validates we throw on unsupported hardware
-                test.RunUnsupportedScenario();
-            }
-            }
-            catch (PlatformNotSupportedException)
-            {
-                test.Succeeded = true;
-            }
-
-            if (!test.Succeeded)
-            {
-                throw new Exception("One or more scenarios did not complete as expected.");
-            }
-        }
-    }
-
-    public sealed unsafe class SimpleUnaryOpTest__InsertSingle192
-    {
-        private static readonly int LargestVectorSize = 16;
-
-        private static readonly int Op1ElementCount = Unsafe.SizeOf<Vector128<Single>>() / sizeof(Single);
-        private static readonly int RetElementCount = Unsafe.SizeOf<Vector128<Single>>() / sizeof(Single);
-
-        private static Single[] _data = new Single[Op1ElementCount];
-
-        private static Vector128<Single> _clsVar;
-
-        private Vector128<Single> _fld;
-
-        private SimpleUnaryOpTest__DataTable<Single, Single> _dataTable;
-
-        static SimpleUnaryOpTest__InsertSingle192()
-        {
-            var random = new Random();
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (float)(random.NextDouble()); }
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Single>, byte>(ref _clsVar), ref Unsafe.As<Single, byte>(ref _data[0]), (uint)Unsafe.SizeOf<Vector128<Single>>());
-        }
-
-        public SimpleUnaryOpTest__InsertSingle192()
-        {
-            Succeeded = true;
-
-            var random = new Random();
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (float)(random.NextDouble()); }
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Single>, byte>(ref _fld), ref Unsafe.As<Single, byte>(ref _data[0]), (uint)Unsafe.SizeOf<Vector128<Single>>());
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (float)(random.NextDouble()); }
-            _dataTable = new SimpleUnaryOpTest__DataTable<Single, Single>(_data, new Single[RetElementCount], LargestVectorSize);
-        }
-
-        public bool IsSupported => Sse41.IsSupported;
-
-        public bool Succeeded { get; set; }
-
-        public void RunBasicScenario_UnsafeRead()
-        {
-            var result = Sse41.Insert(
-                Unsafe.Read<Vector128<Single>>(_dataTable.inArrayPtr),
-                (float)2,
-                192
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunBasicScenario_Load()
-        {
-            var result = Sse41.Insert(
-                Sse.LoadVector128((Single*)(_dataTable.inArrayPtr)),
-                (float)2,
-                192
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunBasicScenario_LoadAligned()
-        {
-            var result = Sse41.Insert(
-                Sse.LoadAlignedVector128((Single*)(_dataTable.inArrayPtr)),
-                (float)2,
-                192
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_UnsafeRead()
-        {
-            var result = typeof(Sse41).GetMethod(nameof(Sse41.Insert), new Type[] { typeof(Vector128<Single>), typeof(Single), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Unsafe.Read<Vector128<Single>>(_dataTable.inArrayPtr),
-                                        (float)2,
-                                        (byte)192
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Vector128<Single>)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_Load()
-        {
-            var result = typeof(Sse41).GetMethod(nameof(Sse41.Insert), new Type[] { typeof(Vector128<Single>), typeof(Single), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Sse.LoadVector128((Single*)(_dataTable.inArrayPtr)),
-                                        (float)2,
-                                        (byte)192
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Vector128<Single>)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_LoadAligned()
-        {
-            var result = typeof(Sse41).GetMethod(nameof(Sse41.Insert), new Type[] { typeof(Vector128<Single>), typeof(Single), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Sse.LoadAlignedVector128((Single*)(_dataTable.inArrayPtr)),
-                                        (float)2,
-                                        (byte)192
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Vector128<Single>)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunClsVarScenario()
-        {
-            var result = Sse41.Insert(
-                _clsVar,
-                (float)2,
-                192
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_clsVar, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_UnsafeRead()
-        {
-            var firstOp = Unsafe.Read<Vector128<Single>>(_dataTable.inArrayPtr);
-            var result = Sse41.Insert(firstOp, (float)2, 192);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_Load()
-        {
-            var firstOp = Sse.LoadVector128((Single*)(_dataTable.inArrayPtr));
-            var result = Sse41.Insert(firstOp, (float)2, 192);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_LoadAligned()
-        {
-            var firstOp = Sse.LoadAlignedVector128((Single*)(_dataTable.inArrayPtr));
-            var result = Sse41.Insert(firstOp, (float)2, 192);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclFldScenario()
-        {
-            var test = new SimpleUnaryOpTest__InsertSingle192();
-            var result = Sse41.Insert(test._fld, (float)2, 192);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(test._fld, _dataTable.outArrayPtr);
-        }
-
-        public void RunFldScenario()
-        {
-            var result = Sse41.Insert(_fld, (float)2, 192);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_fld, _dataTable.outArrayPtr);
-        }
-
-        public void RunUnsupportedScenario()
-        {
-            Succeeded = false;
-
-            try
-            {
-                RunBasicScenario_UnsafeRead();
-            }
-            catch (PlatformNotSupportedException)
-            {
-                Succeeded = true;
-            }
-        }
-
-        private void ValidateResult(Vector128<Single> firstOp, void* result, [CallerMemberName] string method = "")
-        {
-            Single[] inArray = new Single[Op1ElementCount];
-            Single[] outArray = new Single[RetElementCount];
-
-            Unsafe.WriteUnaligned(ref Unsafe.As<Single, byte>(ref inArray[0]), firstOp);
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Single, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector128<Single>>());
-
-            ValidateResult(inArray, outArray, method);
-        }
-
-        private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "")
-        {
-            Single[] inArray = new Single[Op1ElementCount];
-            Single[] outArray = new Single[RetElementCount];
-
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Single, byte>(ref inArray[0]), ref Unsafe.AsRef<byte>(firstOp), (uint)Unsafe.SizeOf<Vector128<Single>>());
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Single, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector128<Single>>());
-
-            ValidateResult(inArray, outArray, method);
-        }
-
-        private void ValidateResult(Single[] firstOp, Single[] result, [CallerMemberName] string method = "")
-        {
-
-            for (var i = 0; i < RetElementCount; i++)
-            {
-                if ((i == 0 ? BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(2.0f) : BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(firstOp[i])))
-                {
-                    Succeeded = false;
-                    break;
-                }
-            }
-
-            if (!Succeeded)
-            {
-                Console.WriteLine($"{nameof(Sse41)}.{nameof(Sse41.Insert)}<Single>(Vector128<Single><9>): {method} failed:");
-                Console.WriteLine($"  firstOp: ({string.Join(", ", firstOp)})");
-                Console.WriteLine($"   result: ({string.Join(", ", result)})");
-                Console.WriteLine();
-            }
-        }
-    }
-}
diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Single.2.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Single.2.cs
deleted file mode 100644 (file)
index 44ead60..0000000
+++ /dev/null
@@ -1,321 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-/******************************************************************************
- * This file is auto-generated from a template file by the GenerateTests.csx  *
- * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make    *
- * changes, please update the corresponding template and run according to the *
- * directions listed in the file.                                             *
- ******************************************************************************/
-
-using System;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Runtime.Intrinsics;
-using System.Runtime.Intrinsics.X86;
-
-namespace JIT.HardwareIntrinsics.X86
-{
-    public static partial class Program
-    {
-        private static void InsertSingle2()
-        {
-            var test = new SimpleUnaryOpTest__InsertSingle2();
-            
-            try
-            {
-            if (test.IsSupported)
-            {
-                // Validates basic functionality works, using Unsafe.Read
-                test.RunBasicScenario_UnsafeRead();
-
-                if (Sse.IsSupported)
-                {
-                    // Validates basic functionality works, using Load
-                    test.RunBasicScenario_Load();
-
-                    // Validates basic functionality works, using LoadAligned
-                    test.RunBasicScenario_LoadAligned();
-                }
-
-                // Validates calling via reflection works, using Unsafe.Read
-                test.RunReflectionScenario_UnsafeRead();
-
-                if (Sse.IsSupported)
-                {
-                    // Validates calling via reflection works, using Load
-                    test.RunReflectionScenario_Load();
-
-                    // Validates calling via reflection works, using LoadAligned
-                    test.RunReflectionScenario_LoadAligned();
-                }
-
-                // Validates passing a static member works
-                test.RunClsVarScenario();
-
-                // Validates passing a local works, using Unsafe.Read
-                test.RunLclVarScenario_UnsafeRead();
-
-                if (Sse.IsSupported)
-                {
-                    // Validates passing a local works, using Load
-                    test.RunLclVarScenario_Load();
-
-                    // Validates passing a local works, using LoadAligned
-                    test.RunLclVarScenario_LoadAligned();
-                }
-
-                // Validates passing the field of a local works
-                test.RunLclFldScenario();
-
-                // Validates passing an instance member works
-                test.RunFldScenario();
-            }
-            else
-            {
-                // Validates we throw on unsupported hardware
-                test.RunUnsupportedScenario();
-            }
-            }
-            catch (PlatformNotSupportedException)
-            {
-                test.Succeeded = true;
-            }
-
-            if (!test.Succeeded)
-            {
-                throw new Exception("One or more scenarios did not complete as expected.");
-            }
-        }
-    }
-
-    public sealed unsafe class SimpleUnaryOpTest__InsertSingle2
-    {
-        private static readonly int LargestVectorSize = 16;
-
-        private static readonly int Op1ElementCount = Unsafe.SizeOf<Vector128<Single>>() / sizeof(Single);
-        private static readonly int RetElementCount = Unsafe.SizeOf<Vector128<Single>>() / sizeof(Single);
-
-        private static Single[] _data = new Single[Op1ElementCount];
-
-        private static Vector128<Single> _clsVar;
-
-        private Vector128<Single> _fld;
-
-        private SimpleUnaryOpTest__DataTable<Single, Single> _dataTable;
-
-        static SimpleUnaryOpTest__InsertSingle2()
-        {
-            var random = new Random();
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (float)(random.NextDouble()); }
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Single>, byte>(ref _clsVar), ref Unsafe.As<Single, byte>(ref _data[0]), (uint)Unsafe.SizeOf<Vector128<Single>>());
-        }
-
-        public SimpleUnaryOpTest__InsertSingle2()
-        {
-            Succeeded = true;
-
-            var random = new Random();
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (float)(random.NextDouble()); }
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Single>, byte>(ref _fld), ref Unsafe.As<Single, byte>(ref _data[0]), (uint)Unsafe.SizeOf<Vector128<Single>>());
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (float)(random.NextDouble()); }
-            _dataTable = new SimpleUnaryOpTest__DataTable<Single, Single>(_data, new Single[RetElementCount], LargestVectorSize);
-        }
-
-        public bool IsSupported => Sse41.IsSupported;
-
-        public bool Succeeded { get; set; }
-
-        public void RunBasicScenario_UnsafeRead()
-        {
-            var result = Sse41.Insert(
-                Unsafe.Read<Vector128<Single>>(_dataTable.inArrayPtr),
-                (float)2,
-                2
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunBasicScenario_Load()
-        {
-            var result = Sse41.Insert(
-                Sse.LoadVector128((Single*)(_dataTable.inArrayPtr)),
-                (float)2,
-                2
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunBasicScenario_LoadAligned()
-        {
-            var result = Sse41.Insert(
-                Sse.LoadAlignedVector128((Single*)(_dataTable.inArrayPtr)),
-                (float)2,
-                2
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_UnsafeRead()
-        {
-            var result = typeof(Sse41).GetMethod(nameof(Sse41.Insert), new Type[] { typeof(Vector128<Single>), typeof(Single), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Unsafe.Read<Vector128<Single>>(_dataTable.inArrayPtr),
-                                        (float)2,
-                                        (byte)2
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Vector128<Single>)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_Load()
-        {
-            var result = typeof(Sse41).GetMethod(nameof(Sse41.Insert), new Type[] { typeof(Vector128<Single>), typeof(Single), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Sse.LoadVector128((Single*)(_dataTable.inArrayPtr)),
-                                        (float)2,
-                                        (byte)2
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Vector128<Single>)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_LoadAligned()
-        {
-            var result = typeof(Sse41).GetMethod(nameof(Sse41.Insert), new Type[] { typeof(Vector128<Single>), typeof(Single), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Sse.LoadAlignedVector128((Single*)(_dataTable.inArrayPtr)),
-                                        (float)2,
-                                        (byte)2
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Vector128<Single>)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunClsVarScenario()
-        {
-            var result = Sse41.Insert(
-                _clsVar,
-                (float)2,
-                2
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_clsVar, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_UnsafeRead()
-        {
-            var firstOp = Unsafe.Read<Vector128<Single>>(_dataTable.inArrayPtr);
-            var result = Sse41.Insert(firstOp, (float)2, 2);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_Load()
-        {
-            var firstOp = Sse.LoadVector128((Single*)(_dataTable.inArrayPtr));
-            var result = Sse41.Insert(firstOp, (float)2, 2);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_LoadAligned()
-        {
-            var firstOp = Sse.LoadAlignedVector128((Single*)(_dataTable.inArrayPtr));
-            var result = Sse41.Insert(firstOp, (float)2, 2);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclFldScenario()
-        {
-            var test = new SimpleUnaryOpTest__InsertSingle2();
-            var result = Sse41.Insert(test._fld, (float)2, 2);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(test._fld, _dataTable.outArrayPtr);
-        }
-
-        public void RunFldScenario()
-        {
-            var result = Sse41.Insert(_fld, (float)2, 2);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_fld, _dataTable.outArrayPtr);
-        }
-
-        public void RunUnsupportedScenario()
-        {
-            Succeeded = false;
-
-            try
-            {
-                RunBasicScenario_UnsafeRead();
-            }
-            catch (PlatformNotSupportedException)
-            {
-                Succeeded = true;
-            }
-        }
-
-        private void ValidateResult(Vector128<Single> firstOp, void* result, [CallerMemberName] string method = "")
-        {
-            Single[] inArray = new Single[Op1ElementCount];
-            Single[] outArray = new Single[RetElementCount];
-
-            Unsafe.WriteUnaligned(ref Unsafe.As<Single, byte>(ref inArray[0]), firstOp);
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Single, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector128<Single>>());
-
-            ValidateResult(inArray, outArray, method);
-        }
-
-        private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "")
-        {
-            Single[] inArray = new Single[Op1ElementCount];
-            Single[] outArray = new Single[RetElementCount];
-
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Single, byte>(ref inArray[0]), ref Unsafe.AsRef<byte>(firstOp), (uint)Unsafe.SizeOf<Vector128<Single>>());
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Single, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector128<Single>>());
-
-            ValidateResult(inArray, outArray, method);
-        }
-
-        private void ValidateResult(Single[] firstOp, Single[] result, [CallerMemberName] string method = "")
-        {
-
-            for (var i = 0; i < RetElementCount; i++)
-            {
-                if ((i == 0 ? BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(2.0f) : i == 1 ? BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(0.0f) : BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(firstOp[i])))
-                {
-                    Succeeded = false;
-                    break;
-                }
-            }
-
-            if (!Succeeded)
-            {
-                Console.WriteLine($"{nameof(Sse41)}.{nameof(Sse41.Insert)}<Single>(Vector128<Single><9>): {method} failed:");
-                Console.WriteLine($"  firstOp: ({string.Join(", ", firstOp)})");
-                Console.WriteLine($"   result: ({string.Join(", ", result)})");
-                Console.WriteLine();
-            }
-        }
-    }
-}
diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Single.217.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Single.217.cs
deleted file mode 100644 (file)
index 6487217..0000000
+++ /dev/null
@@ -1,321 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-/******************************************************************************
- * This file is auto-generated from a template file by the GenerateTests.csx  *
- * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make    *
- * changes, please update the corresponding template and run according to the *
- * directions listed in the file.                                             *
- ******************************************************************************/
-
-using System;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Runtime.Intrinsics;
-using System.Runtime.Intrinsics.X86;
-
-namespace JIT.HardwareIntrinsics.X86
-{
-    public static partial class Program
-    {
-        private static void InsertSingle217()
-        {
-            var test = new SimpleUnaryOpTest__InsertSingle217();
-            
-            try
-            {
-            if (test.IsSupported)
-            {
-                // Validates basic functionality works, using Unsafe.Read
-                test.RunBasicScenario_UnsafeRead();
-
-                if (Sse.IsSupported)
-                {
-                    // Validates basic functionality works, using Load
-                    test.RunBasicScenario_Load();
-
-                    // Validates basic functionality works, using LoadAligned
-                    test.RunBasicScenario_LoadAligned();
-                }
-
-                // Validates calling via reflection works, using Unsafe.Read
-                test.RunReflectionScenario_UnsafeRead();
-
-                if (Sse.IsSupported)
-                {
-                    // Validates calling via reflection works, using Load
-                    test.RunReflectionScenario_Load();
-
-                    // Validates calling via reflection works, using LoadAligned
-                    test.RunReflectionScenario_LoadAligned();
-                }
-
-                // Validates passing a static member works
-                test.RunClsVarScenario();
-
-                // Validates passing a local works, using Unsafe.Read
-                test.RunLclVarScenario_UnsafeRead();
-
-                if (Sse.IsSupported)
-                {
-                    // Validates passing a local works, using Load
-                    test.RunLclVarScenario_Load();
-
-                    // Validates passing a local works, using LoadAligned
-                    test.RunLclVarScenario_LoadAligned();
-                }
-
-                // Validates passing the field of a local works
-                test.RunLclFldScenario();
-
-                // Validates passing an instance member works
-                test.RunFldScenario();
-            }
-            else
-            {
-                // Validates we throw on unsupported hardware
-                test.RunUnsupportedScenario();
-            }
-            }
-            catch (PlatformNotSupportedException)
-            {
-                test.Succeeded = true;
-            }
-
-            if (!test.Succeeded)
-            {
-                throw new Exception("One or more scenarios did not complete as expected.");
-            }
-        }
-    }
-
-    public sealed unsafe class SimpleUnaryOpTest__InsertSingle217
-    {
-        private static readonly int LargestVectorSize = 16;
-
-        private static readonly int Op1ElementCount = Unsafe.SizeOf<Vector128<Single>>() / sizeof(Single);
-        private static readonly int RetElementCount = Unsafe.SizeOf<Vector128<Single>>() / sizeof(Single);
-
-        private static Single[] _data = new Single[Op1ElementCount];
-
-        private static Vector128<Single> _clsVar;
-
-        private Vector128<Single> _fld;
-
-        private SimpleUnaryOpTest__DataTable<Single, Single> _dataTable;
-
-        static SimpleUnaryOpTest__InsertSingle217()
-        {
-            var random = new Random();
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (float)(random.NextDouble()); }
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Single>, byte>(ref _clsVar), ref Unsafe.As<Single, byte>(ref _data[0]), (uint)Unsafe.SizeOf<Vector128<Single>>());
-        }
-
-        public SimpleUnaryOpTest__InsertSingle217()
-        {
-            Succeeded = true;
-
-            var random = new Random();
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (float)(random.NextDouble()); }
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Single>, byte>(ref _fld), ref Unsafe.As<Single, byte>(ref _data[0]), (uint)Unsafe.SizeOf<Vector128<Single>>());
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (float)(random.NextDouble()); }
-            _dataTable = new SimpleUnaryOpTest__DataTable<Single, Single>(_data, new Single[RetElementCount], LargestVectorSize);
-        }
-
-        public bool IsSupported => Sse41.IsSupported;
-
-        public bool Succeeded { get; set; }
-
-        public void RunBasicScenario_UnsafeRead()
-        {
-            var result = Sse41.Insert(
-                Unsafe.Read<Vector128<Single>>(_dataTable.inArrayPtr),
-                (float)2,
-                217
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunBasicScenario_Load()
-        {
-            var result = Sse41.Insert(
-                Sse.LoadVector128((Single*)(_dataTable.inArrayPtr)),
-                (float)2,
-                217
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunBasicScenario_LoadAligned()
-        {
-            var result = Sse41.Insert(
-                Sse.LoadAlignedVector128((Single*)(_dataTable.inArrayPtr)),
-                (float)2,
-                217
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_UnsafeRead()
-        {
-            var result = typeof(Sse41).GetMethod(nameof(Sse41.Insert), new Type[] { typeof(Vector128<Single>), typeof(Single), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Unsafe.Read<Vector128<Single>>(_dataTable.inArrayPtr),
-                                        (float)2,
-                                        (byte)217
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Vector128<Single>)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_Load()
-        {
-            var result = typeof(Sse41).GetMethod(nameof(Sse41.Insert), new Type[] { typeof(Vector128<Single>), typeof(Single), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Sse.LoadVector128((Single*)(_dataTable.inArrayPtr)),
-                                        (float)2,
-                                        (byte)217
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Vector128<Single>)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_LoadAligned()
-        {
-            var result = typeof(Sse41).GetMethod(nameof(Sse41.Insert), new Type[] { typeof(Vector128<Single>), typeof(Single), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Sse.LoadAlignedVector128((Single*)(_dataTable.inArrayPtr)),
-                                        (float)2,
-                                        (byte)217
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Vector128<Single>)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunClsVarScenario()
-        {
-            var result = Sse41.Insert(
-                _clsVar,
-                (float)2,
-                217
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_clsVar, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_UnsafeRead()
-        {
-            var firstOp = Unsafe.Read<Vector128<Single>>(_dataTable.inArrayPtr);
-            var result = Sse41.Insert(firstOp, (float)2, 217);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_Load()
-        {
-            var firstOp = Sse.LoadVector128((Single*)(_dataTable.inArrayPtr));
-            var result = Sse41.Insert(firstOp, (float)2, 217);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_LoadAligned()
-        {
-            var firstOp = Sse.LoadAlignedVector128((Single*)(_dataTable.inArrayPtr));
-            var result = Sse41.Insert(firstOp, (float)2, 217);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclFldScenario()
-        {
-            var test = new SimpleUnaryOpTest__InsertSingle217();
-            var result = Sse41.Insert(test._fld, (float)2, 217);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(test._fld, _dataTable.outArrayPtr);
-        }
-
-        public void RunFldScenario()
-        {
-            var result = Sse41.Insert(_fld, (float)2, 217);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_fld, _dataTable.outArrayPtr);
-        }
-
-        public void RunUnsupportedScenario()
-        {
-            Succeeded = false;
-
-            try
-            {
-                RunBasicScenario_UnsafeRead();
-            }
-            catch (PlatformNotSupportedException)
-            {
-                Succeeded = true;
-            }
-        }
-
-        private void ValidateResult(Vector128<Single> firstOp, void* result, [CallerMemberName] string method = "")
-        {
-            Single[] inArray = new Single[Op1ElementCount];
-            Single[] outArray = new Single[RetElementCount];
-
-            Unsafe.WriteUnaligned(ref Unsafe.As<Single, byte>(ref inArray[0]), firstOp);
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Single, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector128<Single>>());
-
-            ValidateResult(inArray, outArray, method);
-        }
-
-        private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "")
-        {
-            Single[] inArray = new Single[Op1ElementCount];
-            Single[] outArray = new Single[RetElementCount];
-
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Single, byte>(ref inArray[0]), ref Unsafe.AsRef<byte>(firstOp), (uint)Unsafe.SizeOf<Vector128<Single>>());
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Single, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector128<Single>>());
-
-            ValidateResult(inArray, outArray, method);
-        }
-
-        private void ValidateResult(Single[] firstOp, Single[] result, [CallerMemberName] string method = "")
-        {
-
-            for (var i = 0; i < RetElementCount; i++)
-            {
-                if ((i == 2 ? BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(firstOp[i]) : BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits((float)0)))
-                {
-                    Succeeded = false;
-                    break;
-                }
-            }
-
-            if (!Succeeded)
-            {
-                Console.WriteLine($"{nameof(Sse41)}.{nameof(Sse41.Insert)}<Single>(Vector128<Single><9>): {method} failed:");
-                Console.WriteLine($"  firstOp: ({string.Join(", ", firstOp)})");
-                Console.WriteLine($"   result: ({string.Join(", ", result)})");
-                Console.WriteLine();
-            }
-        }
-    }
-}
diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Single.32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Single.32.cs
deleted file mode 100644 (file)
index 6d647af..0000000
+++ /dev/null
@@ -1,321 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-/******************************************************************************
- * This file is auto-generated from a template file by the GenerateTests.csx  *
- * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make    *
- * changes, please update the corresponding template and run according to the *
- * directions listed in the file.                                             *
- ******************************************************************************/
-
-using System;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Runtime.Intrinsics;
-using System.Runtime.Intrinsics.X86;
-
-namespace JIT.HardwareIntrinsics.X86
-{
-    public static partial class Program
-    {
-        private static void InsertSingle32()
-        {
-            var test = new SimpleUnaryOpTest__InsertSingle32();
-            
-            try
-            {
-            if (test.IsSupported)
-            {
-                // Validates basic functionality works, using Unsafe.Read
-                test.RunBasicScenario_UnsafeRead();
-
-                if (Sse.IsSupported)
-                {
-                    // Validates basic functionality works, using Load
-                    test.RunBasicScenario_Load();
-
-                    // Validates basic functionality works, using LoadAligned
-                    test.RunBasicScenario_LoadAligned();
-                }
-
-                // Validates calling via reflection works, using Unsafe.Read
-                test.RunReflectionScenario_UnsafeRead();
-
-                if (Sse.IsSupported)
-                {
-                    // Validates calling via reflection works, using Load
-                    test.RunReflectionScenario_Load();
-
-                    // Validates calling via reflection works, using LoadAligned
-                    test.RunReflectionScenario_LoadAligned();
-                }
-
-                // Validates passing a static member works
-                test.RunClsVarScenario();
-
-                // Validates passing a local works, using Unsafe.Read
-                test.RunLclVarScenario_UnsafeRead();
-
-                if (Sse.IsSupported)
-                {
-                    // Validates passing a local works, using Load
-                    test.RunLclVarScenario_Load();
-
-                    // Validates passing a local works, using LoadAligned
-                    test.RunLclVarScenario_LoadAligned();
-                }
-
-                // Validates passing the field of a local works
-                test.RunLclFldScenario();
-
-                // Validates passing an instance member works
-                test.RunFldScenario();
-            }
-            else
-            {
-                // Validates we throw on unsupported hardware
-                test.RunUnsupportedScenario();
-            }
-            }
-            catch (PlatformNotSupportedException)
-            {
-                test.Succeeded = true;
-            }
-
-            if (!test.Succeeded)
-            {
-                throw new Exception("One or more scenarios did not complete as expected.");
-            }
-        }
-    }
-
-    public sealed unsafe class SimpleUnaryOpTest__InsertSingle32
-    {
-        private static readonly int LargestVectorSize = 16;
-
-        private static readonly int Op1ElementCount = Unsafe.SizeOf<Vector128<Single>>() / sizeof(Single);
-        private static readonly int RetElementCount = Unsafe.SizeOf<Vector128<Single>>() / sizeof(Single);
-
-        private static Single[] _data = new Single[Op1ElementCount];
-
-        private static Vector128<Single> _clsVar;
-
-        private Vector128<Single> _fld;
-
-        private SimpleUnaryOpTest__DataTable<Single, Single> _dataTable;
-
-        static SimpleUnaryOpTest__InsertSingle32()
-        {
-            var random = new Random();
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (float)(random.NextDouble()); }
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Single>, byte>(ref _clsVar), ref Unsafe.As<Single, byte>(ref _data[0]), (uint)Unsafe.SizeOf<Vector128<Single>>());
-        }
-
-        public SimpleUnaryOpTest__InsertSingle32()
-        {
-            Succeeded = true;
-
-            var random = new Random();
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (float)(random.NextDouble()); }
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Single>, byte>(ref _fld), ref Unsafe.As<Single, byte>(ref _data[0]), (uint)Unsafe.SizeOf<Vector128<Single>>());
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (float)(random.NextDouble()); }
-            _dataTable = new SimpleUnaryOpTest__DataTable<Single, Single>(_data, new Single[RetElementCount], LargestVectorSize);
-        }
-
-        public bool IsSupported => Sse41.IsSupported;
-
-        public bool Succeeded { get; set; }
-
-        public void RunBasicScenario_UnsafeRead()
-        {
-            var result = Sse41.Insert(
-                Unsafe.Read<Vector128<Single>>(_dataTable.inArrayPtr),
-                (float)2,
-                32
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunBasicScenario_Load()
-        {
-            var result = Sse41.Insert(
-                Sse.LoadVector128((Single*)(_dataTable.inArrayPtr)),
-                (float)2,
-                32
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunBasicScenario_LoadAligned()
-        {
-            var result = Sse41.Insert(
-                Sse.LoadAlignedVector128((Single*)(_dataTable.inArrayPtr)),
-                (float)2,
-                32
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_UnsafeRead()
-        {
-            var result = typeof(Sse41).GetMethod(nameof(Sse41.Insert), new Type[] { typeof(Vector128<Single>), typeof(Single), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Unsafe.Read<Vector128<Single>>(_dataTable.inArrayPtr),
-                                        (float)2,
-                                        (byte)32
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Vector128<Single>)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_Load()
-        {
-            var result = typeof(Sse41).GetMethod(nameof(Sse41.Insert), new Type[] { typeof(Vector128<Single>), typeof(Single), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Sse.LoadVector128((Single*)(_dataTable.inArrayPtr)),
-                                        (float)2,
-                                        (byte)32
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Vector128<Single>)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_LoadAligned()
-        {
-            var result = typeof(Sse41).GetMethod(nameof(Sse41.Insert), new Type[] { typeof(Vector128<Single>), typeof(Single), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Sse.LoadAlignedVector128((Single*)(_dataTable.inArrayPtr)),
-                                        (float)2,
-                                        (byte)32
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Vector128<Single>)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunClsVarScenario()
-        {
-            var result = Sse41.Insert(
-                _clsVar,
-                (float)2,
-                32
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_clsVar, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_UnsafeRead()
-        {
-            var firstOp = Unsafe.Read<Vector128<Single>>(_dataTable.inArrayPtr);
-            var result = Sse41.Insert(firstOp, (float)2, 32);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_Load()
-        {
-            var firstOp = Sse.LoadVector128((Single*)(_dataTable.inArrayPtr));
-            var result = Sse41.Insert(firstOp, (float)2, 32);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_LoadAligned()
-        {
-            var firstOp = Sse.LoadAlignedVector128((Single*)(_dataTable.inArrayPtr));
-            var result = Sse41.Insert(firstOp, (float)2, 32);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclFldScenario()
-        {
-            var test = new SimpleUnaryOpTest__InsertSingle32();
-            var result = Sse41.Insert(test._fld, (float)2, 32);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(test._fld, _dataTable.outArrayPtr);
-        }
-
-        public void RunFldScenario()
-        {
-            var result = Sse41.Insert(_fld, (float)2, 32);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_fld, _dataTable.outArrayPtr);
-        }
-
-        public void RunUnsupportedScenario()
-        {
-            Succeeded = false;
-
-            try
-            {
-                RunBasicScenario_UnsafeRead();
-            }
-            catch (PlatformNotSupportedException)
-            {
-                Succeeded = true;
-            }
-        }
-
-        private void ValidateResult(Vector128<Single> firstOp, void* result, [CallerMemberName] string method = "")
-        {
-            Single[] inArray = new Single[Op1ElementCount];
-            Single[] outArray = new Single[RetElementCount];
-
-            Unsafe.WriteUnaligned(ref Unsafe.As<Single, byte>(ref inArray[0]), firstOp);
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Single, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector128<Single>>());
-
-            ValidateResult(inArray, outArray, method);
-        }
-
-        private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "")
-        {
-            Single[] inArray = new Single[Op1ElementCount];
-            Single[] outArray = new Single[RetElementCount];
-
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Single, byte>(ref inArray[0]), ref Unsafe.AsRef<byte>(firstOp), (uint)Unsafe.SizeOf<Vector128<Single>>());
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Single, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector128<Single>>());
-
-            ValidateResult(inArray, outArray, method);
-        }
-
-        private void ValidateResult(Single[] firstOp, Single[] result, [CallerMemberName] string method = "")
-        {
-
-            for (var i = 0; i < RetElementCount; i++)
-            {
-                if ((i == 2 ? BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(2.0f) : BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(firstOp[i])))
-                {
-                    Succeeded = false;
-                    break;
-                }
-            }
-
-            if (!Succeeded)
-            {
-                Console.WriteLine($"{nameof(Sse41)}.{nameof(Sse41.Insert)}<Single>(Vector128<Single><9>): {method} failed:");
-                Console.WriteLine($"  firstOp: ({string.Join(", ", firstOp)})");
-                Console.WriteLine($"   result: ({string.Join(", ", result)})");
-                Console.WriteLine();
-            }
-        }
-    }
-}
diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Single.4.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Single.4.cs
deleted file mode 100644 (file)
index c47c9d2..0000000
+++ /dev/null
@@ -1,321 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-/******************************************************************************
- * This file is auto-generated from a template file by the GenerateTests.csx  *
- * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make    *
- * changes, please update the corresponding template and run according to the *
- * directions listed in the file.                                             *
- ******************************************************************************/
-
-using System;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Runtime.Intrinsics;
-using System.Runtime.Intrinsics.X86;
-
-namespace JIT.HardwareIntrinsics.X86
-{
-    public static partial class Program
-    {
-        private static void InsertSingle4()
-        {
-            var test = new SimpleUnaryOpTest__InsertSingle4();
-            
-            try
-            {
-            if (test.IsSupported)
-            {
-                // Validates basic functionality works, using Unsafe.Read
-                test.RunBasicScenario_UnsafeRead();
-
-                if (Sse.IsSupported)
-                {
-                    // Validates basic functionality works, using Load
-                    test.RunBasicScenario_Load();
-
-                    // Validates basic functionality works, using LoadAligned
-                    test.RunBasicScenario_LoadAligned();
-                }
-
-                // Validates calling via reflection works, using Unsafe.Read
-                test.RunReflectionScenario_UnsafeRead();
-
-                if (Sse.IsSupported)
-                {
-                    // Validates calling via reflection works, using Load
-                    test.RunReflectionScenario_Load();
-
-                    // Validates calling via reflection works, using LoadAligned
-                    test.RunReflectionScenario_LoadAligned();
-                }
-
-                // Validates passing a static member works
-                test.RunClsVarScenario();
-
-                // Validates passing a local works, using Unsafe.Read
-                test.RunLclVarScenario_UnsafeRead();
-
-                if (Sse.IsSupported)
-                {
-                    // Validates passing a local works, using Load
-                    test.RunLclVarScenario_Load();
-
-                    // Validates passing a local works, using LoadAligned
-                    test.RunLclVarScenario_LoadAligned();
-                }
-
-                // Validates passing the field of a local works
-                test.RunLclFldScenario();
-
-                // Validates passing an instance member works
-                test.RunFldScenario();
-            }
-            else
-            {
-                // Validates we throw on unsupported hardware
-                test.RunUnsupportedScenario();
-            }
-            }
-            catch (PlatformNotSupportedException)
-            {
-                test.Succeeded = true;
-            }
-
-            if (!test.Succeeded)
-            {
-                throw new Exception("One or more scenarios did not complete as expected.");
-            }
-        }
-    }
-
-    public sealed unsafe class SimpleUnaryOpTest__InsertSingle4
-    {
-        private static readonly int LargestVectorSize = 16;
-
-        private static readonly int Op1ElementCount = Unsafe.SizeOf<Vector128<Single>>() / sizeof(Single);
-        private static readonly int RetElementCount = Unsafe.SizeOf<Vector128<Single>>() / sizeof(Single);
-
-        private static Single[] _data = new Single[Op1ElementCount];
-
-        private static Vector128<Single> _clsVar;
-
-        private Vector128<Single> _fld;
-
-        private SimpleUnaryOpTest__DataTable<Single, Single> _dataTable;
-
-        static SimpleUnaryOpTest__InsertSingle4()
-        {
-            var random = new Random();
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (float)(random.NextDouble()); }
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Single>, byte>(ref _clsVar), ref Unsafe.As<Single, byte>(ref _data[0]), (uint)Unsafe.SizeOf<Vector128<Single>>());
-        }
-
-        public SimpleUnaryOpTest__InsertSingle4()
-        {
-            Succeeded = true;
-
-            var random = new Random();
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (float)(random.NextDouble()); }
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Single>, byte>(ref _fld), ref Unsafe.As<Single, byte>(ref _data[0]), (uint)Unsafe.SizeOf<Vector128<Single>>());
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (float)(random.NextDouble()); }
-            _dataTable = new SimpleUnaryOpTest__DataTable<Single, Single>(_data, new Single[RetElementCount], LargestVectorSize);
-        }
-
-        public bool IsSupported => Sse41.IsSupported;
-
-        public bool Succeeded { get; set; }
-
-        public void RunBasicScenario_UnsafeRead()
-        {
-            var result = Sse41.Insert(
-                Unsafe.Read<Vector128<Single>>(_dataTable.inArrayPtr),
-                (float)2,
-                4
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunBasicScenario_Load()
-        {
-            var result = Sse41.Insert(
-                Sse.LoadVector128((Single*)(_dataTable.inArrayPtr)),
-                (float)2,
-                4
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunBasicScenario_LoadAligned()
-        {
-            var result = Sse41.Insert(
-                Sse.LoadAlignedVector128((Single*)(_dataTable.inArrayPtr)),
-                (float)2,
-                4
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_UnsafeRead()
-        {
-            var result = typeof(Sse41).GetMethod(nameof(Sse41.Insert), new Type[] { typeof(Vector128<Single>), typeof(Single), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Unsafe.Read<Vector128<Single>>(_dataTable.inArrayPtr),
-                                        (float)2,
-                                        (byte)4
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Vector128<Single>)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_Load()
-        {
-            var result = typeof(Sse41).GetMethod(nameof(Sse41.Insert), new Type[] { typeof(Vector128<Single>), typeof(Single), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Sse.LoadVector128((Single*)(_dataTable.inArrayPtr)),
-                                        (float)2,
-                                        (byte)4
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Vector128<Single>)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_LoadAligned()
-        {
-            var result = typeof(Sse41).GetMethod(nameof(Sse41.Insert), new Type[] { typeof(Vector128<Single>), typeof(Single), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Sse.LoadAlignedVector128((Single*)(_dataTable.inArrayPtr)),
-                                        (float)2,
-                                        (byte)4
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Vector128<Single>)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunClsVarScenario()
-        {
-            var result = Sse41.Insert(
-                _clsVar,
-                (float)2,
-                4
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_clsVar, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_UnsafeRead()
-        {
-            var firstOp = Unsafe.Read<Vector128<Single>>(_dataTable.inArrayPtr);
-            var result = Sse41.Insert(firstOp, (float)2, 4);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_Load()
-        {
-            var firstOp = Sse.LoadVector128((Single*)(_dataTable.inArrayPtr));
-            var result = Sse41.Insert(firstOp, (float)2, 4);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_LoadAligned()
-        {
-            var firstOp = Sse.LoadAlignedVector128((Single*)(_dataTable.inArrayPtr));
-            var result = Sse41.Insert(firstOp, (float)2, 4);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclFldScenario()
-        {
-            var test = new SimpleUnaryOpTest__InsertSingle4();
-            var result = Sse41.Insert(test._fld, (float)2, 4);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(test._fld, _dataTable.outArrayPtr);
-        }
-
-        public void RunFldScenario()
-        {
-            var result = Sse41.Insert(_fld, (float)2, 4);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_fld, _dataTable.outArrayPtr);
-        }
-
-        public void RunUnsupportedScenario()
-        {
-            Succeeded = false;
-
-            try
-            {
-                RunBasicScenario_UnsafeRead();
-            }
-            catch (PlatformNotSupportedException)
-            {
-                Succeeded = true;
-            }
-        }
-
-        private void ValidateResult(Vector128<Single> firstOp, void* result, [CallerMemberName] string method = "")
-        {
-            Single[] inArray = new Single[Op1ElementCount];
-            Single[] outArray = new Single[RetElementCount];
-
-            Unsafe.WriteUnaligned(ref Unsafe.As<Single, byte>(ref inArray[0]), firstOp);
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Single, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector128<Single>>());
-
-            ValidateResult(inArray, outArray, method);
-        }
-
-        private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "")
-        {
-            Single[] inArray = new Single[Op1ElementCount];
-            Single[] outArray = new Single[RetElementCount];
-
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Single, byte>(ref inArray[0]), ref Unsafe.AsRef<byte>(firstOp), (uint)Unsafe.SizeOf<Vector128<Single>>());
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Single, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector128<Single>>());
-
-            ValidateResult(inArray, outArray, method);
-        }
-
-        private void ValidateResult(Single[] firstOp, Single[] result, [CallerMemberName] string method = "")
-        {
-
-            for (var i = 0; i < RetElementCount; i++)
-            {
-                if ((i == 0 ? BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(2.0f) : i == 2 ? BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(0.0f) : BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(firstOp[i])))
-                {
-                    Succeeded = false;
-                    break;
-                }
-            }
-
-            if (!Succeeded)
-            {
-                Console.WriteLine($"{nameof(Sse41)}.{nameof(Sse41.Insert)}<Single>(Vector128<Single><9>): {method} failed:");
-                Console.WriteLine($"  firstOp: ({string.Join(", ", firstOp)})");
-                Console.WriteLine($"   result: ({string.Join(", ", result)})");
-                Console.WriteLine();
-            }
-        }
-    }
-}
diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Single.48.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Single.48.cs
deleted file mode 100644 (file)
index 4a8eef9..0000000
+++ /dev/null
@@ -1,321 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-/******************************************************************************
- * This file is auto-generated from a template file by the GenerateTests.csx  *
- * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make    *
- * changes, please update the corresponding template and run according to the *
- * directions listed in the file.                                             *
- ******************************************************************************/
-
-using System;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Runtime.Intrinsics;
-using System.Runtime.Intrinsics.X86;
-
-namespace JIT.HardwareIntrinsics.X86
-{
-    public static partial class Program
-    {
-        private static void InsertSingle48()
-        {
-            var test = new SimpleUnaryOpTest__InsertSingle48();
-            
-            try
-            {
-            if (test.IsSupported)
-            {
-                // Validates basic functionality works, using Unsafe.Read
-                test.RunBasicScenario_UnsafeRead();
-
-                if (Sse.IsSupported)
-                {
-                    // Validates basic functionality works, using Load
-                    test.RunBasicScenario_Load();
-
-                    // Validates basic functionality works, using LoadAligned
-                    test.RunBasicScenario_LoadAligned();
-                }
-
-                // Validates calling via reflection works, using Unsafe.Read
-                test.RunReflectionScenario_UnsafeRead();
-
-                if (Sse.IsSupported)
-                {
-                    // Validates calling via reflection works, using Load
-                    test.RunReflectionScenario_Load();
-
-                    // Validates calling via reflection works, using LoadAligned
-                    test.RunReflectionScenario_LoadAligned();
-                }
-
-                // Validates passing a static member works
-                test.RunClsVarScenario();
-
-                // Validates passing a local works, using Unsafe.Read
-                test.RunLclVarScenario_UnsafeRead();
-
-                if (Sse.IsSupported)
-                {
-                    // Validates passing a local works, using Load
-                    test.RunLclVarScenario_Load();
-
-                    // Validates passing a local works, using LoadAligned
-                    test.RunLclVarScenario_LoadAligned();
-                }
-
-                // Validates passing the field of a local works
-                test.RunLclFldScenario();
-
-                // Validates passing an instance member works
-                test.RunFldScenario();
-            }
-            else
-            {
-                // Validates we throw on unsupported hardware
-                test.RunUnsupportedScenario();
-            }
-            }
-            catch (PlatformNotSupportedException)
-            {
-                test.Succeeded = true;
-            }
-
-            if (!test.Succeeded)
-            {
-                throw new Exception("One or more scenarios did not complete as expected.");
-            }
-        }
-    }
-
-    public sealed unsafe class SimpleUnaryOpTest__InsertSingle48
-    {
-        private static readonly int LargestVectorSize = 16;
-
-        private static readonly int Op1ElementCount = Unsafe.SizeOf<Vector128<Single>>() / sizeof(Single);
-        private static readonly int RetElementCount = Unsafe.SizeOf<Vector128<Single>>() / sizeof(Single);
-
-        private static Single[] _data = new Single[Op1ElementCount];
-
-        private static Vector128<Single> _clsVar;
-
-        private Vector128<Single> _fld;
-
-        private SimpleUnaryOpTest__DataTable<Single, Single> _dataTable;
-
-        static SimpleUnaryOpTest__InsertSingle48()
-        {
-            var random = new Random();
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (float)(random.NextDouble()); }
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Single>, byte>(ref _clsVar), ref Unsafe.As<Single, byte>(ref _data[0]), (uint)Unsafe.SizeOf<Vector128<Single>>());
-        }
-
-        public SimpleUnaryOpTest__InsertSingle48()
-        {
-            Succeeded = true;
-
-            var random = new Random();
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (float)(random.NextDouble()); }
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Single>, byte>(ref _fld), ref Unsafe.As<Single, byte>(ref _data[0]), (uint)Unsafe.SizeOf<Vector128<Single>>());
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (float)(random.NextDouble()); }
-            _dataTable = new SimpleUnaryOpTest__DataTable<Single, Single>(_data, new Single[RetElementCount], LargestVectorSize);
-        }
-
-        public bool IsSupported => Sse41.IsSupported;
-
-        public bool Succeeded { get; set; }
-
-        public void RunBasicScenario_UnsafeRead()
-        {
-            var result = Sse41.Insert(
-                Unsafe.Read<Vector128<Single>>(_dataTable.inArrayPtr),
-                (float)2,
-                48
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunBasicScenario_Load()
-        {
-            var result = Sse41.Insert(
-                Sse.LoadVector128((Single*)(_dataTable.inArrayPtr)),
-                (float)2,
-                48
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunBasicScenario_LoadAligned()
-        {
-            var result = Sse41.Insert(
-                Sse.LoadAlignedVector128((Single*)(_dataTable.inArrayPtr)),
-                (float)2,
-                48
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_UnsafeRead()
-        {
-            var result = typeof(Sse41).GetMethod(nameof(Sse41.Insert), new Type[] { typeof(Vector128<Single>), typeof(Single), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Unsafe.Read<Vector128<Single>>(_dataTable.inArrayPtr),
-                                        (float)2,
-                                        (byte)48
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Vector128<Single>)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_Load()
-        {
-            var result = typeof(Sse41).GetMethod(nameof(Sse41.Insert), new Type[] { typeof(Vector128<Single>), typeof(Single), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Sse.LoadVector128((Single*)(_dataTable.inArrayPtr)),
-                                        (float)2,
-                                        (byte)48
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Vector128<Single>)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_LoadAligned()
-        {
-            var result = typeof(Sse41).GetMethod(nameof(Sse41.Insert), new Type[] { typeof(Vector128<Single>), typeof(Single), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Sse.LoadAlignedVector128((Single*)(_dataTable.inArrayPtr)),
-                                        (float)2,
-                                        (byte)48
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Vector128<Single>)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunClsVarScenario()
-        {
-            var result = Sse41.Insert(
-                _clsVar,
-                (float)2,
-                48
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_clsVar, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_UnsafeRead()
-        {
-            var firstOp = Unsafe.Read<Vector128<Single>>(_dataTable.inArrayPtr);
-            var result = Sse41.Insert(firstOp, (float)2, 48);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_Load()
-        {
-            var firstOp = Sse.LoadVector128((Single*)(_dataTable.inArrayPtr));
-            var result = Sse41.Insert(firstOp, (float)2, 48);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_LoadAligned()
-        {
-            var firstOp = Sse.LoadAlignedVector128((Single*)(_dataTable.inArrayPtr));
-            var result = Sse41.Insert(firstOp, (float)2, 48);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclFldScenario()
-        {
-            var test = new SimpleUnaryOpTest__InsertSingle48();
-            var result = Sse41.Insert(test._fld, (float)2, 48);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(test._fld, _dataTable.outArrayPtr);
-        }
-
-        public void RunFldScenario()
-        {
-            var result = Sse41.Insert(_fld, (float)2, 48);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_fld, _dataTable.outArrayPtr);
-        }
-
-        public void RunUnsupportedScenario()
-        {
-            Succeeded = false;
-
-            try
-            {
-                RunBasicScenario_UnsafeRead();
-            }
-            catch (PlatformNotSupportedException)
-            {
-                Succeeded = true;
-            }
-        }
-
-        private void ValidateResult(Vector128<Single> firstOp, void* result, [CallerMemberName] string method = "")
-        {
-            Single[] inArray = new Single[Op1ElementCount];
-            Single[] outArray = new Single[RetElementCount];
-
-            Unsafe.WriteUnaligned(ref Unsafe.As<Single, byte>(ref inArray[0]), firstOp);
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Single, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector128<Single>>());
-
-            ValidateResult(inArray, outArray, method);
-        }
-
-        private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "")
-        {
-            Single[] inArray = new Single[Op1ElementCount];
-            Single[] outArray = new Single[RetElementCount];
-
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Single, byte>(ref inArray[0]), ref Unsafe.AsRef<byte>(firstOp), (uint)Unsafe.SizeOf<Vector128<Single>>());
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Single, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector128<Single>>());
-
-            ValidateResult(inArray, outArray, method);
-        }
-
-        private void ValidateResult(Single[] firstOp, Single[] result, [CallerMemberName] string method = "")
-        {
-
-            for (var i = 0; i < RetElementCount; i++)
-            {
-                if ((i == 3 ? BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(2.0f) : BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(firstOp[i])))
-                {
-                    Succeeded = false;
-                    break;
-                }
-            }
-
-            if (!Succeeded)
-            {
-                Console.WriteLine($"{nameof(Sse41)}.{nameof(Sse41.Insert)}<Single>(Vector128<Single><9>): {method} failed:");
-                Console.WriteLine($"  firstOp: ({string.Join(", ", firstOp)})");
-                Console.WriteLine($"   result: ({string.Join(", ", result)})");
-                Console.WriteLine();
-            }
-        }
-    }
-}
diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Single.64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Single.64.cs
deleted file mode 100644 (file)
index feddaad..0000000
+++ /dev/null
@@ -1,321 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-/******************************************************************************
- * This file is auto-generated from a template file by the GenerateTests.csx  *
- * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make    *
- * changes, please update the corresponding template and run according to the *
- * directions listed in the file.                                             *
- ******************************************************************************/
-
-using System;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Runtime.Intrinsics;
-using System.Runtime.Intrinsics.X86;
-
-namespace JIT.HardwareIntrinsics.X86
-{
-    public static partial class Program
-    {
-        private static void InsertSingle64()
-        {
-            var test = new SimpleUnaryOpTest__InsertSingle64();
-            
-            try
-            {
-            if (test.IsSupported)
-            {
-                // Validates basic functionality works, using Unsafe.Read
-                test.RunBasicScenario_UnsafeRead();
-
-                if (Sse.IsSupported)
-                {
-                    // Validates basic functionality works, using Load
-                    test.RunBasicScenario_Load();
-
-                    // Validates basic functionality works, using LoadAligned
-                    test.RunBasicScenario_LoadAligned();
-                }
-
-                // Validates calling via reflection works, using Unsafe.Read
-                test.RunReflectionScenario_UnsafeRead();
-
-                if (Sse.IsSupported)
-                {
-                    // Validates calling via reflection works, using Load
-                    test.RunReflectionScenario_Load();
-
-                    // Validates calling via reflection works, using LoadAligned
-                    test.RunReflectionScenario_LoadAligned();
-                }
-
-                // Validates passing a static member works
-                test.RunClsVarScenario();
-
-                // Validates passing a local works, using Unsafe.Read
-                test.RunLclVarScenario_UnsafeRead();
-
-                if (Sse.IsSupported)
-                {
-                    // Validates passing a local works, using Load
-                    test.RunLclVarScenario_Load();
-
-                    // Validates passing a local works, using LoadAligned
-                    test.RunLclVarScenario_LoadAligned();
-                }
-
-                // Validates passing the field of a local works
-                test.RunLclFldScenario();
-
-                // Validates passing an instance member works
-                test.RunFldScenario();
-            }
-            else
-            {
-                // Validates we throw on unsupported hardware
-                test.RunUnsupportedScenario();
-            }
-            }
-            catch (PlatformNotSupportedException)
-            {
-                test.Succeeded = true;
-            }
-
-            if (!test.Succeeded)
-            {
-                throw new Exception("One or more scenarios did not complete as expected.");
-            }
-        }
-    }
-
-    public sealed unsafe class SimpleUnaryOpTest__InsertSingle64
-    {
-        private static readonly int LargestVectorSize = 16;
-
-        private static readonly int Op1ElementCount = Unsafe.SizeOf<Vector128<Single>>() / sizeof(Single);
-        private static readonly int RetElementCount = Unsafe.SizeOf<Vector128<Single>>() / sizeof(Single);
-
-        private static Single[] _data = new Single[Op1ElementCount];
-
-        private static Vector128<Single> _clsVar;
-
-        private Vector128<Single> _fld;
-
-        private SimpleUnaryOpTest__DataTable<Single, Single> _dataTable;
-
-        static SimpleUnaryOpTest__InsertSingle64()
-        {
-            var random = new Random();
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (float)(random.NextDouble()); }
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Single>, byte>(ref _clsVar), ref Unsafe.As<Single, byte>(ref _data[0]), (uint)Unsafe.SizeOf<Vector128<Single>>());
-        }
-
-        public SimpleUnaryOpTest__InsertSingle64()
-        {
-            Succeeded = true;
-
-            var random = new Random();
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (float)(random.NextDouble()); }
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Single>, byte>(ref _fld), ref Unsafe.As<Single, byte>(ref _data[0]), (uint)Unsafe.SizeOf<Vector128<Single>>());
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (float)(random.NextDouble()); }
-            _dataTable = new SimpleUnaryOpTest__DataTable<Single, Single>(_data, new Single[RetElementCount], LargestVectorSize);
-        }
-
-        public bool IsSupported => Sse41.IsSupported;
-
-        public bool Succeeded { get; set; }
-
-        public void RunBasicScenario_UnsafeRead()
-        {
-            var result = Sse41.Insert(
-                Unsafe.Read<Vector128<Single>>(_dataTable.inArrayPtr),
-                (float)2,
-                64
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunBasicScenario_Load()
-        {
-            var result = Sse41.Insert(
-                Sse.LoadVector128((Single*)(_dataTable.inArrayPtr)),
-                (float)2,
-                64
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunBasicScenario_LoadAligned()
-        {
-            var result = Sse41.Insert(
-                Sse.LoadAlignedVector128((Single*)(_dataTable.inArrayPtr)),
-                (float)2,
-                64
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_UnsafeRead()
-        {
-            var result = typeof(Sse41).GetMethod(nameof(Sse41.Insert), new Type[] { typeof(Vector128<Single>), typeof(Single), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Unsafe.Read<Vector128<Single>>(_dataTable.inArrayPtr),
-                                        (float)2,
-                                        (byte)64
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Vector128<Single>)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_Load()
-        {
-            var result = typeof(Sse41).GetMethod(nameof(Sse41.Insert), new Type[] { typeof(Vector128<Single>), typeof(Single), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Sse.LoadVector128((Single*)(_dataTable.inArrayPtr)),
-                                        (float)2,
-                                        (byte)64
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Vector128<Single>)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_LoadAligned()
-        {
-            var result = typeof(Sse41).GetMethod(nameof(Sse41.Insert), new Type[] { typeof(Vector128<Single>), typeof(Single), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Sse.LoadAlignedVector128((Single*)(_dataTable.inArrayPtr)),
-                                        (float)2,
-                                        (byte)64
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Vector128<Single>)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunClsVarScenario()
-        {
-            var result = Sse41.Insert(
-                _clsVar,
-                (float)2,
-                64
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_clsVar, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_UnsafeRead()
-        {
-            var firstOp = Unsafe.Read<Vector128<Single>>(_dataTable.inArrayPtr);
-            var result = Sse41.Insert(firstOp, (float)2, 64);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_Load()
-        {
-            var firstOp = Sse.LoadVector128((Single*)(_dataTable.inArrayPtr));
-            var result = Sse41.Insert(firstOp, (float)2, 64);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_LoadAligned()
-        {
-            var firstOp = Sse.LoadAlignedVector128((Single*)(_dataTable.inArrayPtr));
-            var result = Sse41.Insert(firstOp, (float)2, 64);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclFldScenario()
-        {
-            var test = new SimpleUnaryOpTest__InsertSingle64();
-            var result = Sse41.Insert(test._fld, (float)2, 64);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(test._fld, _dataTable.outArrayPtr);
-        }
-
-        public void RunFldScenario()
-        {
-            var result = Sse41.Insert(_fld, (float)2, 64);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_fld, _dataTable.outArrayPtr);
-        }
-
-        public void RunUnsupportedScenario()
-        {
-            Succeeded = false;
-
-            try
-            {
-                RunBasicScenario_UnsafeRead();
-            }
-            catch (PlatformNotSupportedException)
-            {
-                Succeeded = true;
-            }
-        }
-
-        private void ValidateResult(Vector128<Single> firstOp, void* result, [CallerMemberName] string method = "")
-        {
-            Single[] inArray = new Single[Op1ElementCount];
-            Single[] outArray = new Single[RetElementCount];
-
-            Unsafe.WriteUnaligned(ref Unsafe.As<Single, byte>(ref inArray[0]), firstOp);
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Single, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector128<Single>>());
-
-            ValidateResult(inArray, outArray, method);
-        }
-
-        private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "")
-        {
-            Single[] inArray = new Single[Op1ElementCount];
-            Single[] outArray = new Single[RetElementCount];
-
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Single, byte>(ref inArray[0]), ref Unsafe.AsRef<byte>(firstOp), (uint)Unsafe.SizeOf<Vector128<Single>>());
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Single, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector128<Single>>());
-
-            ValidateResult(inArray, outArray, method);
-        }
-
-        private void ValidateResult(Single[] firstOp, Single[] result, [CallerMemberName] string method = "")
-        {
-
-            for (var i = 0; i < RetElementCount; i++)
-            {
-                if ((i == 0 ? BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(2.0f) : BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(firstOp[i])))
-                {
-                    Succeeded = false;
-                    break;
-                }
-            }
-
-            if (!Succeeded)
-            {
-                Console.WriteLine($"{nameof(Sse41)}.{nameof(Sse41.Insert)}<Single>(Vector128<Single><9>): {method} failed:");
-                Console.WriteLine($"  firstOp: ({string.Join(", ", firstOp)})");
-                Console.WriteLine($"   result: ({string.Join(", ", result)})");
-                Console.WriteLine();
-            }
-        }
-    }
-}
diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Single.8.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Single.8.cs
deleted file mode 100644 (file)
index b81444c..0000000
+++ /dev/null
@@ -1,321 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-/******************************************************************************
- * This file is auto-generated from a template file by the GenerateTests.csx  *
- * script in tests\src\JIT\HardwareIntrinsics\X86\Shared. In order to make    *
- * changes, please update the corresponding template and run according to the *
- * directions listed in the file.                                             *
- ******************************************************************************/
-
-using System;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Runtime.Intrinsics;
-using System.Runtime.Intrinsics.X86;
-
-namespace JIT.HardwareIntrinsics.X86
-{
-    public static partial class Program
-    {
-        private static void InsertSingle8()
-        {
-            var test = new SimpleUnaryOpTest__InsertSingle8();
-            
-            try
-            {
-            if (test.IsSupported)
-            {
-                // Validates basic functionality works, using Unsafe.Read
-                test.RunBasicScenario_UnsafeRead();
-
-                if (Sse.IsSupported)
-                {
-                    // Validates basic functionality works, using Load
-                    test.RunBasicScenario_Load();
-
-                    // Validates basic functionality works, using LoadAligned
-                    test.RunBasicScenario_LoadAligned();
-                }
-
-                // Validates calling via reflection works, using Unsafe.Read
-                test.RunReflectionScenario_UnsafeRead();
-
-                if (Sse.IsSupported)
-                {
-                    // Validates calling via reflection works, using Load
-                    test.RunReflectionScenario_Load();
-
-                    // Validates calling via reflection works, using LoadAligned
-                    test.RunReflectionScenario_LoadAligned();
-                }
-
-                // Validates passing a static member works
-                test.RunClsVarScenario();
-
-                // Validates passing a local works, using Unsafe.Read
-                test.RunLclVarScenario_UnsafeRead();
-
-                if (Sse.IsSupported)
-                {
-                    // Validates passing a local works, using Load
-                    test.RunLclVarScenario_Load();
-
-                    // Validates passing a local works, using LoadAligned
-                    test.RunLclVarScenario_LoadAligned();
-                }
-
-                // Validates passing the field of a local works
-                test.RunLclFldScenario();
-
-                // Validates passing an instance member works
-                test.RunFldScenario();
-            }
-            else
-            {
-                // Validates we throw on unsupported hardware
-                test.RunUnsupportedScenario();
-            }
-            }
-            catch (PlatformNotSupportedException)
-            {
-                test.Succeeded = true;
-            }
-
-            if (!test.Succeeded)
-            {
-                throw new Exception("One or more scenarios did not complete as expected.");
-            }
-        }
-    }
-
-    public sealed unsafe class SimpleUnaryOpTest__InsertSingle8
-    {
-        private static readonly int LargestVectorSize = 16;
-
-        private static readonly int Op1ElementCount = Unsafe.SizeOf<Vector128<Single>>() / sizeof(Single);
-        private static readonly int RetElementCount = Unsafe.SizeOf<Vector128<Single>>() / sizeof(Single);
-
-        private static Single[] _data = new Single[Op1ElementCount];
-
-        private static Vector128<Single> _clsVar;
-
-        private Vector128<Single> _fld;
-
-        private SimpleUnaryOpTest__DataTable<Single, Single> _dataTable;
-
-        static SimpleUnaryOpTest__InsertSingle8()
-        {
-            var random = new Random();
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (float)(random.NextDouble()); }
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Single>, byte>(ref _clsVar), ref Unsafe.As<Single, byte>(ref _data[0]), (uint)Unsafe.SizeOf<Vector128<Single>>());
-        }
-
-        public SimpleUnaryOpTest__InsertSingle8()
-        {
-            Succeeded = true;
-
-            var random = new Random();
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (float)(random.NextDouble()); }
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector128<Single>, byte>(ref _fld), ref Unsafe.As<Single, byte>(ref _data[0]), (uint)Unsafe.SizeOf<Vector128<Single>>());
-
-            for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (float)(random.NextDouble()); }
-            _dataTable = new SimpleUnaryOpTest__DataTable<Single, Single>(_data, new Single[RetElementCount], LargestVectorSize);
-        }
-
-        public bool IsSupported => Sse41.IsSupported;
-
-        public bool Succeeded { get; set; }
-
-        public void RunBasicScenario_UnsafeRead()
-        {
-            var result = Sse41.Insert(
-                Unsafe.Read<Vector128<Single>>(_dataTable.inArrayPtr),
-                (float)2,
-                8
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunBasicScenario_Load()
-        {
-            var result = Sse41.Insert(
-                Sse.LoadVector128((Single*)(_dataTable.inArrayPtr)),
-                (float)2,
-                8
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunBasicScenario_LoadAligned()
-        {
-            var result = Sse41.Insert(
-                Sse.LoadAlignedVector128((Single*)(_dataTable.inArrayPtr)),
-                (float)2,
-                8
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_UnsafeRead()
-        {
-            var result = typeof(Sse41).GetMethod(nameof(Sse41.Insert), new Type[] { typeof(Vector128<Single>), typeof(Single), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Unsafe.Read<Vector128<Single>>(_dataTable.inArrayPtr),
-                                        (float)2,
-                                        (byte)8
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Vector128<Single>)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_Load()
-        {
-            var result = typeof(Sse41).GetMethod(nameof(Sse41.Insert), new Type[] { typeof(Vector128<Single>), typeof(Single), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Sse.LoadVector128((Single*)(_dataTable.inArrayPtr)),
-                                        (float)2,
-                                        (byte)8
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Vector128<Single>)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunReflectionScenario_LoadAligned()
-        {
-            var result = typeof(Sse41).GetMethod(nameof(Sse41.Insert), new Type[] { typeof(Vector128<Single>), typeof(Single), typeof(byte) })
-                                     .Invoke(null, new object[] {
-                                        Sse.LoadAlignedVector128((Single*)(_dataTable.inArrayPtr)),
-                                        (float)2,
-                                        (byte)8
-                                     });
-
-            Unsafe.Write(_dataTable.outArrayPtr, (Vector128<Single>)(result));
-            ValidateResult(_dataTable.inArrayPtr, _dataTable.outArrayPtr);
-        }
-
-        public void RunClsVarScenario()
-        {
-            var result = Sse41.Insert(
-                _clsVar,
-                (float)2,
-                8
-            );
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_clsVar, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_UnsafeRead()
-        {
-            var firstOp = Unsafe.Read<Vector128<Single>>(_dataTable.inArrayPtr);
-            var result = Sse41.Insert(firstOp, (float)2, 8);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_Load()
-        {
-            var firstOp = Sse.LoadVector128((Single*)(_dataTable.inArrayPtr));
-            var result = Sse41.Insert(firstOp, (float)2, 8);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclVarScenario_LoadAligned()
-        {
-            var firstOp = Sse.LoadAlignedVector128((Single*)(_dataTable.inArrayPtr));
-            var result = Sse41.Insert(firstOp, (float)2, 8);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(firstOp, _dataTable.outArrayPtr);
-        }
-
-        public void RunLclFldScenario()
-        {
-            var test = new SimpleUnaryOpTest__InsertSingle8();
-            var result = Sse41.Insert(test._fld, (float)2, 8);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(test._fld, _dataTable.outArrayPtr);
-        }
-
-        public void RunFldScenario()
-        {
-            var result = Sse41.Insert(_fld, (float)2, 8);
-
-            Unsafe.Write(_dataTable.outArrayPtr, result);
-            ValidateResult(_fld, _dataTable.outArrayPtr);
-        }
-
-        public void RunUnsupportedScenario()
-        {
-            Succeeded = false;
-
-            try
-            {
-                RunBasicScenario_UnsafeRead();
-            }
-            catch (PlatformNotSupportedException)
-            {
-                Succeeded = true;
-            }
-        }
-
-        private void ValidateResult(Vector128<Single> firstOp, void* result, [CallerMemberName] string method = "")
-        {
-            Single[] inArray = new Single[Op1ElementCount];
-            Single[] outArray = new Single[RetElementCount];
-
-            Unsafe.WriteUnaligned(ref Unsafe.As<Single, byte>(ref inArray[0]), firstOp);
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Single, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector128<Single>>());
-
-            ValidateResult(inArray, outArray, method);
-        }
-
-        private void ValidateResult(void* firstOp, void* result, [CallerMemberName] string method = "")
-        {
-            Single[] inArray = new Single[Op1ElementCount];
-            Single[] outArray = new Single[RetElementCount];
-
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Single, byte>(ref inArray[0]), ref Unsafe.AsRef<byte>(firstOp), (uint)Unsafe.SizeOf<Vector128<Single>>());
-            Unsafe.CopyBlockUnaligned(ref Unsafe.As<Single, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector128<Single>>());
-
-            ValidateResult(inArray, outArray, method);
-        }
-
-        private void ValidateResult(Single[] firstOp, Single[] result, [CallerMemberName] string method = "")
-        {
-
-            for (var i = 0; i < RetElementCount; i++)
-            {
-                if ((i == 0 ? BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(2.0f) : i == 3 ? BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(0.0f) : BitConverter.SingleToInt32Bits(result[i]) != BitConverter.SingleToInt32Bits(firstOp[i])))
-                {
-                    Succeeded = false;
-                    break;
-                }
-            }
-
-            if (!Succeeded)
-            {
-                Console.WriteLine($"{nameof(Sse41)}.{nameof(Sse41.Insert)}<Single>(Vector128<Single><9>): {method} failed:");
-                Console.WriteLine($"  firstOp: ({string.Join(", ", firstOp)})");
-                Console.WriteLine($"   result: ({string.Join(", ", result)})");
-                Console.WriteLine();
-            }
-        }
-    }
-}
index 195e186..92fd2ac 100644 (file)
@@ -23,14 +23,12 @@ namespace JIT.HardwareIntrinsics.X86
                 ["CompareEqual.Int64"] = CompareEqualInt64,
                 ["CompareEqual.UInt64"] = CompareEqualUInt64,
                 ["Extract.Byte.1"] = ExtractByte1,
-                ["Extract.SByte.1"] = ExtractSByte1,
                 ["Extract.Int32.1"] = ExtractInt321,
                 ["Extract.UInt32.1"] = ExtractUInt321,
                 ["Extract.Int64.1"] = ExtractInt641,
                 ["Extract.UInt64.1"] = ExtractUInt641,
                 ["Extract.Single.1"] = ExtractSingle1,
                 ["Extract.Byte.129"] = ExtractByte129,
-                ["Extract.SByte.129"] = ExtractSByte129,
                 ["Extract.Int32.129"] = ExtractInt32129,
                 ["Extract.UInt32.129"] = ExtractUInt32129,
                 ["Extract.Int64.129"] = ExtractInt64129,
@@ -40,30 +38,18 @@ namespace JIT.HardwareIntrinsics.X86
                 ["Floor.Single"] = FloorSingle,
                 ["FloorScalar.Double"] = FloorScalarDouble,
                 ["FloorScalar.Single"] = FloorScalarSingle,
-                ["Insert.Single.0"] = InsertSingle0,
                 ["Insert.Byte.1"] = InsertByte1,
                 ["Insert.SByte.1"] = InsertSByte1,
                 ["Insert.Int32.1"] = InsertInt321,
                 ["Insert.UInt32.1"] = InsertUInt321,
                 ["Insert.Int64.1"] = InsertInt641,
                 ["Insert.UInt64.1"] = InsertUInt641,
-                ["Insert.Single.1"] = InsertSingle1,
-                ["Insert.Single.2"] = InsertSingle2,
-                ["Insert.Single.4"] = InsertSingle4,
-                ["Insert.Single.8"] = InsertSingle8,
-                ["Insert.Single.16"] = InsertSingle16,
-                ["Insert.Single.32"] = InsertSingle32,
-                ["Insert.Single.48"] = InsertSingle48,
-                ["Insert.Single.64"] = InsertSingle64,
-                ["Insert.Single.128"] = InsertSingle128,
                 ["Insert.Byte.129"] = InsertByte129,
                 ["Insert.SByte.129"] = InsertSByte129,
                 ["Insert.Int32.129"] = InsertInt32129,
                 ["Insert.UInt32.129"] = InsertUInt32129,
                 ["Insert.Int64.129"] = InsertInt64129,
                 ["Insert.UInt64.129"] = InsertUInt64129,
-                ["Insert.Single.129"] = InsertSingle129,
-                ["Insert.Single.192"] = InsertSingle192,
                 ["Max.Int32"] = MaxInt32,
                 ["Max.SByte"] = MaxSByte,
                 ["Max.UInt16"] = MaxUInt16,
index e98e0c2..b6d3523 100644 (file)
     <Compile Include="TestZ.UInt32.cs" />
     <Compile Include="TestZ.UInt64.cs" />
     <Compile Include="Extract.Byte.1.cs" />
-    <Compile Include="Extract.SByte.1.cs" />
     <Compile Include="Extract.Int32.1.cs" />
     <Compile Include="Extract.UInt32.1.cs" />
     <Compile Include="Extract.Int64.1.cs" />
     <Compile Include="Extract.UInt64.1.cs" />
     <Compile Include="Extract.Single.1.cs" />
     <Compile Include="Extract.Byte.129.cs" />
-    <Compile Include="Extract.SByte.129.cs" />
     <Compile Include="Extract.Int32.129.cs" />
     <Compile Include="Extract.UInt32.129.cs" />
     <Compile Include="Extract.Int64.129.cs" />
     <Compile Include="Extract.UInt64.129.cs" />
     <Compile Include="Extract.Single.129.cs" />
-    <Compile Include="Insert.Single.0.cs" />
     <Compile Include="Insert.Byte.1.cs" />
     <Compile Include="Insert.SByte.1.cs" />
     <Compile Include="Insert.Int32.1.cs" />
     <Compile Include="Insert.UInt32.1.cs" />
     <Compile Include="Insert.Int64.1.cs" />
     <Compile Include="Insert.UInt64.1.cs" />
-    <Compile Include="Insert.Single.1.cs" />
-    <Compile Include="Insert.Single.2.cs" />
-    <Compile Include="Insert.Single.4.cs" />
-    <Compile Include="Insert.Single.8.cs" />
-    <Compile Include="Insert.Single.16.cs" />
-    <Compile Include="Insert.Single.32.cs" />
-    <Compile Include="Insert.Single.48.cs" />
-    <Compile Include="Insert.Single.64.cs" />
-    <Compile Include="Insert.Single.128.cs" />
     <Compile Include="Insert.Byte.129.cs" />
     <Compile Include="Insert.SByte.129.cs" />
     <Compile Include="Insert.Int32.129.cs" />
     <Compile Include="Insert.UInt32.129.cs" />
     <Compile Include="Insert.Int64.129.cs" />
     <Compile Include="Insert.UInt64.129.cs" />
-    <Compile Include="Insert.Single.129.cs" />
-    <Compile Include="Insert.Single.192.cs" />
     <Compile Include="Program.Sse41.cs" />
     <Compile Include="..\Shared\BooleanUnOpTest_DataTable.cs" />
     <Compile Include="..\Shared\BooleanBinOpTest_DataTable.cs" />
index 171f917..424f767 100644 (file)
     <Compile Include="TestZ.UInt32.cs" />
     <Compile Include="TestZ.UInt64.cs" />
     <Compile Include="Extract.Byte.1.cs" />
-    <Compile Include="Extract.SByte.1.cs" />
     <Compile Include="Extract.Int32.1.cs" />
     <Compile Include="Extract.UInt32.1.cs" />
     <Compile Include="Extract.Int64.1.cs" />
     <Compile Include="Extract.UInt64.1.cs" />
     <Compile Include="Extract.Single.1.cs" />
     <Compile Include="Extract.Byte.129.cs" />
-    <Compile Include="Extract.SByte.129.cs" />
     <Compile Include="Extract.Int32.129.cs" />
     <Compile Include="Extract.UInt32.129.cs" />
     <Compile Include="Extract.Int64.129.cs" />
     <Compile Include="Extract.UInt64.129.cs" />
     <Compile Include="Extract.Single.129.cs" />
-    <Compile Include="Insert.Single.0.cs" />
     <Compile Include="Insert.Byte.1.cs" />
     <Compile Include="Insert.SByte.1.cs" />
     <Compile Include="Insert.Int32.1.cs" />
     <Compile Include="Insert.UInt32.1.cs" />
     <Compile Include="Insert.Int64.1.cs" />
     <Compile Include="Insert.UInt64.1.cs" />
-    <Compile Include="Insert.Single.1.cs" />
-    <Compile Include="Insert.Single.2.cs" />
-    <Compile Include="Insert.Single.4.cs" />
-    <Compile Include="Insert.Single.8.cs" />
-    <Compile Include="Insert.Single.16.cs" />
-    <Compile Include="Insert.Single.32.cs" />
-    <Compile Include="Insert.Single.48.cs" />
-    <Compile Include="Insert.Single.64.cs" />
-    <Compile Include="Insert.Single.128.cs" />
     <Compile Include="Insert.Byte.129.cs" />
     <Compile Include="Insert.SByte.129.cs" />
     <Compile Include="Insert.Int32.129.cs" />
     <Compile Include="Insert.UInt32.129.cs" />
     <Compile Include="Insert.Int64.129.cs" />
     <Compile Include="Insert.UInt64.129.cs" />
-    <Compile Include="Insert.Single.129.cs" />
-    <Compile Include="Insert.Single.192.cs" />
     <Compile Include="Program.Sse41.cs" />
     <Compile Include="..\Shared\BooleanUnOpTest_DataTable.cs" />
     <Compile Include="..\Shared\BooleanBinOpTest_DataTable.cs" />
index 1fd61ec..03a3313 100644 (file)
@@ -238,21 +238,11 @@ namespace System.Runtime.Intrinsics.X86
         /// __int8 _mm256_extract_epi8 (__m256i a, const int index)
         ///   HELPER
         /// </summary>
-        public static sbyte Extract(Vector256<sbyte> value, byte index) { throw new PlatformNotSupportedException(); }
-        /// <summary>
-        /// __int8 _mm256_extract_epi8 (__m256i a, const int index)
-        ///   HELPER
-        /// </summary>
         public static byte Extract(Vector256<byte> value, byte index) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// __int16 _mm256_extract_epi16 (__m256i a, const int index)
         ///   HELPER
         /// </summary>
-        public static short Extract(Vector256<short> value, byte index) { throw new PlatformNotSupportedException(); }
-        /// <summary>
-        /// __int16 _mm256_extract_epi16 (__m256i a, const int index)
-        ///   HELPER
-        /// </summary>
         public static ushort Extract(Vector256<ushort> value, byte index) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// __int32 _mm256_extract_epi32 (__m256i a, const int index)
@@ -638,45 +628,45 @@ namespace System.Runtime.Intrinsics.X86
         /// __m128 _mm_maskload_ps (float const * mem_addr, __m128i mask)
         ///   VMASKMOVPS xmm, xmm, m128
         /// </summary>
-        public static unsafe Vector128<float> MaskLoad(float* address, Vector128<uint> mask) { throw new PlatformNotSupportedException(); }
+        public static unsafe Vector128<float> MaskLoad(float* address, Vector128<float> mask) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// __m128d _mm_maskload_pd (double const * mem_addr, __m128i mask)
         ///   VMASKMOVPD xmm, xmm, m128
         /// </summary>
-        public static unsafe Vector128<double> MaskLoad(double* address, Vector128<ulong> mask) { throw new PlatformNotSupportedException(); }
+        public static unsafe Vector128<double> MaskLoad(double* address, Vector128<double> mask) { throw new PlatformNotSupportedException(); }
 
         /// <summary>
         /// __m256 _mm256_maskload_ps (float const * mem_addr, __m256i mask)
         ///   VMASKMOVPS ymm, ymm, m256
         /// </summary>
-        public static unsafe Vector256<float> MaskLoad(float* address, Vector256<uint> mask) { throw new PlatformNotSupportedException(); }
+        public static unsafe Vector256<float> MaskLoad(float* address, Vector256<float> mask) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// __m256d _mm256_maskload_pd (double const * mem_addr, __m256i mask)
         ///   VMASKMOVPD ymm, ymm, m256
         /// </summary>
-        public static unsafe Vector256<double> MaskLoad(double* address, Vector256<ulong> mask) { throw new PlatformNotSupportedException(); }
+        public static unsafe Vector256<double> MaskLoad(double* address, Vector256<double> mask) { throw new PlatformNotSupportedException(); }
 
         /// <summary>
         /// void _mm_maskstore_ps (float * mem_addr, __m128i mask, __m128 a)
         ///   VMASKMOVPS m128, xmm, xmm
         /// </summary>
-        public static unsafe void MaskStore(float* address, Vector128<float> mask, Vector128<uint> source) { throw new PlatformNotSupportedException(); }
+        public static unsafe void MaskStore(float* address, Vector128<float> mask, Vector128<float> source) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// void _mm_maskstore_pd (double * mem_addr, __m128i mask, __m128d a)
         ///   VMASKMOVPD m128, xmm, xmm
         /// </summary>
-        public static unsafe void MaskStore(double* address, Vector128<double> mask, Vector128<ulong> source) { throw new PlatformNotSupportedException(); }
+        public static unsafe void MaskStore(double* address, Vector128<double> mask, Vector128<double> source) { throw new PlatformNotSupportedException(); }
 
         /// <summary>
         /// void _mm256_maskstore_ps (float * mem_addr, __m256i mask, __m256 a)
         ///   VMASKMOVPS m256, ymm, ymm
         /// </summary>
-        public static unsafe void MaskStore(float* address, Vector256<float> mask, Vector256<uint> source) { throw new PlatformNotSupportedException(); }
+        public static unsafe void MaskStore(float* address, Vector256<float> mask, Vector256<float> source) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// void _mm256_maskstore_pd (double * mem_addr, __m256i mask, __m256d a)
         ///   VMASKMOVPD m256, ymm, ymm
         /// </summary>
-        public static unsafe void MaskStore(double* address, Vector256<double> mask, Vector256<ulong> source) { throw new PlatformNotSupportedException(); }
+        public static unsafe void MaskStore(double* address, Vector256<double> mask, Vector256<double> source) { throw new PlatformNotSupportedException(); }
 
         /// <summary>
         /// __m256 _mm256_max_ps (__m256 a, __m256 b)
index fdb349b..63e0e29 100644 (file)
@@ -4,7 +4,7 @@
 
 using System;
 using System.Runtime.Intrinsics;
-using System.Runtime.CompilerServices;
+using Internal.Runtime.CompilerServices;
 
 namespace System.Runtime.Intrinsics.X86
 {
@@ -239,46 +239,11 @@ namespace System.Runtime.Intrinsics.X86
         /// __int8 _mm256_extract_epi8 (__m256i a, const int index)
         ///   HELPER
         /// </summary>
-        public static sbyte Extract(Vector256<sbyte> value, byte index)
-        {
-            unsafe
-            {
-                index &= 0x1F;
-                sbyte* buffer = stackalloc sbyte[32];
-                Store(buffer, value);
-                return buffer[index];
-            }
-        }
-
-        /// <summary>
-        /// __int8 _mm256_extract_epi8 (__m256i a, const int index)
-        ///   HELPER
-        /// </summary>
         public static byte Extract(Vector256<byte> value, byte index)
         {
-            unsafe
-            {
-                index &= 0x1F;
-                byte* buffer = stackalloc byte[32];
-                Store(buffer, value);
-                return buffer[index];   
-            }
+            return Unsafe.Add<byte>(ref Unsafe.As<Vector256<byte>, byte>(ref value), index & 0x1F);
         }
 
-        /// <summary>
-        /// __int16 _mm256_extract_epi16 (__m256i a, const int index)
-        ///   HELPER
-        /// </summary>
-        public static short Extract(Vector256<short> value, byte index)
-        {
-            unsafe
-            {
-                index &= 0xF;
-                short* buffer = stackalloc short[16];
-                Store(buffer, value);
-                return buffer[index];
-            }   
-        }
 
         /// <summary>
         /// __int16 _mm256_extract_epi16 (__m256i a, const int index)
@@ -286,13 +251,7 @@ namespace System.Runtime.Intrinsics.X86
         /// </summary>
         public static ushort Extract(Vector256<ushort> value, byte index)
         {
-            unsafe
-            {
-                index &= 0xF;
-                ushort* buffer = stackalloc ushort[16];
-                Store(buffer, value);
-                return buffer[index];
-            }
+            return Unsafe.Add<ushort>(ref Unsafe.As<Vector256<ushort>, ushort>(ref value), index & 0xF);
         }
 
         /// <summary>
@@ -301,13 +260,7 @@ namespace System.Runtime.Intrinsics.X86
         /// </summary>
         public static int Extract(Vector256<int> value, byte index)
         {
-            unsafe
-            {
-                index &= 0x7;
-                int* buffer = stackalloc int[8];
-                Store(buffer, value);
-                return buffer[index];
-            }
+            return Unsafe.Add<int>(ref Unsafe.As<Vector256<int>, int>(ref value), index & 0x7);
         }
 
         /// <summary>
@@ -316,13 +269,7 @@ namespace System.Runtime.Intrinsics.X86
         /// </summary>
         public static uint Extract(Vector256<uint> value, byte index)
         {
-            unsafe
-            {
-                index &= 0x7;
-                uint* buffer = stackalloc uint[8];
-                Store(buffer, value);
-                return buffer[index];
-            }
+            return Unsafe.Add<uint>(ref Unsafe.As<Vector256<uint>, uint>(ref value), index & 0x7);
         }
 
         /// <summary>
@@ -335,13 +282,7 @@ namespace System.Runtime.Intrinsics.X86
             {
                 throw new PlatformNotSupportedException();
             }
-            unsafe
-            {
-                index &= 0x3;
-                long* buffer = stackalloc long[4];
-                Store(buffer, value);
-                return buffer[index];
-            }
+            return Unsafe.Add<long>(ref Unsafe.As<Vector256<long>, long>(ref value), index & 0x3);
         }
 
         /// <summary>
@@ -354,13 +295,7 @@ namespace System.Runtime.Intrinsics.X86
             {
                 throw new PlatformNotSupportedException();
             }
-            unsafe
-            {
-                index &= 0x3;
-                ulong* buffer = stackalloc ulong[4];
-                Store(buffer, value);
-                return buffer[index];
-            }
+            return Unsafe.Add<ulong>(ref Unsafe.As<Vector256<ulong>, ulong>(ref value), index & 0x3);
         }
 
         /// <summary>
@@ -825,45 +760,45 @@ namespace System.Runtime.Intrinsics.X86
         /// __m128 _mm_maskload_ps (float const * mem_addr, __m128i mask)
         ///   VMASKMOVPS xmm, xmm, m128
         /// </summary>
-        public static unsafe Vector128<float> MaskLoad(float* address, Vector128<uint> mask) => MaskLoad(address, mask);
+        public static unsafe Vector128<float> MaskLoad(float* address, Vector128<float> mask) => MaskLoad(address, mask);
         /// <summary>
         /// __m128d _mm_maskload_pd (double const * mem_addr, __m128i mask)
         ///   VMASKMOVPD xmm, xmm, m128
         /// </summary>
-        public static unsafe Vector128<double> MaskLoad(double* address, Vector128<ulong> mask) => MaskLoad(address, mask);
+        public static unsafe Vector128<double> MaskLoad(double* address, Vector128<double> mask) => MaskLoad(address, mask);
 
         /// <summary>
         /// __m256 _mm256_maskload_ps (float const * mem_addr, __m256i mask)
         ///   VMASKMOVPS ymm, ymm, m256
         /// </summary>
-        public static unsafe Vector256<float> MaskLoad(float* address, Vector256<uint> mask) => MaskLoad(address, mask);
+        public static unsafe Vector256<float> MaskLoad(float* address, Vector256<float> mask) => MaskLoad(address, mask);
         /// <summary>
         /// __m256d _mm256_maskload_pd (double const * mem_addr, __m256i mask)
         ///   VMASKMOVPD ymm, ymm, m256
         /// </summary>
-        public static unsafe Vector256<double> MaskLoad(double* address, Vector256<ulong> mask) => MaskLoad(address, mask);
+        public static unsafe Vector256<double> MaskLoad(double* address, Vector256<double> mask) => MaskLoad(address, mask);
 
         /// <summary>
         /// void _mm_maskstore_ps (float * mem_addr, __m128i mask, __m128 a)
         ///   VMASKMOVPS m128, xmm, xmm
         /// </summary>
-        public static unsafe void MaskStore(float* address, Vector128<float> mask, Vector128<uint> source) => MaskStore(address, mask, source);
+        public static unsafe void MaskStore(float* address, Vector128<float> mask, Vector128<float> source) => MaskStore(address, mask, source);
         /// <summary>
         /// void _mm_maskstore_pd (double * mem_addr, __m128i mask, __m128d a)
         ///   VMASKMOVPD m128, xmm, xmm
         /// </summary>
-        public static unsafe void MaskStore(double* address, Vector128<double> mask, Vector128<ulong> source) => MaskStore(address, mask, source);
+        public static unsafe void MaskStore(double* address, Vector128<double> mask, Vector128<double> source) => MaskStore(address, mask, source);
 
         /// <summary>
         /// void _mm256_maskstore_ps (float * mem_addr, __m256i mask, __m256 a)
         ///   VMASKMOVPS m256, ymm, ymm
         /// </summary>
-        public static unsafe void MaskStore(float* address, Vector256<float> mask, Vector256<uint> source) => MaskStore(address, mask, source);
+        public static unsafe void MaskStore(float* address, Vector256<float> mask, Vector256<float> source) => MaskStore(address, mask, source);
         /// <summary>
         /// void _mm256_maskstore_pd (double * mem_addr, __m256i mask, __m256d a)
         ///   VMASKMOVPD m256, ymm, ymm
         /// </summary>
-        public static unsafe void MaskStore(double* address, Vector256<double> mask, Vector256<ulong> source) => MaskStore(address, mask, source);
+        public static unsafe void MaskStore(double* address, Vector256<double> mask, Vector256<double> source) => MaskStore(address, mask, source);
 
         /// <summary>
         /// __m256 _mm256_max_ps (__m256 a, __m256 b)
index 8aaa454..0e2bb5d 100644 (file)
@@ -613,11 +613,6 @@ namespace System.Runtime.Intrinsics.X86
         /// int _mm_extract_epi16 (__m128i a,  int immediate)
         ///   PEXTRW reg, xmm, imm8
         /// </summary>
-        public static short Extract(Vector128<short> value, byte index) { throw new PlatformNotSupportedException(); }
-        /// <summary>
-        /// int _mm_extract_epi16 (__m128i a,  int immediate)
-        ///   PEXTRW reg, xmm, imm8
-        /// </summary>
         public static ushort Extract(Vector128<ushort> value, byte index) { throw new PlatformNotSupportedException(); }
 
         /// <summary>
index d0eb9ef..332bd7b 100644 (file)
@@ -614,11 +614,6 @@ namespace System.Runtime.Intrinsics.X86
         /// int _mm_extract_epi16 (__m128i a,  int immediate)
         ///   PEXTRW reg, xmm, imm8
         /// </summary>
-        public static short Extract(Vector128<short> value, byte index) => Extract(value, index);
-        /// <summary>
-        /// int _mm_extract_epi16 (__m128i a,  int immediate)
-        ///   PEXTRW reg, xmm, imm8
-        /// </summary>
         public static ushort Extract(Vector128<ushort> value, byte index) => Extract(value, index);
 
         /// <summary>
index 063b8dc..8ba7393 100644 (file)
@@ -182,11 +182,6 @@ namespace System.Runtime.Intrinsics.X86
         /// int _mm_extract_epi8 (__m128i a, const int imm8)
         ///   PEXTRB reg/m8, xmm, imm8
         /// </summary>
-        public static sbyte Extract(Vector128<sbyte> value, byte index) { throw new PlatformNotSupportedException(); }
-        /// <summary>
-        /// int _mm_extract_epi8 (__m128i a, const int imm8)
-        ///   PEXTRB reg/m8, xmm, imm8
-        /// </summary>
         public static byte Extract(Vector128<byte> value, byte index) { throw new PlatformNotSupportedException(); }
         /// <summary>
         /// int _mm_extract_epi32 (__m128i a, const int imm8)
@@ -283,7 +278,7 @@ namespace System.Runtime.Intrinsics.X86
         /// __m128 _mm_insert_ps (__m128 a, __m128 b, const int imm8)
         ///   INSERTPS xmm, xmm/m32, imm8
         /// </summary>
-        public static Vector128<float> Insert(Vector128<float> value, float data, byte index) { throw new PlatformNotSupportedException(); }
+        public static Vector128<float> Insert(Vector128<float> value, Vector128<float> data, byte index) { throw new PlatformNotSupportedException(); }
 
         /// <summary>
         /// __m128i _mm_max_epi8 (__m128i a, __m128i b)
index dd81168..c3d9dcb 100644 (file)
@@ -182,11 +182,6 @@ namespace System.Runtime.Intrinsics.X86
         /// int _mm_extract_epi8 (__m128i a, const int imm8)
         ///   PEXTRB reg/m8, xmm, imm8
         /// </summary>
-        public static sbyte Extract(Vector128<sbyte> value, byte index) => Extract(value, index);
-        /// <summary>
-        /// int _mm_extract_epi8 (__m128i a, const int imm8)
-        ///   PEXTRB reg/m8, xmm, imm8
-        /// </summary>
         public static byte Extract(Vector128<byte> value, byte index) => Extract(value, index);
         /// <summary>
         /// int _mm_extract_epi32 (__m128i a, const int imm8)
@@ -283,7 +278,7 @@ namespace System.Runtime.Intrinsics.X86
         /// __m128 _mm_insert_ps (__m128 a, __m128 b, const int imm8)
         ///   INSERTPS xmm, xmm/m32, imm8
         /// </summary>
-        public static Vector128<float> Insert(Vector128<float> value, float data, byte index) => Insert(value, data, index);
+        public static Vector128<float> Insert(Vector128<float> value, Vector128<float> data, byte index) => Insert(value, data, index);
 
         /// <summary>
         /// __m128i _mm_max_epi8 (__m128i a, __m128i b)