From a9e239ab01eedb25afdf2ae2905d5cb109166fc4 Mon Sep 17 00:00:00 2001 From: Tanner Gooding Date: Fri, 20 Jul 2018 10:52:21 -0700 Subject: [PATCH] Regenerating the x86 HWIntrinsic templated tests Commit migrated from https://github.com/dotnet/coreclr/commit/24323ada560f5e81d068b67e68250ead1626a7f8 --- .../JIT/HardwareIntrinsics/X86/Avx/Add.Double.cs | 5 ----- .../JIT/HardwareIntrinsics/X86/Avx/Add.Single.cs | 5 ----- .../X86/Avx/AddSubtract.Double.cs | 5 ----- .../X86/Avx/AddSubtract.Single.cs | 5 ----- .../JIT/HardwareIntrinsics/X86/Avx/And.Double.cs | 5 ----- .../JIT/HardwareIntrinsics/X86/Avx/And.Single.cs | 5 ----- .../JIT/HardwareIntrinsics/X86/Avx/AndNot.Double.cs | 5 ----- .../JIT/HardwareIntrinsics/X86/Avx/AndNot.Single.cs | 5 ----- .../X86/Avx/BlendVariable.Double.cs | 5 ----- .../X86/Avx/BlendVariable.Single.cs | 5 ----- .../HardwareIntrinsics/X86/Avx/Ceiling.Double.cs | 5 ----- .../HardwareIntrinsics/X86/Avx/Ceiling.Single.cs | 5 ----- .../JIT/HardwareIntrinsics/X86/Avx/Divide.Double.cs | 5 ----- .../JIT/HardwareIntrinsics/X86/Avx/Divide.Single.cs | 5 ----- .../X86/Avx/DuplicateEvenIndexed.Double.cs | 5 ----- .../X86/Avx/DuplicateEvenIndexed.Single.cs | 5 ----- .../X86/Avx/DuplicateOddIndexed.Single.cs | 5 ----- .../X86/Avx/ExtendToVector256.Byte.cs | 13 ++++--------- .../X86/Avx/ExtendToVector256.Double.cs | 5 ----- .../X86/Avx/ExtendToVector256.Int16.cs | 13 ++++--------- .../X86/Avx/ExtendToVector256.Int32.cs | 13 ++++--------- .../X86/Avx/ExtendToVector256.Int64.cs | 13 ++++--------- .../X86/Avx/ExtendToVector256.SByte.cs | 13 ++++--------- .../X86/Avx/ExtendToVector256.Single.cs | 5 ----- .../X86/Avx/ExtendToVector256.UInt16.cs | 13 ++++--------- .../X86/Avx/ExtendToVector256.UInt32.cs | 13 ++++--------- .../X86/Avx/ExtendToVector256.UInt64.cs | 13 ++++--------- .../HardwareIntrinsics/X86/Avx/Extract.Byte.1.cs | 13 ++++--------- .../HardwareIntrinsics/X86/Avx/Extract.Byte.20.cs | 13 ++++--------- .../HardwareIntrinsics/X86/Avx/Extract.Byte.52.cs | 13 ++++--------- .../HardwareIntrinsics/X86/Avx/Extract.Int32.1.cs | 13 ++++--------- .../HardwareIntrinsics/X86/Avx/Extract.Int32.22.cs | 13 ++++--------- .../HardwareIntrinsics/X86/Avx/Extract.Int32.6.cs | 13 ++++--------- .../HardwareIntrinsics/X86/Avx/Extract.Int64.1.cs | 13 ++++--------- .../HardwareIntrinsics/X86/Avx/Extract.Int64.19.cs | 13 ++++--------- .../HardwareIntrinsics/X86/Avx/Extract.Int64.3.cs | 13 ++++--------- .../HardwareIntrinsics/X86/Avx/Extract.UInt16.1.cs | 13 ++++--------- .../HardwareIntrinsics/X86/Avx/Extract.UInt16.11.cs | 13 ++++--------- .../HardwareIntrinsics/X86/Avx/Extract.UInt16.27.cs | 13 ++++--------- .../HardwareIntrinsics/X86/Avx/Extract.UInt32.1.cs | 13 ++++--------- .../HardwareIntrinsics/X86/Avx/Extract.UInt32.22.cs | 13 ++++--------- .../HardwareIntrinsics/X86/Avx/Extract.UInt32.6.cs | 13 ++++--------- .../HardwareIntrinsics/X86/Avx/Extract.UInt64.1.cs | 13 ++++--------- .../HardwareIntrinsics/X86/Avx/Extract.UInt64.19.cs | 13 ++++--------- .../HardwareIntrinsics/X86/Avx/Extract.UInt64.3.cs | 13 ++++--------- .../X86/Avx/ExtractVector128.Byte.1.Store.cs | 13 ++++--------- .../X86/Avx/ExtractVector128.Double.1.Store.cs | 5 ----- .../X86/Avx/ExtractVector128.Int16.1.Store.cs | 13 ++++--------- .../X86/Avx/ExtractVector128.Int32.1.Store.cs | 13 ++++--------- .../X86/Avx/ExtractVector128.Int64.1.Store.cs | 13 ++++--------- .../X86/Avx/ExtractVector128.SByte.1.Store.cs | 13 ++++--------- .../X86/Avx/ExtractVector128.Single.1.Store.cs | 5 ----- .../X86/Avx/ExtractVector128.UInt16.1.Store.cs | 13 ++++--------- .../X86/Avx/ExtractVector128.UInt32.1.Store.cs | 13 ++++--------- .../X86/Avx/ExtractVector128.UInt64.1.Store.cs | 13 ++++--------- .../JIT/HardwareIntrinsics/X86/Avx/Floor.Double.cs | 5 ----- .../JIT/HardwareIntrinsics/X86/Avx/Floor.Single.cs | 5 ----- .../HardwareIntrinsics/X86/Avx/GetLowerHalf.Byte.cs | 13 ++++--------- .../X86/Avx/GetLowerHalf.Double.cs | 5 ----- .../X86/Avx/GetLowerHalf.Int16.cs | 13 ++++--------- .../X86/Avx/GetLowerHalf.Int32.cs | 13 ++++--------- .../X86/Avx/GetLowerHalf.Int64.cs | 13 ++++--------- .../X86/Avx/GetLowerHalf.SByte.cs | 13 ++++--------- .../X86/Avx/GetLowerHalf.Single.cs | 5 ----- .../X86/Avx/GetLowerHalf.UInt16.cs | 13 ++++--------- .../X86/Avx/GetLowerHalf.UInt32.cs | 13 ++++--------- .../X86/Avx/GetLowerHalf.UInt64.cs | 13 ++++--------- .../JIT/HardwareIntrinsics/X86/Avx/Insert.Byte.1.cs | 5 ----- .../HardwareIntrinsics/X86/Avx/Insert.Byte.20.cs | 5 ----- .../HardwareIntrinsics/X86/Avx/Insert.Byte.52.cs | 5 ----- .../HardwareIntrinsics/X86/Avx/Insert.Int16.1.cs | 5 ----- .../HardwareIntrinsics/X86/Avx/Insert.Int16.11.cs | 5 ----- .../HardwareIntrinsics/X86/Avx/Insert.Int16.27.cs | 5 ----- .../HardwareIntrinsics/X86/Avx/Insert.Int32.1.cs | 5 ----- .../HardwareIntrinsics/X86/Avx/Insert.Int32.22.cs | 5 ----- .../HardwareIntrinsics/X86/Avx/Insert.Int32.6.cs | 5 ----- .../HardwareIntrinsics/X86/Avx/Insert.Int64.1.cs | 5 ----- .../HardwareIntrinsics/X86/Avx/Insert.Int64.19.cs | 5 ----- .../HardwareIntrinsics/X86/Avx/Insert.Int64.3.cs | 5 ----- .../HardwareIntrinsics/X86/Avx/Insert.SByte.1.cs | 5 ----- .../HardwareIntrinsics/X86/Avx/Insert.SByte.20.cs | 5 ----- .../HardwareIntrinsics/X86/Avx/Insert.SByte.52.cs | 5 ----- .../HardwareIntrinsics/X86/Avx/Insert.UInt16.1.cs | 5 ----- .../HardwareIntrinsics/X86/Avx/Insert.UInt16.11.cs | 5 ----- .../HardwareIntrinsics/X86/Avx/Insert.UInt16.27.cs | 5 ----- .../HardwareIntrinsics/X86/Avx/Insert.UInt32.1.cs | 5 ----- .../HardwareIntrinsics/X86/Avx/Insert.UInt32.22.cs | 5 ----- .../HardwareIntrinsics/X86/Avx/Insert.UInt32.6.cs | 5 ----- .../HardwareIntrinsics/X86/Avx/Insert.UInt64.1.cs | 5 ----- .../HardwareIntrinsics/X86/Avx/Insert.UInt64.19.cs | 5 ----- .../HardwareIntrinsics/X86/Avx/Insert.UInt64.3.cs | 5 ----- .../X86/Avx/InsertVector128.Byte.1.Load.cs | 21 ++++++++------------- .../X86/Avx/InsertVector128.Double.1.Load.cs | 5 ----- .../X86/Avx/InsertVector128.Int16.1.Load.cs | 21 ++++++++------------- .../X86/Avx/InsertVector128.Int32.1.Load.cs | 21 ++++++++------------- .../X86/Avx/InsertVector128.Int64.1.Load.cs | 21 ++++++++------------- .../X86/Avx/InsertVector128.SByte.1.Load.cs | 21 ++++++++------------- .../X86/Avx/InsertVector128.Single.1.Load.cs | 5 ----- .../X86/Avx/InsertVector128.UInt16.1.Load.cs | 21 ++++++++------------- .../X86/Avx/InsertVector128.UInt32.1.Load.cs | 21 ++++++++------------- .../X86/Avx/InsertVector128.UInt64.1.Load.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx/Max.Double.cs | 5 ----- .../JIT/HardwareIntrinsics/X86/Avx/Max.Single.cs | 5 ----- .../JIT/HardwareIntrinsics/X86/Avx/Min.Double.cs | 5 ----- .../JIT/HardwareIntrinsics/X86/Avx/Min.Single.cs | 5 ----- .../HardwareIntrinsics/X86/Avx/Multiply.Double.cs | 5 ----- .../HardwareIntrinsics/X86/Avx/Multiply.Single.cs | 5 ----- .../src/JIT/HardwareIntrinsics/X86/Avx/Or.Double.cs | 5 ----- .../src/JIT/HardwareIntrinsics/X86/Avx/Or.Single.cs | 5 ----- .../HardwareIntrinsics/X86/Avx/Permute.Double.1.cs | 5 ----- .../HardwareIntrinsics/X86/Avx/Permute.Double.2.cs | 5 ----- .../HardwareIntrinsics/X86/Avx/Permute.Single.1.cs | 5 ----- .../HardwareIntrinsics/X86/Avx/Permute.Single.2.cs | 5 ----- .../HardwareIntrinsics/X86/Avx/PermuteVar.Double.cs | 5 ----- .../HardwareIntrinsics/X86/Avx/PermuteVar.Single.cs | 5 ----- .../JIT/HardwareIntrinsics/X86/Avx/Program.Avx.cs | 2 +- .../X86/Avx/RoundCurrentDirection.Double.cs | 5 ----- .../X86/Avx/RoundCurrentDirection.Single.cs | 5 ----- .../X86/Avx/RoundToNearestInteger.Double.cs | 5 ----- .../X86/Avx/RoundToNearestInteger.Single.cs | 5 ----- .../X86/Avx/RoundToNegativeInfinity.Double.cs | 5 ----- .../X86/Avx/RoundToNegativeInfinity.Single.cs | 5 ----- .../X86/Avx/RoundToPositiveInfinity.Double.cs | 5 ----- .../X86/Avx/RoundToPositiveInfinity.Single.cs | 5 ----- .../X86/Avx/RoundToZero.Double.cs | 5 ----- .../X86/Avx/RoundToZero.Single.cs | 5 ----- .../HardwareIntrinsics/X86/Avx/Shuffle.Double.1.cs | 5 ----- .../HardwareIntrinsics/X86/Avx/Shuffle.Single.1.cs | 5 ----- .../HardwareIntrinsics/X86/Avx/Subtract.Double.cs | 5 ----- .../HardwareIntrinsics/X86/Avx/Subtract.Single.cs | 5 ----- .../JIT/HardwareIntrinsics/X86/Avx/TestC.Byte.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx/TestC.Int16.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx/TestC.Int32.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx/TestC.Int64.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx/TestC.SByte.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx/TestC.UInt16.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx/TestC.UInt32.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx/TestC.UInt64.cs | 21 ++++++++------------- .../X86/Avx/TestNotZAndNotC.Byte.cs | 21 ++++++++------------- .../X86/Avx/TestNotZAndNotC.Int16.cs | 21 ++++++++------------- .../X86/Avx/TestNotZAndNotC.Int32.cs | 21 ++++++++------------- .../X86/Avx/TestNotZAndNotC.Int64.cs | 21 ++++++++------------- .../X86/Avx/TestNotZAndNotC.SByte.cs | 21 ++++++++------------- .../X86/Avx/TestNotZAndNotC.UInt16.cs | 21 ++++++++------------- .../X86/Avx/TestNotZAndNotC.UInt32.cs | 21 ++++++++------------- .../X86/Avx/TestNotZAndNotC.UInt64.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx/TestZ.Byte.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx/TestZ.Int16.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx/TestZ.Int32.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx/TestZ.Int64.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx/TestZ.SByte.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx/TestZ.UInt16.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx/TestZ.UInt32.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx/TestZ.UInt64.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx/Xor.Double.cs | 5 ----- .../JIT/HardwareIntrinsics/X86/Avx/Xor.Single.cs | 5 ----- .../src/JIT/HardwareIntrinsics/X86/Avx2/Add.Byte.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx2/Add.Int16.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx2/Add.Int32.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx2/Add.Int64.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx2/Add.SByte.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx2/Add.UInt16.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx2/Add.UInt32.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx2/Add.UInt64.cs | 21 ++++++++------------- .../X86/Avx2/AlignRight.SByte.228.cs | 21 ++++++++------------- .../X86/Avx2/AlignRight.SByte.250.cs | 21 ++++++++------------- .../X86/Avx2/AlignRight.SByte.27.cs | 21 ++++++++------------- .../X86/Avx2/AlignRight.SByte.5.cs | 21 ++++++++------------- .../src/JIT/HardwareIntrinsics/X86/Avx2/And.Byte.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx2/And.Int16.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx2/And.Int32.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx2/And.Int64.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx2/And.SByte.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx2/And.UInt16.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx2/And.UInt32.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx2/And.UInt64.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx2/AndNot.Byte.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx2/AndNot.Int16.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx2/AndNot.Int32.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx2/AndNot.Int64.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx2/AndNot.SByte.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Avx2/AndNot.UInt16.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Avx2/AndNot.UInt32.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Avx2/AndNot.UInt64.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx2/Average.Byte.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Avx2/Average.UInt16.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Avx2/Blend.Int16.1.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Avx2/Blend.Int16.2.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Avx2/Blend.Int16.4.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Avx2/Blend.Int16.85.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Avx2/Blend.Int32.1.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Avx2/Blend.Int32.2.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Avx2/Blend.Int32.4.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Avx2/Blend.Int32.85.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Avx2/Blend.UInt16.1.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Avx2/Blend.UInt16.2.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Avx2/Blend.UInt16.4.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Avx2/Blend.UInt16.85.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Avx2/Blend.UInt32.1.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Avx2/Blend.UInt32.2.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Avx2/Blend.UInt32.4.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Avx2/Blend.UInt32.85.cs | 21 ++++++++------------- .../X86/Avx2/BlendVariable.Byte.cs | 21 ++++++++------------- .../X86/Avx2/BlendVariable.SByte.cs | 21 ++++++++------------- .../X86/Avx2/BroadcastScalarToVector128.Byte.cs | 13 ++++--------- .../X86/Avx2/BroadcastScalarToVector128.Double.cs | 5 ----- .../X86/Avx2/BroadcastScalarToVector128.Int16.cs | 13 ++++--------- .../X86/Avx2/BroadcastScalarToVector128.Int32.cs | 13 ++++--------- .../X86/Avx2/BroadcastScalarToVector128.Int64.cs | 13 ++++--------- .../X86/Avx2/BroadcastScalarToVector128.SByte.cs | 13 ++++--------- .../X86/Avx2/BroadcastScalarToVector128.Single.cs | 5 ----- .../X86/Avx2/BroadcastScalarToVector128.UInt16.cs | 13 ++++--------- .../X86/Avx2/BroadcastScalarToVector128.UInt32.cs | 13 ++++--------- .../X86/Avx2/BroadcastScalarToVector128.UInt64.cs | 13 ++++--------- .../X86/Avx2/BroadcastScalarToVector256.Byte.cs | 13 ++++--------- .../X86/Avx2/BroadcastScalarToVector256.Double.cs | 5 ----- .../X86/Avx2/BroadcastScalarToVector256.Int16.cs | 13 ++++--------- .../X86/Avx2/BroadcastScalarToVector256.Int32.cs | 13 ++++--------- .../X86/Avx2/BroadcastScalarToVector256.Int64.cs | 13 ++++--------- .../X86/Avx2/BroadcastScalarToVector256.SByte.cs | 13 ++++--------- .../X86/Avx2/BroadcastScalarToVector256.Single.cs | 5 ----- .../X86/Avx2/BroadcastScalarToVector256.UInt16.cs | 13 ++++--------- .../X86/Avx2/BroadcastScalarToVector256.UInt32.cs | 13 ++++--------- .../X86/Avx2/BroadcastScalarToVector256.UInt64.cs | 13 ++++--------- .../X86/Avx2/CompareEqual.Byte.cs | 21 ++++++++------------- .../X86/Avx2/CompareEqual.Int16.cs | 21 ++++++++------------- .../X86/Avx2/CompareEqual.Int32.cs | 21 ++++++++------------- .../X86/Avx2/CompareEqual.Int64.cs | 21 ++++++++------------- .../X86/Avx2/CompareEqual.SByte.cs | 21 ++++++++------------- .../X86/Avx2/CompareEqual.UInt16.cs | 21 ++++++++------------- .../X86/Avx2/CompareEqual.UInt32.cs | 21 ++++++++------------- .../X86/Avx2/CompareEqual.UInt64.cs | 21 ++++++++------------- .../X86/Avx2/CompareGreaterThan.Int16.cs | 21 ++++++++------------- .../X86/Avx2/CompareGreaterThan.Int32.cs | 21 ++++++++------------- .../X86/Avx2/CompareGreaterThan.Int64.cs | 21 ++++++++------------- .../X86/Avx2/CompareGreaterThan.SByte.cs | 21 ++++++++------------- .../X86/Avx2/ConvertToDouble.Double.cs | 5 ----- .../X86/Avx2/ConvertToInt32.Int32.cs | 13 ++++--------- .../X86/Avx2/ConvertToUInt32.UInt32.cs | 13 ++++--------- .../X86/Avx2/ExtractVector128.Byte.1.Store.cs | 13 ++++--------- .../X86/Avx2/ExtractVector128.Byte.1.cs | 13 ++++--------- .../X86/Avx2/ExtractVector128.Int16.1.Store.cs | 13 ++++--------- .../X86/Avx2/ExtractVector128.Int16.1.cs | 13 ++++--------- .../X86/Avx2/ExtractVector128.Int32.1.Store.cs | 13 ++++--------- .../X86/Avx2/ExtractVector128.Int32.1.cs | 13 ++++--------- .../X86/Avx2/ExtractVector128.Int64.1.Store.cs | 13 ++++--------- .../X86/Avx2/ExtractVector128.Int64.1.cs | 13 ++++--------- .../X86/Avx2/ExtractVector128.SByte.1.Store.cs | 13 ++++--------- .../X86/Avx2/ExtractVector128.SByte.1.cs | 13 ++++--------- .../X86/Avx2/ExtractVector128.UInt16.1.Store.cs | 13 ++++--------- .../X86/Avx2/ExtractVector128.UInt16.1.cs | 13 ++++--------- .../X86/Avx2/ExtractVector128.UInt32.1.Store.cs | 13 ++++--------- .../X86/Avx2/ExtractVector128.UInt32.1.cs | 13 ++++--------- .../X86/Avx2/ExtractVector128.UInt64.1.Store.cs | 13 ++++--------- .../X86/Avx2/ExtractVector128.UInt64.1.cs | 13 ++++--------- .../X86/Avx2/InsertVector128.Byte.1.Load.cs | 21 ++++++++------------- .../X86/Avx2/InsertVector128.Byte.1.cs | 21 ++++++++------------- .../X86/Avx2/InsertVector128.Int16.1.Load.cs | 21 ++++++++------------- .../X86/Avx2/InsertVector128.Int16.1.cs | 21 ++++++++------------- .../X86/Avx2/InsertVector128.Int32.1.Load.cs | 21 ++++++++------------- .../X86/Avx2/InsertVector128.Int32.1.cs | 21 ++++++++------------- .../X86/Avx2/InsertVector128.Int64.1.Load.cs | 21 ++++++++------------- .../X86/Avx2/InsertVector128.Int64.1.cs | 21 ++++++++------------- .../X86/Avx2/InsertVector128.SByte.1.Load.cs | 21 ++++++++------------- .../X86/Avx2/InsertVector128.SByte.1.cs | 21 ++++++++------------- .../X86/Avx2/InsertVector128.UInt16.1.Load.cs | 21 ++++++++------------- .../X86/Avx2/InsertVector128.UInt16.1.cs | 21 ++++++++------------- .../X86/Avx2/InsertVector128.UInt32.1.Load.cs | 21 ++++++++------------- .../X86/Avx2/InsertVector128.UInt32.1.cs | 21 ++++++++------------- .../X86/Avx2/InsertVector128.UInt64.1.Load.cs | 21 ++++++++------------- .../X86/Avx2/InsertVector128.UInt64.1.cs | 21 ++++++++------------- .../src/JIT/HardwareIntrinsics/X86/Avx2/Max.Byte.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx2/Max.Int16.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx2/Max.Int32.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx2/Max.SByte.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx2/Max.UInt16.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx2/Max.UInt32.cs | 21 ++++++++------------- .../src/JIT/HardwareIntrinsics/X86/Avx2/Min.Byte.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx2/Min.Int16.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx2/Min.Int32.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx2/Min.SByte.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx2/Min.UInt16.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx2/Min.UInt32.cs | 21 ++++++++------------- .../src/JIT/HardwareIntrinsics/X86/Avx2/Or.Byte.cs | 21 ++++++++------------- .../src/JIT/HardwareIntrinsics/X86/Avx2/Or.Int16.cs | 21 ++++++++------------- .../src/JIT/HardwareIntrinsics/X86/Avx2/Or.Int32.cs | 21 ++++++++------------- .../src/JIT/HardwareIntrinsics/X86/Avx2/Or.Int64.cs | 21 ++++++++------------- .../src/JIT/HardwareIntrinsics/X86/Avx2/Or.SByte.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx2/Or.UInt16.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx2/Or.UInt32.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx2/Or.UInt64.cs | 21 ++++++++------------- .../X86/Avx2/Permute2x128.Int32.2.cs | 21 ++++++++------------- .../X86/Avx2/Permute2x128.Int64.2.cs | 21 ++++++++------------- .../X86/Avx2/Permute2x128.UInt32.2.cs | 21 ++++++++------------- .../X86/Avx2/Permute2x128.UInt64.2.cs | 21 ++++++++------------- .../X86/Avx2/ShiftLeftLogical.Int16.1.cs | 13 ++++--------- .../X86/Avx2/ShiftLeftLogical.Int16.16.cs | 13 ++++--------- .../X86/Avx2/ShiftLeftLogical.Int32.1.cs | 13 ++++--------- .../X86/Avx2/ShiftLeftLogical.Int32.32.cs | 13 ++++--------- .../X86/Avx2/ShiftLeftLogical.Int64.1.cs | 13 ++++--------- .../X86/Avx2/ShiftLeftLogical.Int64.64.cs | 13 ++++--------- .../X86/Avx2/ShiftLeftLogical.UInt16.1.cs | 13 ++++--------- .../X86/Avx2/ShiftLeftLogical.UInt16.16.cs | 13 ++++--------- .../X86/Avx2/ShiftLeftLogical.UInt32.1.cs | 13 ++++--------- .../X86/Avx2/ShiftLeftLogical.UInt32.32.cs | 13 ++++--------- .../X86/Avx2/ShiftLeftLogical.UInt64.1.cs | 13 ++++--------- .../X86/Avx2/ShiftLeftLogical.UInt64.64.cs | 13 ++++--------- .../X86/Avx2/ShiftLeftLogical128BitLane.Byte.1.cs | 5 ----- .../X86/Avx2/ShiftLeftLogical128BitLane.Int16.1.cs | 5 ----- .../X86/Avx2/ShiftLeftLogical128BitLane.Int32.1.cs | 5 ----- .../X86/Avx2/ShiftLeftLogical128BitLane.Int64.1.cs | 5 ----- .../X86/Avx2/ShiftLeftLogical128BitLane.SByte.1.cs | 5 ----- .../X86/Avx2/ShiftLeftLogical128BitLane.UInt16.1.cs | 5 ----- .../X86/Avx2/ShiftLeftLogical128BitLane.UInt32.1.cs | 5 ----- .../X86/Avx2/ShiftLeftLogical128BitLane.UInt64.1.cs | 5 ----- .../X86/Avx2/ShiftRightArithmetic.Int16.1.cs | 13 ++++--------- .../X86/Avx2/ShiftRightArithmetic.Int16.16.cs | 13 ++++--------- .../X86/Avx2/ShiftRightArithmetic.Int32.1.cs | 13 ++++--------- .../X86/Avx2/ShiftRightArithmetic.Int32.32.cs | 13 ++++--------- .../X86/Avx2/ShiftRightLogical.Int16.1.cs | 13 ++++--------- .../X86/Avx2/ShiftRightLogical.Int16.16.cs | 13 ++++--------- .../X86/Avx2/ShiftRightLogical.Int32.1.cs | 13 ++++--------- .../X86/Avx2/ShiftRightLogical.Int32.32.cs | 13 ++++--------- .../X86/Avx2/ShiftRightLogical.Int64.1.cs | 13 ++++--------- .../X86/Avx2/ShiftRightLogical.Int64.64.cs | 13 ++++--------- .../X86/Avx2/ShiftRightLogical.UInt16.1.cs | 13 ++++--------- .../X86/Avx2/ShiftRightLogical.UInt16.16.cs | 13 ++++--------- .../X86/Avx2/ShiftRightLogical.UInt32.1.cs | 13 ++++--------- .../X86/Avx2/ShiftRightLogical.UInt32.32.cs | 13 ++++--------- .../X86/Avx2/ShiftRightLogical.UInt64.1.cs | 13 ++++--------- .../X86/Avx2/ShiftRightLogical.UInt64.64.cs | 13 ++++--------- .../X86/Avx2/ShiftRightLogical128BitLane.Byte.1.cs | 5 ----- .../X86/Avx2/ShiftRightLogical128BitLane.Int16.1.cs | 5 ----- .../X86/Avx2/ShiftRightLogical128BitLane.Int32.1.cs | 5 ----- .../X86/Avx2/ShiftRightLogical128BitLane.Int64.1.cs | 5 ----- .../X86/Avx2/ShiftRightLogical128BitLane.SByte.1.cs | 5 ----- .../Avx2/ShiftRightLogical128BitLane.UInt16.1.cs | 5 ----- .../Avx2/ShiftRightLogical128BitLane.UInt32.1.cs | 5 ----- .../Avx2/ShiftRightLogical128BitLane.UInt64.1.cs | 5 ----- .../HardwareIntrinsics/X86/Avx2/Subtract.Byte.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Avx2/Subtract.Int16.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Avx2/Subtract.Int32.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Avx2/Subtract.Int64.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Avx2/Subtract.SByte.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Avx2/Subtract.UInt16.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Avx2/Subtract.UInt32.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Avx2/Subtract.UInt64.cs | 21 ++++++++------------- .../src/JIT/HardwareIntrinsics/X86/Avx2/Xor.Byte.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx2/Xor.Int16.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx2/Xor.Int32.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx2/Xor.Int64.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx2/Xor.SByte.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx2/Xor.UInt16.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx2/Xor.UInt32.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Avx2/Xor.UInt64.cs | 21 ++++++++------------- .../X86/Avx2_Vector128/Blend.Int32.1.cs | 21 ++++++++------------- .../X86/Avx2_Vector128/Blend.Int32.2.cs | 21 ++++++++------------- .../X86/Avx2_Vector128/Blend.Int32.4.cs | 21 ++++++++------------- .../X86/Avx2_Vector128/Blend.Int32.85.cs | 21 ++++++++------------- .../X86/Avx2_Vector128/Blend.UInt32.1.cs | 21 ++++++++------------- .../X86/Avx2_Vector128/Blend.UInt32.2.cs | 21 ++++++++------------- .../X86/Avx2_Vector128/Blend.UInt32.4.cs | 21 ++++++++------------- .../X86/Avx2_Vector128/Blend.UInt32.85.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Bmi1/AndNot.UInt32.cs | 20 ++++++++------------ .../HardwareIntrinsics/X86/Bmi1/AndNot.UInt64.cs | 20 ++++++++------------ .../X86/Bmi1/ExtractLowestSetBit.UInt32.cs | 11 ++++------- .../X86/Bmi1/ExtractLowestSetBit.UInt64.cs | 11 ++++------- .../X86/Bmi1/GetMaskUpToLowestSetBit.UInt32.cs | 11 ++++------- .../X86/Bmi1/GetMaskUpToLowestSetBit.UInt64.cs | 11 ++++------- .../X86/Bmi1/ResetLowestSetBit.UInt32.cs | 11 ++++------- .../X86/Bmi1/ResetLowestSetBit.UInt64.cs | 11 ++++------- .../X86/Bmi1/TrailingZeroCount.UInt32.cs | 11 ++++------- .../X86/Bmi1/TrailingZeroCount.UInt64.cs | 11 ++++------- .../X86/Bmi2/ParallelBitDeposit.UInt32.cs | 20 ++++++++------------ .../X86/Bmi2/ParallelBitDeposit.UInt64.cs | 20 ++++++++------------ .../X86/Bmi2/ParallelBitExtract.UInt32.cs | 20 ++++++++------------ .../X86/Bmi2/ParallelBitExtract.UInt64.cs | 20 ++++++++------------ .../X86/Fma_Vector128/MultiplyAdd.Double.cs | 5 ----- .../X86/Fma_Vector128/MultiplyAdd.Single.cs | 5 ----- .../X86/Fma_Vector128/MultiplyAddNegated.Double.cs | 5 ----- .../X86/Fma_Vector128/MultiplyAddNegated.Single.cs | 5 ----- .../MultiplyAddNegatedScalar.Double.cs | 5 ----- .../MultiplyAddNegatedScalar.Single.cs | 5 ----- .../X86/Fma_Vector128/MultiplyAddScalar.Double.cs | 5 ----- .../X86/Fma_Vector128/MultiplyAddScalar.Single.cs | 5 ----- .../X86/Fma_Vector128/MultiplyAddSubtract.Double.cs | 5 ----- .../X86/Fma_Vector128/MultiplyAddSubtract.Single.cs | 5 ----- .../X86/Fma_Vector128/MultiplySubtract.Double.cs | 5 ----- .../X86/Fma_Vector128/MultiplySubtract.Single.cs | 5 ----- .../X86/Fma_Vector128/MultiplySubtractAdd.Double.cs | 5 ----- .../X86/Fma_Vector128/MultiplySubtractAdd.Single.cs | 5 ----- .../Fma_Vector128/MultiplySubtractNegated.Double.cs | 5 ----- .../Fma_Vector128/MultiplySubtractNegated.Single.cs | 5 ----- .../MultiplySubtractNegatedScalar.Double.cs | 5 ----- .../MultiplySubtractNegatedScalar.Single.cs | 5 ----- .../Fma_Vector128/MultiplySubtractScalar.Double.cs | 5 ----- .../Fma_Vector128/MultiplySubtractScalar.Single.cs | 5 ----- .../X86/Fma_Vector256/MultiplyAdd.Double.cs | 5 ----- .../X86/Fma_Vector256/MultiplyAdd.Single.cs | 5 ----- .../X86/Fma_Vector256/MultiplyAddNegated.Double.cs | 5 ----- .../X86/Fma_Vector256/MultiplyAddNegated.Single.cs | 5 ----- .../X86/Fma_Vector256/MultiplyAddSubtract.Double.cs | 5 ----- .../X86/Fma_Vector256/MultiplyAddSubtract.Single.cs | 5 ----- .../X86/Fma_Vector256/MultiplySubtract.Double.cs | 5 ----- .../X86/Fma_Vector256/MultiplySubtract.Single.cs | 5 ----- .../X86/Fma_Vector256/MultiplySubtractAdd.Double.cs | 5 ----- .../X86/Fma_Vector256/MultiplySubtractAdd.Single.cs | 5 ----- .../Fma_Vector256/MultiplySubtractNegated.Double.cs | 5 ----- .../Fma_Vector256/MultiplySubtractNegated.Single.cs | 5 ----- .../JIT/HardwareIntrinsics/X86/Sse/Add.Single.cs | 5 ----- .../HardwareIntrinsics/X86/Sse/AddScalar.Single.cs | 5 ----- .../JIT/HardwareIntrinsics/X86/Sse/And.Single.cs | 5 ----- .../JIT/HardwareIntrinsics/X86/Sse/AndNot.Single.cs | 5 ----- .../X86/Sse/CompareEqual.Single.cs | 5 ----- .../X86/Sse/CompareEqualOrderedScalar.Boolean.cs | 5 ----- .../X86/Sse/CompareEqualScalar.Single.cs | 5 ----- .../X86/Sse/CompareEqualUnorderedScalar.Boolean.cs | 5 ----- .../X86/Sse/CompareGreaterThan.Single.cs | 5 ----- .../X86/Sse/CompareGreaterThanOrEqual.Single.cs | 5 ----- ...ompareGreaterThanOrEqualOrderedScalar.Boolean.cs | 5 ----- .../Sse/CompareGreaterThanOrEqualScalar.Single.cs | 5 ----- ...pareGreaterThanOrEqualUnorderedScalar.Boolean.cs | 5 ----- .../Sse/CompareGreaterThanOrderedScalar.Boolean.cs | 5 ----- .../X86/Sse/CompareGreaterThanScalar.Single.cs | 5 ----- .../CompareGreaterThanUnorderedScalar.Boolean.cs | 5 ----- .../X86/Sse/CompareLessThan.Single.cs | 5 ----- .../X86/Sse/CompareLessThanOrEqual.Single.cs | 5 ----- .../CompareLessThanOrEqualOrderedScalar.Boolean.cs | 5 ----- .../X86/Sse/CompareLessThanOrEqualScalar.Single.cs | 5 ----- ...CompareLessThanOrEqualUnorderedScalar.Boolean.cs | 5 ----- .../X86/Sse/CompareLessThanOrderedScalar.Boolean.cs | 5 ----- .../X86/Sse/CompareLessThanScalar.Single.cs | 5 ----- .../Sse/CompareLessThanUnorderedScalar.Boolean.cs | 5 ----- .../X86/Sse/CompareNotEqual.Single.cs | 5 ----- .../X86/Sse/CompareNotEqualOrderedScalar.Boolean.cs | 5 ----- .../X86/Sse/CompareNotEqualScalar.Single.cs | 5 ----- .../Sse/CompareNotEqualUnorderedScalar.Boolean.cs | 5 ----- .../X86/Sse/CompareNotGreaterThan.Single.cs | 5 ----- .../X86/Sse/CompareNotGreaterThanOrEqual.Single.cs | 5 ----- .../CompareNotGreaterThanOrEqualScalar.Single.cs | 5 ----- .../X86/Sse/CompareNotGreaterThanScalar.Single.cs | 5 ----- .../X86/Sse/CompareNotLessThan.Single.cs | 5 ----- .../X86/Sse/CompareNotLessThanOrEqual.Single.cs | 5 ----- .../Sse/CompareNotLessThanOrEqualScalar.Single.cs | 5 ----- .../X86/Sse/CompareNotLessThanScalar.Single.cs | 5 ----- .../X86/Sse/CompareOrdered.Single.cs | 5 ----- .../X86/Sse/CompareOrderedScalar.Single.cs | 5 ----- .../X86/Sse/CompareUnordered.Single.cs | 5 ----- .../X86/Sse/CompareUnorderedScalar.Single.cs | 5 ----- .../JIT/HardwareIntrinsics/X86/Sse/Divide.Single.cs | 5 ----- .../X86/Sse/DivideScalar.Single.cs | 5 ----- .../JIT/HardwareIntrinsics/X86/Sse/Max.Single.cs | 5 ----- .../HardwareIntrinsics/X86/Sse/MaxScalar.Single.cs | 5 ----- .../JIT/HardwareIntrinsics/X86/Sse/Min.Single.cs | 5 ----- .../HardwareIntrinsics/X86/Sse/MinScalar.Single.cs | 5 ----- .../HardwareIntrinsics/X86/Sse/Multiply.Single.cs | 5 ----- .../X86/Sse/MultiplyScalar.Single.cs | 5 ----- .../src/JIT/HardwareIntrinsics/X86/Sse/Or.Single.cs | 5 ----- .../HardwareIntrinsics/X86/Sse/Subtract.Single.cs | 5 ----- .../X86/Sse/SubtractScalar.Single.cs | 5 ----- .../JIT/HardwareIntrinsics/X86/Sse/Xor.Single.cs | 5 ----- .../src/JIT/HardwareIntrinsics/X86/Sse2/Add.Byte.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Sse2/Add.Double.cs | 5 ----- .../JIT/HardwareIntrinsics/X86/Sse2/Add.Int16.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Sse2/Add.Int32.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Sse2/Add.Int64.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Sse2/Add.SByte.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Sse2/Add.UInt16.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Sse2/Add.UInt32.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Sse2/Add.UInt64.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Sse2/AddSaturate.Byte.cs | 21 ++++++++------------- .../X86/Sse2/AddSaturate.Int16.cs | 21 ++++++++------------- .../X86/Sse2/AddSaturate.SByte.cs | 21 ++++++++------------- .../X86/Sse2/AddSaturate.UInt16.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Sse2/AddScalar.Double.cs | 5 ----- .../src/JIT/HardwareIntrinsics/X86/Sse2/And.Byte.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Sse2/And.Double.cs | 5 ----- .../JIT/HardwareIntrinsics/X86/Sse2/And.Int16.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Sse2/And.Int32.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Sse2/And.Int64.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Sse2/And.SByte.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Sse2/And.UInt16.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Sse2/And.UInt32.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Sse2/And.UInt64.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Sse2/AndNot.Byte.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Sse2/AndNot.Double.cs | 5 ----- .../JIT/HardwareIntrinsics/X86/Sse2/AndNot.Int16.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Sse2/AndNot.Int32.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Sse2/AndNot.Int64.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Sse2/AndNot.SByte.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Sse2/AndNot.UInt16.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Sse2/AndNot.UInt32.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Sse2/AndNot.UInt64.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Sse2/Average.Byte.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Sse2/Average.UInt16.cs | 21 ++++++++------------- .../X86/Sse2/CompareEqual.Byte.cs | 21 ++++++++------------- .../X86/Sse2/CompareEqual.Double.cs | 5 ----- .../X86/Sse2/CompareEqual.Int16.cs | 21 ++++++++------------- .../X86/Sse2/CompareEqual.Int32.cs | 21 ++++++++------------- .../X86/Sse2/CompareEqual.SByte.cs | 21 ++++++++------------- .../X86/Sse2/CompareEqual.UInt16.cs | 21 ++++++++------------- .../X86/Sse2/CompareEqual.UInt32.cs | 21 ++++++++------------- .../X86/Sse2/CompareGreaterThan.Double.cs | 5 ----- .../X86/Sse2/CompareGreaterThan.Int16.cs | 21 ++++++++------------- .../X86/Sse2/CompareGreaterThan.Int32.cs | 21 ++++++++------------- .../X86/Sse2/CompareGreaterThan.SByte.cs | 21 ++++++++------------- .../X86/Sse2/CompareGreaterThanOrEqual.Double.cs | 5 ----- .../X86/Sse2/CompareLessThan.Double.cs | 5 ----- .../X86/Sse2/CompareLessThan.Int16.cs | 21 ++++++++------------- .../X86/Sse2/CompareLessThan.Int32.cs | 21 ++++++++------------- .../X86/Sse2/CompareLessThan.SByte.cs | 21 ++++++++------------- .../X86/Sse2/CompareLessThanOrEqual.Double.cs | 5 ----- .../X86/Sse2/CompareNotEqual.Double.cs | 5 ----- .../X86/Sse2/CompareNotGreaterThan.Double.cs | 5 ----- .../X86/Sse2/CompareNotGreaterThanOrEqual.Double.cs | 5 ----- .../X86/Sse2/CompareNotLessThan.Double.cs | 5 ----- .../X86/Sse2/CompareNotLessThanOrEqual.Double.cs | 5 ----- .../X86/Sse2/CompareOrdered.Double.cs | 5 ----- .../X86/Sse2/CompareUnordered.Double.cs | 5 ----- .../HardwareIntrinsics/X86/Sse2/Divide.Double.cs | 5 ----- .../X86/Sse2/DivideScalar.Double.cs | 5 ----- .../HardwareIntrinsics/X86/Sse2/Extract.UInt16.1.cs | 13 ++++--------- .../X86/Sse2/Extract.UInt16.129.cs | 13 ++++--------- .../HardwareIntrinsics/X86/Sse2/Insert.Int16.1.cs | 5 ----- .../HardwareIntrinsics/X86/Sse2/Insert.Int16.129.cs | 5 ----- .../HardwareIntrinsics/X86/Sse2/Insert.UInt16.1.cs | 5 ----- .../X86/Sse2/Insert.UInt16.129.cs | 5 ----- .../src/JIT/HardwareIntrinsics/X86/Sse2/Max.Byte.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Sse2/Max.Double.cs | 5 ----- .../JIT/HardwareIntrinsics/X86/Sse2/Max.Int16.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Sse2/MaxScalar.Double.cs | 5 ----- .../src/JIT/HardwareIntrinsics/X86/Sse2/Min.Byte.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Sse2/Min.Double.cs | 5 ----- .../JIT/HardwareIntrinsics/X86/Sse2/Min.Int16.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Sse2/MinScalar.Double.cs | 5 ----- .../HardwareIntrinsics/X86/Sse2/Multiply.Double.cs | 5 ----- .../X86/Sse2/MultiplyScalar.Double.cs | 5 ----- .../src/JIT/HardwareIntrinsics/X86/Sse2/Or.Byte.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Sse2/Or.Double.cs | 5 ----- .../src/JIT/HardwareIntrinsics/X86/Sse2/Or.Int16.cs | 21 ++++++++------------- .../src/JIT/HardwareIntrinsics/X86/Sse2/Or.Int32.cs | 21 ++++++++------------- .../src/JIT/HardwareIntrinsics/X86/Sse2/Or.Int64.cs | 21 ++++++++------------- .../src/JIT/HardwareIntrinsics/X86/Sse2/Or.SByte.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Sse2/Or.UInt16.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Sse2/Or.UInt32.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Sse2/Or.UInt64.cs | 21 ++++++++------------- .../X86/Sse2/SetAllVector128.Byte.cs | 11 ++++------- .../X86/Sse2/SetAllVector128.Double.cs | 3 --- .../X86/Sse2/SetAllVector128.Int16.cs | 11 ++++------- .../X86/Sse2/SetAllVector128.Int32.cs | 11 ++++------- .../X86/Sse2/SetAllVector128.Int64.cs | 11 ++++------- .../X86/Sse2/SetAllVector128.SByte.cs | 11 ++++------- .../X86/Sse2/SetAllVector128.UInt16.cs | 11 ++++------- .../X86/Sse2/SetAllVector128.UInt32.cs | 11 ++++------- .../X86/Sse2/SetAllVector128.UInt64.cs | 11 ++++------- .../X86/Sse2/ShiftLeftLogical.Int16.1.cs | 13 ++++--------- .../X86/Sse2/ShiftLeftLogical.Int16.16.cs | 13 ++++--------- .../X86/Sse2/ShiftLeftLogical.Int32.1.cs | 13 ++++--------- .../X86/Sse2/ShiftLeftLogical.Int32.32.cs | 13 ++++--------- .../X86/Sse2/ShiftLeftLogical.Int64.1.cs | 13 ++++--------- .../X86/Sse2/ShiftLeftLogical.Int64.64.cs | 13 ++++--------- .../X86/Sse2/ShiftLeftLogical.UInt16.1.cs | 13 ++++--------- .../X86/Sse2/ShiftLeftLogical.UInt16.16.cs | 13 ++++--------- .../X86/Sse2/ShiftLeftLogical.UInt32.1.cs | 13 ++++--------- .../X86/Sse2/ShiftLeftLogical.UInt32.32.cs | 13 ++++--------- .../X86/Sse2/ShiftLeftLogical.UInt64.1.cs | 13 ++++--------- .../X86/Sse2/ShiftLeftLogical.UInt64.64.cs | 13 ++++--------- .../X86/Sse2/ShiftLeftLogical128BitLane.Byte.1.cs | 5 ----- .../X86/Sse2/ShiftLeftLogical128BitLane.Int16.1.cs | 5 ----- .../X86/Sse2/ShiftLeftLogical128BitLane.Int32.1.cs | 5 ----- .../X86/Sse2/ShiftLeftLogical128BitLane.Int64.1.cs | 5 ----- .../X86/Sse2/ShiftLeftLogical128BitLane.SByte.1.cs | 5 ----- .../X86/Sse2/ShiftLeftLogical128BitLane.UInt16.1.cs | 5 ----- .../X86/Sse2/ShiftLeftLogical128BitLane.UInt32.1.cs | 5 ----- .../X86/Sse2/ShiftLeftLogical128BitLane.UInt64.1.cs | 5 ----- .../X86/Sse2/ShiftRightArithmetic.Int16.1.cs | 13 ++++--------- .../X86/Sse2/ShiftRightArithmetic.Int16.16.cs | 13 ++++--------- .../X86/Sse2/ShiftRightArithmetic.Int32.1.cs | 13 ++++--------- .../X86/Sse2/ShiftRightArithmetic.Int32.32.cs | 13 ++++--------- .../X86/Sse2/ShiftRightLogical.Int16.1.cs | 13 ++++--------- .../X86/Sse2/ShiftRightLogical.Int16.16.cs | 13 ++++--------- .../X86/Sse2/ShiftRightLogical.Int32.1.cs | 13 ++++--------- .../X86/Sse2/ShiftRightLogical.Int32.32.cs | 13 ++++--------- .../X86/Sse2/ShiftRightLogical.Int64.1.cs | 13 ++++--------- .../X86/Sse2/ShiftRightLogical.Int64.64.cs | 13 ++++--------- .../X86/Sse2/ShiftRightLogical.UInt16.1.cs | 13 ++++--------- .../X86/Sse2/ShiftRightLogical.UInt16.16.cs | 13 ++++--------- .../X86/Sse2/ShiftRightLogical.UInt32.1.cs | 13 ++++--------- .../X86/Sse2/ShiftRightLogical.UInt32.32.cs | 13 ++++--------- .../X86/Sse2/ShiftRightLogical.UInt64.1.cs | 13 ++++--------- .../X86/Sse2/ShiftRightLogical.UInt64.64.cs | 13 ++++--------- .../X86/Sse2/ShiftRightLogical128BitLane.Byte.1.cs | 5 ----- .../X86/Sse2/ShiftRightLogical128BitLane.Int16.1.cs | 5 ----- .../X86/Sse2/ShiftRightLogical128BitLane.Int32.1.cs | 5 ----- .../X86/Sse2/ShiftRightLogical128BitLane.Int64.1.cs | 5 ----- .../X86/Sse2/ShiftRightLogical128BitLane.SByte.1.cs | 5 ----- .../Sse2/ShiftRightLogical128BitLane.UInt16.1.cs | 5 ----- .../Sse2/ShiftRightLogical128BitLane.UInt32.1.cs | 5 ----- .../Sse2/ShiftRightLogical128BitLane.UInt64.1.cs | 5 ----- .../HardwareIntrinsics/X86/Sse2/Subtract.Byte.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Sse2/Subtract.Double.cs | 5 ----- .../HardwareIntrinsics/X86/Sse2/Subtract.Int16.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Sse2/Subtract.Int32.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Sse2/Subtract.Int64.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Sse2/Subtract.SByte.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Sse2/Subtract.UInt16.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Sse2/Subtract.UInt32.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Sse2/Subtract.UInt64.cs | 21 ++++++++------------- .../X86/Sse2/SubtractSaturate.Byte.cs | 21 ++++++++------------- .../X86/Sse2/SubtractSaturate.Int16.cs | 21 ++++++++------------- .../X86/Sse2/SubtractSaturate.SByte.cs | 21 ++++++++------------- .../X86/Sse2/SubtractSaturate.UInt16.cs | 21 ++++++++------------- .../X86/Sse2/SubtractScalar.Double.cs | 5 ----- .../src/JIT/HardwareIntrinsics/X86/Sse2/Xor.Byte.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Sse2/Xor.Double.cs | 5 ----- .../JIT/HardwareIntrinsics/X86/Sse2/Xor.Int16.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Sse2/Xor.Int32.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Sse2/Xor.Int64.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Sse2/Xor.SByte.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Sse2/Xor.UInt16.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Sse2/Xor.UInt32.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Sse2/Xor.UInt64.cs | 21 ++++++++------------- .../X86/Sse3/AddSubtract.Double.cs | 5 ----- .../X86/Sse3/AddSubtract.Single.cs | 5 ----- .../X86/Sse3/HorizontalAdd.Double.cs | 5 ----- .../X86/Sse3/HorizontalAdd.Single.cs | 5 ----- .../X86/Sse3/HorizontalSubtract.Double.cs | 5 ----- .../X86/Sse3/HorizontalSubtract.Single.cs | 5 ----- .../X86/Sse41/BlendVariable.Byte.cs | 21 ++++++++------------- .../X86/Sse41/BlendVariable.Double.cs | 5 ----- .../X86/Sse41/BlendVariable.SByte.cs | 21 ++++++++------------- .../X86/Sse41/BlendVariable.Single.cs | 5 ----- .../HardwareIntrinsics/X86/Sse41/Ceiling.Double.cs | 5 ----- .../HardwareIntrinsics/X86/Sse41/Ceiling.Single.cs | 5 ----- .../X86/Sse41/CeilingScalar.Double.cs | 5 ----- .../X86/Sse41/CeilingScalar.Single.cs | 5 ----- .../X86/Sse41/CompareEqual.Int64.cs | 21 ++++++++------------- .../X86/Sse41/CompareEqual.UInt64.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Sse41/Extract.Byte.1.cs | 13 ++++--------- .../X86/Sse41/Extract.Byte.129.cs | 13 ++++--------- .../HardwareIntrinsics/X86/Sse41/Extract.Int32.1.cs | 13 ++++--------- .../X86/Sse41/Extract.Int32.129.cs | 13 ++++--------- .../HardwareIntrinsics/X86/Sse41/Extract.Int64.1.cs | 13 ++++--------- .../X86/Sse41/Extract.Int64.129.cs | 13 ++++--------- .../X86/Sse41/Extract.Single.1.cs | 5 ----- .../X86/Sse41/Extract.Single.129.cs | 5 ----- .../X86/Sse41/Extract.UInt32.1.cs | 13 ++++--------- .../X86/Sse41/Extract.UInt32.129.cs | 13 ++++--------- .../X86/Sse41/Extract.UInt64.1.cs | 13 ++++--------- .../X86/Sse41/Extract.UInt64.129.cs | 13 ++++--------- .../HardwareIntrinsics/X86/Sse41/Floor.Double.cs | 5 ----- .../HardwareIntrinsics/X86/Sse41/Floor.Single.cs | 5 ----- .../X86/Sse41/FloorScalar.Double.cs | 5 ----- .../X86/Sse41/FloorScalar.Single.cs | 5 ----- .../HardwareIntrinsics/X86/Sse41/Insert.Byte.1.cs | 13 ++++--------- .../HardwareIntrinsics/X86/Sse41/Insert.Byte.129.cs | 13 ++++--------- .../HardwareIntrinsics/X86/Sse41/Insert.Int32.1.cs | 13 ++++--------- .../X86/Sse41/Insert.Int32.129.cs | 13 ++++--------- .../HardwareIntrinsics/X86/Sse41/Insert.Int64.1.cs | 13 ++++--------- .../X86/Sse41/Insert.Int64.129.cs | 13 ++++--------- .../HardwareIntrinsics/X86/Sse41/Insert.SByte.1.cs | 13 ++++--------- .../X86/Sse41/Insert.SByte.129.cs | 13 ++++--------- .../HardwareIntrinsics/X86/Sse41/Insert.Single.0.cs | 5 ----- .../HardwareIntrinsics/X86/Sse41/Insert.Single.1.cs | 5 ----- .../X86/Sse41/Insert.Single.128.cs | 5 ----- .../X86/Sse41/Insert.Single.129.cs | 5 ----- .../X86/Sse41/Insert.Single.16.cs | 5 ----- .../X86/Sse41/Insert.Single.192.cs | 5 ----- .../HardwareIntrinsics/X86/Sse41/Insert.Single.2.cs | 5 ----- .../X86/Sse41/Insert.Single.32.cs | 5 ----- .../HardwareIntrinsics/X86/Sse41/Insert.Single.4.cs | 5 ----- .../X86/Sse41/Insert.Single.48.cs | 5 ----- .../X86/Sse41/Insert.Single.64.cs | 5 ----- .../HardwareIntrinsics/X86/Sse41/Insert.Single.8.cs | 5 ----- .../HardwareIntrinsics/X86/Sse41/Insert.UInt32.1.cs | 13 ++++--------- .../X86/Sse41/Insert.UInt32.129.cs | 13 ++++--------- .../HardwareIntrinsics/X86/Sse41/Insert.UInt64.1.cs | 13 ++++--------- .../X86/Sse41/Insert.UInt64.129.cs | 13 ++++--------- .../JIT/HardwareIntrinsics/X86/Sse41/Max.Int32.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Sse41/Max.SByte.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Sse41/Max.UInt16.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Sse41/Max.UInt32.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Sse41/Min.Int32.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Sse41/Min.SByte.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Sse41/Min.UInt16.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Sse41/Min.UInt32.cs | 21 ++++++++------------- .../X86/Sse41/MultiplyLow.Int32.cs | 21 ++++++++------------- .../X86/Sse41/PackUnsignedSaturate.UInt16.cs | 21 ++++++++------------- .../X86/Sse41/RoundCurrentDirection.Double.cs | 5 ----- .../X86/Sse41/RoundCurrentDirection.Single.cs | 5 ----- .../X86/Sse41/RoundCurrentDirectionScalar.Double.cs | 5 ----- .../X86/Sse41/RoundCurrentDirectionScalar.Single.cs | 5 ----- .../X86/Sse41/RoundToNearestInteger.Double.cs | 5 ----- .../X86/Sse41/RoundToNearestInteger.Single.cs | 5 ----- .../X86/Sse41/RoundToNearestIntegerScalar.Double.cs | 5 ----- .../X86/Sse41/RoundToNearestIntegerScalar.Single.cs | 5 ----- .../X86/Sse41/RoundToNegativeInfinity.Double.cs | 5 ----- .../X86/Sse41/RoundToNegativeInfinity.Single.cs | 5 ----- .../Sse41/RoundToNegativeInfinityScalar.Double.cs | 5 ----- .../Sse41/RoundToNegativeInfinityScalar.Single.cs | 5 ----- .../X86/Sse41/RoundToPositiveInfinity.Double.cs | 5 ----- .../X86/Sse41/RoundToPositiveInfinity.Single.cs | 5 ----- .../Sse41/RoundToPositiveInfinityScalar.Double.cs | 5 ----- .../Sse41/RoundToPositiveInfinityScalar.Single.cs | 5 ----- .../X86/Sse41/RoundToZero.Double.cs | 5 ----- .../X86/Sse41/RoundToZero.Single.cs | 5 ----- .../X86/Sse41/RoundToZeroScalar.Double.cs | 5 ----- .../X86/Sse41/RoundToZeroScalar.Single.cs | 5 ----- .../X86/Sse41/TestAllOnes.Byte.cs | 13 ++++--------- .../X86/Sse41/TestAllOnes.Int16.cs | 13 ++++--------- .../X86/Sse41/TestAllOnes.Int32.cs | 13 ++++--------- .../X86/Sse41/TestAllOnes.Int64.cs | 13 ++++--------- .../X86/Sse41/TestAllOnes.SByte.cs | 13 ++++--------- .../X86/Sse41/TestAllOnes.UInt16.cs | 13 ++++--------- .../X86/Sse41/TestAllOnes.UInt32.cs | 13 ++++--------- .../X86/Sse41/TestAllOnes.UInt64.cs | 13 ++++--------- .../X86/Sse41/TestAllZeros.Byte.cs | 21 ++++++++------------- .../X86/Sse41/TestAllZeros.Int16.cs | 21 ++++++++------------- .../X86/Sse41/TestAllZeros.Int32.cs | 21 ++++++++------------- .../X86/Sse41/TestAllZeros.Int64.cs | 21 ++++++++------------- .../X86/Sse41/TestAllZeros.SByte.cs | 21 ++++++++------------- .../X86/Sse41/TestAllZeros.UInt16.cs | 21 ++++++++------------- .../X86/Sse41/TestAllZeros.UInt32.cs | 21 ++++++++------------- .../X86/Sse41/TestAllZeros.UInt64.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Sse41/TestC.Byte.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Sse41/TestC.Int16.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Sse41/TestC.Int32.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Sse41/TestC.Int64.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Sse41/TestC.SByte.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Sse41/TestC.UInt16.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Sse41/TestC.UInt32.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Sse41/TestC.UInt64.cs | 21 ++++++++------------- .../X86/Sse41/TestMixOnesZeros.Byte.cs | 21 ++++++++------------- .../X86/Sse41/TestMixOnesZeros.Int16.cs | 21 ++++++++------------- .../X86/Sse41/TestMixOnesZeros.Int32.cs | 21 ++++++++------------- .../X86/Sse41/TestMixOnesZeros.Int64.cs | 21 ++++++++------------- .../X86/Sse41/TestMixOnesZeros.SByte.cs | 21 ++++++++------------- .../X86/Sse41/TestMixOnesZeros.UInt16.cs | 21 ++++++++------------- .../X86/Sse41/TestMixOnesZeros.UInt32.cs | 21 ++++++++------------- .../X86/Sse41/TestMixOnesZeros.UInt64.cs | 21 ++++++++------------- .../X86/Sse41/TestNotZAndNotC.Byte.cs | 21 ++++++++------------- .../X86/Sse41/TestNotZAndNotC.Int16.cs | 21 ++++++++------------- .../X86/Sse41/TestNotZAndNotC.Int32.cs | 21 ++++++++------------- .../X86/Sse41/TestNotZAndNotC.Int64.cs | 21 ++++++++------------- .../X86/Sse41/TestNotZAndNotC.SByte.cs | 21 ++++++++------------- .../X86/Sse41/TestNotZAndNotC.UInt16.cs | 21 ++++++++------------- .../X86/Sse41/TestNotZAndNotC.UInt32.cs | 21 ++++++++------------- .../X86/Sse41/TestNotZAndNotC.UInt64.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Sse41/TestZ.Byte.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Sse41/TestZ.Int16.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Sse41/TestZ.Int32.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Sse41/TestZ.Int64.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Sse41/TestZ.SByte.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Sse41/TestZ.UInt16.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Sse41/TestZ.UInt32.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Sse41/TestZ.UInt64.cs | 21 ++++++++------------- .../X86/Sse42/CompareGreaterThan.Int64.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Ssse3/Abs.Byte.cs | 13 ++++--------- .../JIT/HardwareIntrinsics/X86/Ssse3/Abs.UInt16.cs | 13 ++++--------- .../JIT/HardwareIntrinsics/X86/Ssse3/Abs.UInt32.cs | 13 ++++--------- .../X86/Ssse3/HorizontalAdd.Int16.cs | 21 ++++++++------------- .../X86/Ssse3/HorizontalAdd.Int32.cs | 21 ++++++++------------- .../X86/Ssse3/HorizontalAddSaturate.Int16.cs | 21 ++++++++------------- .../X86/Ssse3/HorizontalSubtract.Int16.cs | 21 ++++++++------------- .../X86/Ssse3/HorizontalSubtract.Int32.cs | 21 ++++++++------------- .../X86/Ssse3/HorizontalSubtractSaturate.Int16.cs | 21 ++++++++------------- .../X86/Ssse3/MultiplyAddAdjacent.Int16.cs | 21 ++++++++------------- .../X86/Ssse3/MultiplyHighRoundScale.Int16.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Ssse3/Shuffle.Byte.cs | 21 ++++++++------------- .../HardwareIntrinsics/X86/Ssse3/Shuffle.SByte.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Ssse3/Sign.Int16.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Ssse3/Sign.Int32.cs | 21 ++++++++------------- .../JIT/HardwareIntrinsics/X86/Ssse3/Sign.SByte.cs | 21 ++++++++------------- 773 files changed, 3165 insertions(+), 6985 deletions(-) diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Add.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Add.Double.cs index 4d648e1..972a8ef 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Add.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Add.Double.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AddDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Add.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Add.Single.cs index 9b7ac2e..a57ea12 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Add.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Add.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AddSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/AddSubtract.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/AddSubtract.Double.cs index ba56dee..6112638 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/AddSubtract.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/AddSubtract.Double.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AddSubtractDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/AddSubtract.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/AddSubtract.Single.cs index 4026a1d..8b2d001 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/AddSubtract.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/AddSubtract.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AddSubtractSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/And.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/And.Double.cs index bc130ec..ffbe1d4 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/And.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/And.Double.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AndDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/And.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/And.Single.cs index c2fa2b8..2d7c88e 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/And.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/And.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AndSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/AndNot.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/AndNot.Double.cs index fb1a2f2..1e5f154 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/AndNot.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/AndNot.Double.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AndNotDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/AndNot.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/AndNot.Single.cs index 813b162..02db725 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/AndNot.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/AndNot.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AndNotSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/BlendVariable.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/BlendVariable.Double.cs index ba67d05..76f1d38 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/BlendVariable.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/BlendVariable.Double.cs @@ -100,7 +100,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -144,8 +143,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleTernaryOpTest__BlendVariableDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -158,8 +155,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/BlendVariable.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/BlendVariable.Single.cs index 46c9c89..48650b02 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/BlendVariable.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/BlendVariable.Single.cs @@ -100,7 +100,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -144,8 +143,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleTernaryOpTest__BlendVariableSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -158,8 +155,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Ceiling.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Ceiling.Double.cs index b1246f3..851f0f2 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Ceiling.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Ceiling.Double.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleUnaryOpTest__CeilingDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Ceiling.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Ceiling.Single.cs index 4d0a57a..7ac905a 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Ceiling.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Ceiling.Single.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleUnaryOpTest__CeilingSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Divide.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Divide.Double.cs index 69ec215..ce07394 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Divide.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Divide.Double.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__DivideDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Divide.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Divide.Single.cs index e655830..53e2607 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Divide.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Divide.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__DivideSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/DuplicateEvenIndexed.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/DuplicateEvenIndexed.Double.cs index 38db122..700ea19 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/DuplicateEvenIndexed.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/DuplicateEvenIndexed.Double.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleUnaryOpTest__DuplicateEvenIndexedDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/DuplicateEvenIndexed.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/DuplicateEvenIndexed.Single.cs index 6456172..a309934 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/DuplicateEvenIndexed.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/DuplicateEvenIndexed.Single.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleUnaryOpTest__DuplicateEvenIndexedSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/DuplicateOddIndexed.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/DuplicateOddIndexed.Single.cs index 254529e..eb66649 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/DuplicateOddIndexed.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/DuplicateOddIndexed.Single.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleUnaryOpTest__DuplicateOddIndexedSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtendToVector256.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtendToVector256.Byte.cs index 6e5f4ca..7b265c0 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtendToVector256.Byte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtendToVector256.Byte.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static GenericUnaryOpTest__ExtendToVector256Byte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Byte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtendToVector256.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtendToVector256.Double.cs index d97ff26..83659d3 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtendToVector256.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtendToVector256.Double.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static GenericUnaryOpTest__ExtendToVector256Double() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtendToVector256.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtendToVector256.Int16.cs index 75afe0e..e4e2705 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtendToVector256.Int16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtendToVector256.Int16.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static GenericUnaryOpTest__ExtendToVector256Int16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtendToVector256.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtendToVector256.Int32.cs index abd61f9..107a429 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtendToVector256.Int32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtendToVector256.Int32.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static GenericUnaryOpTest__ExtendToVector256Int32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtendToVector256.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtendToVector256.Int64.cs index eee52e65..91e0f99 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtendToVector256.Int64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtendToVector256.Int64.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static GenericUnaryOpTest__ExtendToVector256Int64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtendToVector256.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtendToVector256.SByte.cs index a89310e..c496972 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtendToVector256.SByte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtendToVector256.SByte.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static GenericUnaryOpTest__ExtendToVector256SByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new SByte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtendToVector256.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtendToVector256.Single.cs index d240b57..50965ba 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtendToVector256.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtendToVector256.Single.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static GenericUnaryOpTest__ExtendToVector256Single() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtendToVector256.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtendToVector256.UInt16.cs index 7352a0b..c49e13f 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtendToVector256.UInt16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtendToVector256.UInt16.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static GenericUnaryOpTest__ExtendToVector256UInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtendToVector256.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtendToVector256.UInt32.cs index e578baf..bd33fa2 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtendToVector256.UInt32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtendToVector256.UInt32.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static GenericUnaryOpTest__ExtendToVector256UInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtendToVector256.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtendToVector256.UInt64.cs index a1e2be1..9bce14f 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtendToVector256.UInt64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtendToVector256.UInt64.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static GenericUnaryOpTest__ExtendToVector256UInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Byte.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Byte.1.cs index f524437..6c2387c 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Byte.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Byte.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractScalarTest__ExtractByte1() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Byte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Byte.20.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Byte.20.cs index f270941..d1a819e 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Byte.20.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Byte.20.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractScalarTest__ExtractByte20() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Byte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Byte.52.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Byte.52.cs index b907d6e..d332160 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Byte.52.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Byte.52.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractScalarTest__ExtractByte52() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Byte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int32.1.cs index 11d6af4..a37574b 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int32.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int32.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractScalarTest__ExtractInt321() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int32.22.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int32.22.cs index 688e61c..cb4eba3 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int32.22.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int32.22.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractScalarTest__ExtractInt3222() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int32.6.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int32.6.cs index 3e934bd..0a3a7bc 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int32.6.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int32.6.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractScalarTest__ExtractInt326() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int64.1.cs index 06f7084..4bf0fd7 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int64.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int64.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractScalarTest__ExtractInt641() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int64.19.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int64.19.cs index d421087..73554b1 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int64.19.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int64.19.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractScalarTest__ExtractInt6419() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int64.3.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int64.3.cs index 4a54410..7ba12d4 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int64.3.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.Int64.3.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractScalarTest__ExtractInt643() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt16.1.cs index 0e57f6d..09a08af 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt16.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt16.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractScalarTest__ExtractUInt161() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt16.11.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt16.11.cs index 1cc4adc..f45adf7 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt16.11.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt16.11.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractScalarTest__ExtractUInt1611() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt16.27.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt16.27.cs index 8b0088b..d740847 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt16.27.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt16.27.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractScalarTest__ExtractUInt1627() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt32.1.cs index af62db1..2f49523 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt32.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt32.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractScalarTest__ExtractUInt321() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt32.22.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt32.22.cs index 8c8b134..adc57a3 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt32.22.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt32.22.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractScalarTest__ExtractUInt3222() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt32.6.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt32.6.cs index 6048d3a..586ee49 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt32.6.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt32.6.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractScalarTest__ExtractUInt326() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt64.1.cs index 1c25c3c..f0d9414 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt64.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt64.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractScalarTest__ExtractUInt641() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt64.19.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt64.19.cs index e09bcf9..8fbfdec 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt64.19.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt64.19.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractScalarTest__ExtractUInt6419() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt64.3.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt64.3.cs index 12080cf..612ce0f 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt64.3.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Extract.UInt64.3.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractScalarTest__ExtractUInt643() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.Byte.1.Store.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.Byte.1.Store.cs index 911e42b..65f7081 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.Byte.1.Store.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.Byte.1.Store.cs @@ -99,9 +99,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -129,9 +128,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractStoreTest__ExtractVector128Byte1() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -139,12 +136,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Byte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.Double.1.Store.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.Double.1.Store.cs index be052e4..c420124 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.Double.1.Store.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.Double.1.Store.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -129,8 +128,6 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractStoreTest__ExtractVector128Double1() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -139,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.Int16.1.Store.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.Int16.1.Store.cs index 84d85a6..16c6787 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.Int16.1.Store.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.Int16.1.Store.cs @@ -99,9 +99,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -129,9 +128,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractStoreTest__ExtractVector128Int161() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -139,12 +136,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.Int32.1.Store.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.Int32.1.Store.cs index db8c0b2..2aaa8fb 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.Int32.1.Store.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.Int32.1.Store.cs @@ -99,9 +99,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -129,9 +128,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractStoreTest__ExtractVector128Int321() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -139,12 +136,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.Int64.1.Store.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.Int64.1.Store.cs index 1ec554e..cd638e5 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.Int64.1.Store.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.Int64.1.Store.cs @@ -99,9 +99,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -129,9 +128,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractStoreTest__ExtractVector128Int641() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -139,12 +136,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.SByte.1.Store.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.SByte.1.Store.cs index 00dc734..2015c58 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.SByte.1.Store.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.SByte.1.Store.cs @@ -99,9 +99,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -129,9 +128,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractStoreTest__ExtractVector128SByte1() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -139,12 +136,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new SByte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.Single.1.Store.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.Single.1.Store.cs index e47b71d..e646609 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.Single.1.Store.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.Single.1.Store.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -129,8 +128,6 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractStoreTest__ExtractVector128Single1() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -139,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.UInt16.1.Store.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.UInt16.1.Store.cs index 660d005..f5a4a79 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.UInt16.1.Store.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.UInt16.1.Store.cs @@ -99,9 +99,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -129,9 +128,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractStoreTest__ExtractVector128UInt161() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -139,12 +136,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.UInt32.1.Store.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.UInt32.1.Store.cs index c48e8ae..a9bef3e 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.UInt32.1.Store.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.UInt32.1.Store.cs @@ -99,9 +99,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -129,9 +128,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractStoreTest__ExtractVector128UInt321() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -139,12 +136,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.UInt64.1.Store.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.UInt64.1.Store.cs index f08cd2e..757a186 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.UInt64.1.Store.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/ExtractVector128.UInt64.1.Store.cs @@ -99,9 +99,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -129,9 +128,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractStoreTest__ExtractVector128UInt641() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -139,12 +136,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Floor.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Floor.Double.cs index ef5803c..8f0097e 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Floor.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Floor.Double.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleUnaryOpTest__FloorDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Floor.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Floor.Single.cs index a439c82..2c379a3 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Floor.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Floor.Single.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleUnaryOpTest__FloorSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/GetLowerHalf.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/GetLowerHalf.Byte.cs index d58cd38..927f006 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/GetLowerHalf.Byte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/GetLowerHalf.Byte.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static GenericUnaryOpTest__GetLowerHalfByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Byte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/GetLowerHalf.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/GetLowerHalf.Double.cs index ca3e025..c3d9f41 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/GetLowerHalf.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/GetLowerHalf.Double.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static GenericUnaryOpTest__GetLowerHalfDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/GetLowerHalf.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/GetLowerHalf.Int16.cs index 5b7e726..e2f86ca 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/GetLowerHalf.Int16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/GetLowerHalf.Int16.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static GenericUnaryOpTest__GetLowerHalfInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/GetLowerHalf.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/GetLowerHalf.Int32.cs index 069fdc4..83377a2 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/GetLowerHalf.Int32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/GetLowerHalf.Int32.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static GenericUnaryOpTest__GetLowerHalfInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/GetLowerHalf.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/GetLowerHalf.Int64.cs index b21ae43..364e770 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/GetLowerHalf.Int64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/GetLowerHalf.Int64.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static GenericUnaryOpTest__GetLowerHalfInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/GetLowerHalf.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/GetLowerHalf.SByte.cs index a8be9a3..a1f7326 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/GetLowerHalf.SByte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/GetLowerHalf.SByte.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static GenericUnaryOpTest__GetLowerHalfSByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new SByte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/GetLowerHalf.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/GetLowerHalf.Single.cs index b97fcec..cf6f1a9 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/GetLowerHalf.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/GetLowerHalf.Single.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static GenericUnaryOpTest__GetLowerHalfSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/GetLowerHalf.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/GetLowerHalf.UInt16.cs index 6329242..f93d05b 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/GetLowerHalf.UInt16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/GetLowerHalf.UInt16.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static GenericUnaryOpTest__GetLowerHalfUInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/GetLowerHalf.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/GetLowerHalf.UInt32.cs index 39f06d4..851dc8b 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/GetLowerHalf.UInt32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/GetLowerHalf.UInt32.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static GenericUnaryOpTest__GetLowerHalfUInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/GetLowerHalf.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/GetLowerHalf.UInt64.cs index 3ec151c..a18396c 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/GetLowerHalf.UInt64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/GetLowerHalf.UInt64.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static GenericUnaryOpTest__GetLowerHalfUInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Byte.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Byte.1.cs index 3bdb018..d601dd0 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Byte.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Byte.1.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static InsertScalarTest__InsertByte1() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Byte.20.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Byte.20.cs index cd0f9e7..3fa2534 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Byte.20.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Byte.20.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static InsertScalarTest__InsertByte20() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Byte.52.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Byte.52.cs index da9b0af..9a93755 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Byte.52.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Byte.52.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static InsertScalarTest__InsertByte52() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int16.1.cs index 5b4806c..fe87bbd 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int16.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int16.1.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static InsertScalarTest__InsertInt161() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int16.11.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int16.11.cs index 8791d26..21bce9a 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int16.11.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int16.11.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static InsertScalarTest__InsertInt1611() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int16.27.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int16.27.cs index 6b699c7..7992f37 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int16.27.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int16.27.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static InsertScalarTest__InsertInt1627() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int32.1.cs index 8dd0e25..6d53338 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int32.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int32.1.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static InsertScalarTest__InsertInt321() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int32.22.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int32.22.cs index 6fa0118..daa608e 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int32.22.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int32.22.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static InsertScalarTest__InsertInt3222() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int32.6.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int32.6.cs index 9f592e8..2a3c17f 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int32.6.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int32.6.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static InsertScalarTest__InsertInt326() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int64.1.cs index a8b5b77..1449daf 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int64.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int64.1.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static InsertScalarTest__InsertInt641() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int64.19.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int64.19.cs index 192fd15..e7abb3e 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int64.19.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int64.19.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static InsertScalarTest__InsertInt6419() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int64.3.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int64.3.cs index be23ff6..09ce2ff 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int64.3.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.Int64.3.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static InsertScalarTest__InsertInt643() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.SByte.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.SByte.1.cs index 3e2b0b2..e7db91c 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.SByte.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.SByte.1.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static InsertScalarTest__InsertSByte1() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.SByte.20.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.SByte.20.cs index 6efb71e..95739da 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.SByte.20.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.SByte.20.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static InsertScalarTest__InsertSByte20() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.SByte.52.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.SByte.52.cs index 032521d..ddcc848 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.SByte.52.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.SByte.52.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static InsertScalarTest__InsertSByte52() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt16.1.cs index 44c6369..f1cef27 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt16.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt16.1.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static InsertScalarTest__InsertUInt161() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt16.11.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt16.11.cs index 413e3d3..3ce7bd4 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt16.11.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt16.11.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static InsertScalarTest__InsertUInt1611() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt16.27.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt16.27.cs index ec99d12..b0a915e 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt16.27.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt16.27.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static InsertScalarTest__InsertUInt1627() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt32.1.cs index cbe014a..e36743c 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt32.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt32.1.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static InsertScalarTest__InsertUInt321() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt32.22.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt32.22.cs index 64cfba1..29d2258 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt32.22.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt32.22.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static InsertScalarTest__InsertUInt3222() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt32.6.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt32.6.cs index a49f9d8..088c3f2 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt32.6.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt32.6.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static InsertScalarTest__InsertUInt326() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt64.1.cs index 1e7ed38..ad30d4a 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt64.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt64.1.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static InsertScalarTest__InsertUInt641() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt64.19.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt64.19.cs index bb85978..8c9d91e 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt64.19.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt64.19.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static InsertScalarTest__InsertUInt6419() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt64.3.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt64.3.cs index 7296b3d..264018d 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt64.3.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Insert.UInt64.3.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static InsertScalarTest__InsertUInt643() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.Byte.1.Load.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.Byte.1.Load.cs index 776d2c6..902ef30 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.Byte.1.Load.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.Byte.1.Load.cs @@ -101,11 +101,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -139,11 +138,9 @@ namespace JIT.HardwareIntrinsics.X86 static InsertLoadTest__InsertVector128Byte1() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -151,15 +148,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.Double.1.Load.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.Double.1.Load.cs index 1261973..df659e4 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.Double.1.Load.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.Double.1.Load.cs @@ -101,7 +101,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -139,8 +138,6 @@ namespace JIT.HardwareIntrinsics.X86 static InsertLoadTest__InsertVector128Double1() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -151,8 +148,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.Int16.1.Load.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.Int16.1.Load.cs index 2778bed..26c05f9 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.Int16.1.Load.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.Int16.1.Load.cs @@ -101,11 +101,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(0,short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -139,11 +138,9 @@ namespace JIT.HardwareIntrinsics.X86 static InsertLoadTest__InsertVector128Int161() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(0,short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -151,15 +148,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(0,short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(0, short.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(0,short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.Int32.1.Load.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.Int32.1.Load.cs index c324aaa..51bd7d4 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.Int32.1.Load.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.Int32.1.Load.cs @@ -101,11 +101,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(0,int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -139,11 +138,9 @@ namespace JIT.HardwareIntrinsics.X86 static InsertLoadTest__InsertVector128Int321() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(0,int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -151,15 +148,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(0,int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(0,int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.Int64.1.Load.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.Int64.1.Load.cs index e6aca7b..5aec3ee 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.Int64.1.Load.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.Int64.1.Load.cs @@ -101,11 +101,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(0,int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -139,11 +138,9 @@ namespace JIT.HardwareIntrinsics.X86 static InsertLoadTest__InsertVector128Int641() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(0,int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -151,15 +148,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(0,int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(0,int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.SByte.1.Load.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.SByte.1.Load.cs index 7bd6f7b..b7d1eda 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.SByte.1.Load.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.SByte.1.Load.cs @@ -101,11 +101,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(0,sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -139,11 +138,9 @@ namespace JIT.HardwareIntrinsics.X86 static InsertLoadTest__InsertVector128SByte1() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(0,sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -151,15 +148,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(0,sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(0,sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.Single.1.Load.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.Single.1.Load.cs index 5043e0a..2d5ed89 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.Single.1.Load.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.Single.1.Load.cs @@ -101,7 +101,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -139,8 +138,6 @@ namespace JIT.HardwareIntrinsics.X86 static InsertLoadTest__InsertVector128Single1() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -151,8 +148,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.UInt16.1.Load.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.UInt16.1.Load.cs index fac4b31..a41aac8 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.UInt16.1.Load.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.UInt16.1.Load.cs @@ -101,11 +101,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0,ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -139,11 +138,9 @@ namespace JIT.HardwareIntrinsics.X86 static InsertLoadTest__InsertVector128UInt161() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0,ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -151,15 +148,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0,ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0,ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.UInt32.1.Load.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.UInt32.1.Load.cs index 4ead471..6c26623 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.UInt32.1.Load.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.UInt32.1.Load.cs @@ -101,11 +101,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0,int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -139,11 +138,9 @@ namespace JIT.HardwareIntrinsics.X86 static InsertLoadTest__InsertVector128UInt321() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0,int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -151,15 +148,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0,int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0,int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.UInt64.1.Load.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.UInt64.1.Load.cs index 24e1ae2..08a5ad0 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.UInt64.1.Load.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/InsertVector128.UInt64.1.Load.cs @@ -101,11 +101,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0,int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -139,11 +138,9 @@ namespace JIT.HardwareIntrinsics.X86 static InsertLoadTest__InsertVector128UInt641() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0,int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -151,15 +148,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0,int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0,int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Max.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Max.Double.cs index fd598dc..064e42b 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Max.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Max.Double.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__MaxDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Max.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Max.Single.cs index 27a6f12..5297d63 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Max.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Max.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__MaxSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Min.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Min.Double.cs index 6d6ded9..d478c1e 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Min.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Min.Double.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__MinDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Min.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Min.Single.cs index 81aac30..010dbb4 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Min.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Min.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__MinSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Multiply.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Multiply.Double.cs index c9a0d70..f8be371 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Multiply.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Multiply.Double.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__MultiplyDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Multiply.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Multiply.Single.cs index e68f590..c2f3e5d 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Multiply.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Multiply.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__MultiplySingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Or.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Or.Double.cs index ecfd052..3d5009e 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Or.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Or.Double.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__OrDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Or.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Or.Single.cs index 76761f1..4c76fe6 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Or.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Or.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__OrSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Permute.Double.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Permute.Double.1.cs index be10a64..d1b6da6 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Permute.Double.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Permute.Double.1.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__PermuteDouble1() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Permute.Double.2.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Permute.Double.2.cs index 6554a49..64e7242 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Permute.Double.2.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Permute.Double.2.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__PermuteDouble2() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Permute.Single.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Permute.Single.1.cs index c97ff9d..940853d 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Permute.Single.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Permute.Single.1.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__PermuteSingle1() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Permute.Single.2.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Permute.Single.2.cs index 1931714..ab34e8d 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Permute.Single.2.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Permute.Single.2.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__PermuteSingle2() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/PermuteVar.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/PermuteVar.Double.cs index de79e13..641a940 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/PermuteVar.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/PermuteVar.Double.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__PermuteVarDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = BitConverter.Int64BitsToDouble(1); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = BitConverter.Int64BitsToDouble(1); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/PermuteVar.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/PermuteVar.Single.cs index b47e0bc..42bbe3b 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/PermuteVar.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/PermuteVar.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__PermuteVarSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = BitConverter.Int32BitsToSingle(1); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = BitConverter.Int32BitsToSingle(1); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Program.Avx.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Program.Avx.cs index 0b40b21..da59d65 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Program.Avx.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Program.Avx.cs @@ -165,8 +165,8 @@ namespace JIT.HardwareIntrinsics.X86 ["TestZ.UInt16"] = TestZUInt16, ["TestZ.UInt32"] = TestZUInt32, ["TestZ.UInt64"] = TestZUInt64, - ["Xor.Double"] = XorDouble, ["Xor.Single"] = XorSingle, + ["Xor.Double"] = XorDouble, }; } } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundCurrentDirection.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundCurrentDirection.Double.cs index 61638a5..b80af56 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundCurrentDirection.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundCurrentDirection.Double.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleUnaryOpTest__RoundCurrentDirectionDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundCurrentDirection.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundCurrentDirection.Single.cs index 2c449d3..c1d2fc9 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundCurrentDirection.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundCurrentDirection.Single.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleUnaryOpTest__RoundCurrentDirectionSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToNearestInteger.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToNearestInteger.Double.cs index f2f6f15..92a0cdd 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToNearestInteger.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToNearestInteger.Double.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleUnaryOpTest__RoundToNearestIntegerDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToNearestInteger.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToNearestInteger.Single.cs index 5a64116..7ac79c6 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToNearestInteger.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToNearestInteger.Single.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleUnaryOpTest__RoundToNearestIntegerSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToNegativeInfinity.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToNegativeInfinity.Double.cs index 41f1ade..868a618 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToNegativeInfinity.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToNegativeInfinity.Double.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleUnaryOpTest__RoundToNegativeInfinityDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToNegativeInfinity.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToNegativeInfinity.Single.cs index 25ab250..b9db66a 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToNegativeInfinity.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToNegativeInfinity.Single.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleUnaryOpTest__RoundToNegativeInfinitySingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToPositiveInfinity.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToPositiveInfinity.Double.cs index 6ce4e9e..869a551 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToPositiveInfinity.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToPositiveInfinity.Double.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleUnaryOpTest__RoundToPositiveInfinityDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToPositiveInfinity.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToPositiveInfinity.Single.cs index b4894a7..b087a33 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToPositiveInfinity.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToPositiveInfinity.Single.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleUnaryOpTest__RoundToPositiveInfinitySingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToZero.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToZero.Double.cs index d2e07ae..40dc9b1 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToZero.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToZero.Double.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleUnaryOpTest__RoundToZeroDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToZero.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToZero.Single.cs index 4358a8b..742c548 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToZero.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/RoundToZero.Single.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleUnaryOpTest__RoundToZeroSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Shuffle.Double.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Shuffle.Double.1.cs index c165473..0549b8a 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Shuffle.Double.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Shuffle.Double.1.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static ImmBinaryOpTest__ShuffleDouble1() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Shuffle.Single.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Shuffle.Single.1.cs index fb685dc..9797d85 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Shuffle.Single.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Shuffle.Single.1.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static ImmBinaryOpTest__ShuffleSingle1() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Subtract.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Subtract.Double.cs index 45b70b8..aa4e58b 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Subtract.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Subtract.Double.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__SubtractDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Subtract.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Subtract.Single.cs index 206fe21..9d1fc8d 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Subtract.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Subtract.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__SubtractSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.Byte.cs index 664ea4e..59eceec 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.Byte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.Byte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanBinaryOpTest__TestCByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } _dataTable = new BooleanBinaryOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.Int16.cs index de32b11..c86f8c4 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.Int16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.Int16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanBinaryOpTest__TestCInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new BooleanBinaryOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.Int32.cs index 51cabb6..4280c63 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.Int32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.Int32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanBinaryOpTest__TestCInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new BooleanBinaryOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.Int64.cs index 012159c..754b150 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.Int64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.Int64.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanBinaryOpTest__TestCInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new BooleanBinaryOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.SByte.cs index 9c2005d..b1c6bd2 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.SByte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.SByte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanBinaryOpTest__TestCSByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new BooleanBinaryOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.UInt16.cs index bc8b23c..5b8778e 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.UInt16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.UInt16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanBinaryOpTest__TestCUInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new BooleanBinaryOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.UInt32.cs index 2a51cac..3db1727 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.UInt32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.UInt32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanBinaryOpTest__TestCUInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new BooleanBinaryOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.UInt64.cs index 71606ce..4a64cab 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.UInt64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestC.UInt64.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanBinaryOpTest__TestCUInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } _dataTable = new BooleanBinaryOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.Byte.cs index fc5f8c3..a838214 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.Byte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.Byte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanTwoComparisonOpTest__TestNotZAndNotCByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } _dataTable = new BooleanTwoComparisonOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.Int16.cs index 2028901..b95d72b 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.Int16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.Int16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanTwoComparisonOpTest__TestNotZAndNotCInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new BooleanTwoComparisonOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.Int32.cs index dc2bd7e..09430a1 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.Int32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.Int32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanTwoComparisonOpTest__TestNotZAndNotCInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new BooleanTwoComparisonOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.Int64.cs index 9e0f7d5..831de17 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.Int64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.Int64.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanTwoComparisonOpTest__TestNotZAndNotCInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new BooleanTwoComparisonOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.SByte.cs index 2dbcd29..1286c03 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.SByte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.SByte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanTwoComparisonOpTest__TestNotZAndNotCSByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new BooleanTwoComparisonOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.UInt16.cs index cee3ee7..54d26fc 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.UInt16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.UInt16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanTwoComparisonOpTest__TestNotZAndNotCUInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new BooleanTwoComparisonOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.UInt32.cs index c62a9c9..d7b704c 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.UInt32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.UInt32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanTwoComparisonOpTest__TestNotZAndNotCUInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new BooleanTwoComparisonOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.UInt64.cs index c50c3e8..afca395 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.UInt64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestNotZAndNotC.UInt64.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanTwoComparisonOpTest__TestNotZAndNotCUInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } _dataTable = new BooleanTwoComparisonOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.Byte.cs index a200e77..20c7977 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.Byte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.Byte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanBinaryOpTest__TestZByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } _dataTable = new BooleanBinaryOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.Int16.cs index d571fd3..031a1c7 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.Int16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.Int16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanBinaryOpTest__TestZInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new BooleanBinaryOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.Int32.cs index a09ae59..07f88c1 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.Int32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.Int32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanBinaryOpTest__TestZInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new BooleanBinaryOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.Int64.cs index 4dcf0ce..b17f040 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.Int64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.Int64.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanBinaryOpTest__TestZInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new BooleanBinaryOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.SByte.cs index 93d6f61..b67905e 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.SByte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.SByte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanBinaryOpTest__TestZSByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new BooleanBinaryOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.UInt16.cs index 48ffe72..baf72fe 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.UInt16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.UInt16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanBinaryOpTest__TestZUInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new BooleanBinaryOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.UInt32.cs index eecf672..6a46536 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.UInt32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.UInt32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanBinaryOpTest__TestZUInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new BooleanBinaryOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.UInt64.cs index 6b322b2..2d0d3a9 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.UInt64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/TestZ.UInt64.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanBinaryOpTest__TestZUInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } _dataTable = new BooleanBinaryOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Xor.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Xor.Double.cs index a531354..d235c81 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Xor.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Xor.Double.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__XorDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Xor.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Xor.Single.cs index b591913..6c3acd9 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Xor.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/Xor.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__XorSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.Byte.cs index 4bf60f4..6bda38a 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.Byte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.Byte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AddByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.Int16.cs index 7b71c81..5a9d829 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.Int16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.Int16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AddInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.Int32.cs index 2691488..d733b7f 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.Int32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.Int32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AddInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.Int64.cs index 95969f8..ba428f5 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.Int64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.Int64.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AddInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.SByte.cs index 3805b5f..eee9914 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.SByte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.SByte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AddSByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.UInt16.cs index bd06967..170c5c5 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.UInt16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.UInt16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AddUInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.UInt32.cs index c690cac..ef9973e 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.UInt32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.UInt32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AddUInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.UInt64.cs index 3bcc009..4ae7207 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.UInt64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Add.UInt64.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AddUInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.SByte.228.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.SByte.228.cs index 1a68a9a..1b795fe 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.SByte.228.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.SByte.228.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static ImmBinaryOpTest__AlignRightSByte228() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.SByte.250.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.SByte.250.cs index f6b5b9c..2e3f1c2 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.SByte.250.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.SByte.250.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static ImmBinaryOpTest__AlignRightSByte250() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.SByte.27.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.SByte.27.cs index a554afd..6302ada 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.SByte.27.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.SByte.27.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static ImmBinaryOpTest__AlignRightSByte27() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.SByte.5.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.SByte.5.cs index 6776855..1922676 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.SByte.5.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AlignRight.SByte.5.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static ImmBinaryOpTest__AlignRightSByte5() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.Byte.cs index 255f8c6..b729617 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.Byte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.Byte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AndByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.Int16.cs index 0e4e98e..6ade3a8 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.Int16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.Int16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AndInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.Int32.cs index 4a919b9..0f7c299 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.Int32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.Int32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AndInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.Int64.cs index e98c8fb..e86c18f 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.Int64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.Int64.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AndInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.SByte.cs index b3962fe..b7f2ada 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.SByte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.SByte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AndSByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.UInt16.cs index 5609e70..f1b86cd 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.UInt16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.UInt16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AndUInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.UInt32.cs index 736e1d0..28e2579 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.UInt32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.UInt32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AndUInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.UInt64.cs index 02ce886..a72bb79 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.UInt64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/And.UInt64.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AndUInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.Byte.cs index c89f6b6..21d9985 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.Byte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.Byte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AndNotByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.Int16.cs index 1f29877..931fda5 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.Int16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.Int16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AndNotInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.Int32.cs index 07de073..c5e22c8 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.Int32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.Int32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AndNotInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.Int64.cs index cafdd41..f025df0 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.Int64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.Int64.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AndNotInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.SByte.cs index fd93d98..4be8ad1 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.SByte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.SByte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AndNotSByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.UInt16.cs index db214d8..043de10 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.UInt16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.UInt16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AndNotUInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.UInt32.cs index fe4ce3e..2474aaa 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.UInt32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.UInt32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AndNotUInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.UInt64.cs index d836656..878ea17 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.UInt64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/AndNot.UInt64.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AndNotUInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Average.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Average.Byte.cs index 2e186c9..09097ec 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Average.Byte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Average.Byte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AverageByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Average.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Average.UInt16.cs index 9f4ec2b..8b55037 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Average.UInt16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Average.UInt16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AverageUInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(short.MinValue, short.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.Int16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.Int16.1.cs index b1bfc3c..f7d4daf 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.Int16.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.Int16.1.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static ImmBinaryOpTest__BlendInt161() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.Int16.2.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.Int16.2.cs index f940aa8..c06f524 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.Int16.2.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.Int16.2.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static ImmBinaryOpTest__BlendInt162() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.Int16.4.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.Int16.4.cs index c507326..49006ef 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.Int16.4.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.Int16.4.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static ImmBinaryOpTest__BlendInt164() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.Int16.85.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.Int16.85.cs index 820fd15..60900f2 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.Int16.85.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.Int16.85.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static ImmBinaryOpTest__BlendInt1685() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.Int32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.Int32.1.cs index dd52f6f..9af8b1c 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.Int32.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.Int32.1.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static ImmBinaryOpTest__BlendInt321() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.Int32.2.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.Int32.2.cs index d600373..3569922 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.Int32.2.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.Int32.2.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static ImmBinaryOpTest__BlendInt322() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.Int32.4.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.Int32.4.cs index 4d3bf28..0776eac 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.Int32.4.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.Int32.4.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static ImmBinaryOpTest__BlendInt324() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.Int32.85.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.Int32.85.cs index 0dc2055..f6e1b42 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.Int32.85.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.Int32.85.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static ImmBinaryOpTest__BlendInt3285() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.UInt16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.UInt16.1.cs index 60045ec..979d42b 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.UInt16.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.UInt16.1.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static ImmBinaryOpTest__BlendUInt161() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.UInt16.2.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.UInt16.2.cs index c22589f..f8d0ac3 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.UInt16.2.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.UInt16.2.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static ImmBinaryOpTest__BlendUInt162() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.UInt16.4.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.UInt16.4.cs index 998ddf8..7b9a221 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.UInt16.4.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.UInt16.4.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static ImmBinaryOpTest__BlendUInt164() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.UInt16.85.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.UInt16.85.cs index abcb168..4fda2b8 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.UInt16.85.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.UInt16.85.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static ImmBinaryOpTest__BlendUInt1685() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.UInt32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.UInt32.1.cs index 358b9ab..2526b8f 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.UInt32.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.UInt32.1.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static ImmBinaryOpTest__BlendUInt321() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.UInt32.2.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.UInt32.2.cs index 2f1b034..b74042c 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.UInt32.2.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.UInt32.2.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static ImmBinaryOpTest__BlendUInt322() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.UInt32.4.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.UInt32.4.cs index 3291380..0c125ae 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.UInt32.4.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.UInt32.4.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static ImmBinaryOpTest__BlendUInt324() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.UInt32.85.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.UInt32.85.cs index 63ea5e2..ef3a90a 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.UInt32.85.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Blend.UInt32.85.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static ImmBinaryOpTest__BlendUInt3285() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BlendVariable.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BlendVariable.Byte.cs index 77d5895..f1273b9 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BlendVariable.Byte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BlendVariable.Byte.cs @@ -100,11 +100,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (byte)(((i % 2) == 0) ? 128 : 1); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); @@ -144,11 +143,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleTernaryOpTest__BlendVariableByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (byte)(((i % 2) == 0) ? 128 : 1); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); @@ -158,17 +155,15 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (byte)(((i % 2) == 0) ? 128 : 1); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (byte)(((i % 2) == 0) ? 128 : 1); } _dataTable = new SimpleTernaryOpTest__DataTable(_data1, _data2, _data3, new Byte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BlendVariable.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BlendVariable.SByte.cs index 2f94da4..a931083 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BlendVariable.SByte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BlendVariable.SByte.cs @@ -100,11 +100,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (sbyte)(((i % 2) == 0) ? -128 : 1); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); @@ -144,11 +143,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleTernaryOpTest__BlendVariableSByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (sbyte)(((i % 2) == 0) ? -128 : 1); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); @@ -158,17 +155,15 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (sbyte)(((i % 2) == 0) ? -128 : 1); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (sbyte)(((i % 2) == 0) ? -128 : 1); } _dataTable = new SimpleTernaryOpTest__DataTable(_data1, _data2, _data3, new SByte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.Byte.cs index ef566c9..3569e63 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.Byte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.Byte.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static GenericUnaryOpTest__BroadcastScalarToVector128Byte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Byte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.Double.cs index b5be633..20e00b7 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.Double.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static GenericUnaryOpTest__BroadcastScalarToVector128Double() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.Int16.cs index 5121f91..5f8abb3 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.Int16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.Int16.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static GenericUnaryOpTest__BroadcastScalarToVector128Int16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.Int32.cs index de3dbca..fd95a9f 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.Int32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.Int32.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static GenericUnaryOpTest__BroadcastScalarToVector128Int32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.Int64.cs index 8ed3772..d80907a 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.Int64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.Int64.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static GenericUnaryOpTest__BroadcastScalarToVector128Int64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.SByte.cs index 5aae800..431a752 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.SByte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.SByte.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static GenericUnaryOpTest__BroadcastScalarToVector128SByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new SByte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.Single.cs index 2258c99..d3d7975 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.Single.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static GenericUnaryOpTest__BroadcastScalarToVector128Single() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.UInt16.cs index cc4e486..2dd930e 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.UInt16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.UInt16.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static GenericUnaryOpTest__BroadcastScalarToVector128UInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.UInt32.cs index 5721c49..30fc94a 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.UInt32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.UInt32.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static GenericUnaryOpTest__BroadcastScalarToVector128UInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.UInt64.cs index 46ddd89..9690178 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.UInt64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector128.UInt64.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static GenericUnaryOpTest__BroadcastScalarToVector128UInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.Byte.cs index 117ccd1..326d7d5 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.Byte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.Byte.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static GenericUnaryOpTest__BroadcastScalarToVector256Byte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Byte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.Double.cs index 0d057ed..3a55da2 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.Double.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static GenericUnaryOpTest__BroadcastScalarToVector256Double() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.Int16.cs index b64e7f6..fba5de8 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.Int16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.Int16.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static GenericUnaryOpTest__BroadcastScalarToVector256Int16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.Int32.cs index 19810e2..3930db0 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.Int32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.Int32.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static GenericUnaryOpTest__BroadcastScalarToVector256Int32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.Int64.cs index d91ad75..5a41e09 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.Int64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.Int64.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static GenericUnaryOpTest__BroadcastScalarToVector256Int64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.SByte.cs index 1ea3ed3..d8dcd7a 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.SByte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.SByte.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static GenericUnaryOpTest__BroadcastScalarToVector256SByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new SByte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.Single.cs index 5de20b3..c17c3bd 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.Single.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static GenericUnaryOpTest__BroadcastScalarToVector256Single() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.UInt16.cs index 8d00c9a..ab54934 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.UInt16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.UInt16.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static GenericUnaryOpTest__BroadcastScalarToVector256UInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.UInt32.cs index f8fd38d..71b0037 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.UInt32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.UInt32.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static GenericUnaryOpTest__BroadcastScalarToVector256UInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.UInt64.cs index 27b0325..a3c6e99 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.UInt64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/BroadcastScalarToVector256.UInt64.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static GenericUnaryOpTest__BroadcastScalarToVector256UInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.Byte.cs index c6eba06..e90e848 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.Byte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.Byte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareEqualByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.Int16.cs index e4373a5..f7ab8a4 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.Int16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.Int16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareEqualInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.Int32.cs index 3d34e70..0c47c48 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.Int32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.Int32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareEqualInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.Int64.cs index 8196162..abff21b 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.Int64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.Int64.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareEqualInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.SByte.cs index be354c8..c7650b5 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.SByte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.SByte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareEqualSByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.UInt16.cs index c57dfb1..518843b 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.UInt16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.UInt16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareEqualUInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.UInt32.cs index 64c8be2..f4c041c 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.UInt32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.UInt32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareEqualUInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.UInt64.cs index 9de0e61..c5c0874 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.UInt64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareEqual.UInt64.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareEqualUInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareGreaterThan.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareGreaterThan.Int16.cs index d805ace..9ba9ffa 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareGreaterThan.Int16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareGreaterThan.Int16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareGreaterThanInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareGreaterThan.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareGreaterThan.Int32.cs index f1ea497..afc6908 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareGreaterThan.Int32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareGreaterThan.Int32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareGreaterThanInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareGreaterThan.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareGreaterThan.Int64.cs index b6c797a..9c88e82 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareGreaterThan.Int64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareGreaterThan.Int64.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareGreaterThanInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareGreaterThan.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareGreaterThan.SByte.cs index 467da85..2399589 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareGreaterThan.SByte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/CompareGreaterThan.SByte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareGreaterThanSByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ConvertToDouble.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ConvertToDouble.Double.cs index 2d706d3..3603a38 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ConvertToDouble.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ConvertToDouble.Double.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -127,8 +126,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimdScalarUnaryOpTest__ConvertToDoubleDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -137,8 +134,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ConvertToInt32.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ConvertToInt32.Int32.cs index 14672db..5370d74 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ConvertToInt32.Int32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ConvertToInt32.Int32.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -127,9 +126,7 @@ namespace JIT.HardwareIntrinsics.X86 static SimdScalarUnaryOpTest__ConvertToInt32Int32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -137,12 +134,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimdScalarUnaryOpTest__DataTable(_data, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ConvertToUInt32.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ConvertToUInt32.UInt32.cs index 82b627f..ed212fc 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ConvertToUInt32.UInt32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ConvertToUInt32.UInt32.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -127,9 +126,7 @@ namespace JIT.HardwareIntrinsics.X86 static SimdScalarUnaryOpTest__ConvertToUInt32UInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -137,12 +134,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimdScalarUnaryOpTest__DataTable(_data, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.Byte.1.Store.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.Byte.1.Store.cs index 8ce3ded..b2973023 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.Byte.1.Store.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.Byte.1.Store.cs @@ -99,9 +99,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -129,9 +128,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractStoreTest__ExtractVector128Byte1() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -139,12 +136,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Byte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.Byte.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.Byte.1.cs index 5794403..b3bfb57 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.Byte.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.Byte.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractVector128Test__ExtractVector128Byte1() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Byte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.Int16.1.Store.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.Int16.1.Store.cs index b964d64..bbd8239 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.Int16.1.Store.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.Int16.1.Store.cs @@ -99,9 +99,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -129,9 +128,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractStoreTest__ExtractVector128Int161() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -139,12 +136,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.Int16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.Int16.1.cs index 376af82..a0b21e6 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.Int16.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.Int16.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractVector128Test__ExtractVector128Int161() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.Int32.1.Store.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.Int32.1.Store.cs index 50061ab..4a8e245 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.Int32.1.Store.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.Int32.1.Store.cs @@ -99,9 +99,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -129,9 +128,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractStoreTest__ExtractVector128Int321() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -139,12 +136,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.Int32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.Int32.1.cs index b2ccef6..0a3d2d4 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.Int32.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.Int32.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractVector128Test__ExtractVector128Int321() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.Int64.1.Store.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.Int64.1.Store.cs index cbef86c..81b3508 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.Int64.1.Store.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.Int64.1.Store.cs @@ -99,9 +99,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -129,9 +128,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractStoreTest__ExtractVector128Int641() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -139,12 +136,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.Int64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.Int64.1.cs index e5b4083..68a828c 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.Int64.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.Int64.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractVector128Test__ExtractVector128Int641() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.SByte.1.Store.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.SByte.1.Store.cs index 5e3faa2..8a5ef18 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.SByte.1.Store.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.SByte.1.Store.cs @@ -99,9 +99,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -129,9 +128,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractStoreTest__ExtractVector128SByte1() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -139,12 +136,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new SByte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.SByte.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.SByte.1.cs index 03c78ed..23e0038 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.SByte.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.SByte.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractVector128Test__ExtractVector128SByte1() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new SByte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.UInt16.1.Store.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.UInt16.1.Store.cs index 76ff039..8686a39 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.UInt16.1.Store.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.UInt16.1.Store.cs @@ -99,9 +99,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -129,9 +128,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractStoreTest__ExtractVector128UInt161() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -139,12 +136,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.UInt16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.UInt16.1.cs index 62b0f1a..1785cb4 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.UInt16.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.UInt16.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractVector128Test__ExtractVector128UInt161() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.UInt32.1.Store.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.UInt32.1.Store.cs index c78e160..e333ddc 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.UInt32.1.Store.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.UInt32.1.Store.cs @@ -99,9 +99,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -129,9 +128,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractStoreTest__ExtractVector128UInt321() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -139,12 +136,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.UInt32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.UInt32.1.cs index be64db3..2381a4a 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.UInt32.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.UInt32.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractVector128Test__ExtractVector128UInt321() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.UInt64.1.Store.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.UInt64.1.Store.cs index 34ecc51..28ec5e3 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.UInt64.1.Store.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.UInt64.1.Store.cs @@ -99,9 +99,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -129,9 +128,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractStoreTest__ExtractVector128UInt641() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -139,12 +136,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.UInt64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.UInt64.1.cs index edfb86b..012596a 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.UInt64.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ExtractVector128.UInt64.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractVector128Test__ExtractVector128UInt641() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.Byte.1.Load.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.Byte.1.Load.cs index ae85563..3937a41 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.Byte.1.Load.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.Byte.1.Load.cs @@ -101,11 +101,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -139,11 +138,9 @@ namespace JIT.HardwareIntrinsics.X86 static InsertLoadTest__InsertVector128Byte1() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -151,15 +148,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.Byte.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.Byte.1.cs index 1e98038..d899d9a 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.Byte.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.Byte.1.cs @@ -101,11 +101,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -139,11 +138,9 @@ namespace JIT.HardwareIntrinsics.X86 static InsertVector128Test__InsertVector128Byte1() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -151,15 +148,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.Int16.1.Load.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.Int16.1.Load.cs index 256994b..0e230fa 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.Int16.1.Load.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.Int16.1.Load.cs @@ -101,11 +101,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(0,short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -139,11 +138,9 @@ namespace JIT.HardwareIntrinsics.X86 static InsertLoadTest__InsertVector128Int161() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(0,short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -151,15 +148,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(0,short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(0, short.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(0,short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.Int16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.Int16.1.cs index 3908e29..7f7fd5b 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.Int16.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.Int16.1.cs @@ -101,11 +101,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -139,11 +138,9 @@ namespace JIT.HardwareIntrinsics.X86 static InsertVector128Test__InsertVector128Int161() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -151,15 +148,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(0, short.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.Int32.1.Load.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.Int32.1.Load.cs index 22d8c27..24de44b 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.Int32.1.Load.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.Int32.1.Load.cs @@ -101,11 +101,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(0,int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -139,11 +138,9 @@ namespace JIT.HardwareIntrinsics.X86 static InsertLoadTest__InsertVector128Int321() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(0,int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -151,15 +148,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(0,int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(0,int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.Int32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.Int32.1.cs index 3948e50..ebfe0a1 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.Int32.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.Int32.1.cs @@ -101,11 +101,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -139,11 +138,9 @@ namespace JIT.HardwareIntrinsics.X86 static InsertVector128Test__InsertVector128Int321() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -151,15 +148,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.Int64.1.Load.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.Int64.1.Load.cs index 8154df6..18371b2 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.Int64.1.Load.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.Int64.1.Load.cs @@ -101,11 +101,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(0,int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -139,11 +138,9 @@ namespace JIT.HardwareIntrinsics.X86 static InsertLoadTest__InsertVector128Int641() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(0,int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -151,15 +148,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(0,int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(0,int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.Int64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.Int64.1.cs index d98a626..6cb0e08 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.Int64.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.Int64.1.cs @@ -101,11 +101,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -139,11 +138,9 @@ namespace JIT.HardwareIntrinsics.X86 static InsertVector128Test__InsertVector128Int641() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -151,15 +148,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.SByte.1.Load.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.SByte.1.Load.cs index b41054f..2674a9d 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.SByte.1.Load.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.SByte.1.Load.cs @@ -101,11 +101,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(0,sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -139,11 +138,9 @@ namespace JIT.HardwareIntrinsics.X86 static InsertLoadTest__InsertVector128SByte1() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(0,sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -151,15 +148,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(0,sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(0,sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.SByte.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.SByte.1.cs index 3e504df..0c35f40 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.SByte.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.SByte.1.cs @@ -101,11 +101,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -139,11 +138,9 @@ namespace JIT.HardwareIntrinsics.X86 static InsertVector128Test__InsertVector128SByte1() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -151,15 +148,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.UInt16.1.Load.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.UInt16.1.Load.cs index 766497e..701c6fc 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.UInt16.1.Load.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.UInt16.1.Load.cs @@ -101,11 +101,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0,ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -139,11 +138,9 @@ namespace JIT.HardwareIntrinsics.X86 static InsertLoadTest__InsertVector128UInt161() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0,ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -151,15 +148,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0,ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0,ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.UInt16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.UInt16.1.cs index 7c2a900..cf7bb16 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.UInt16.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.UInt16.1.cs @@ -101,11 +101,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -139,11 +138,9 @@ namespace JIT.HardwareIntrinsics.X86 static InsertVector128Test__InsertVector128UInt161() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -151,15 +148,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.UInt32.1.Load.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.UInt32.1.Load.cs index 9bc8f51..750cbbe 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.UInt32.1.Load.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.UInt32.1.Load.cs @@ -101,11 +101,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0,int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -139,11 +138,9 @@ namespace JIT.HardwareIntrinsics.X86 static InsertLoadTest__InsertVector128UInt321() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0,int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -151,15 +148,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0,int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0,int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.UInt32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.UInt32.1.cs index ab99415..45b1f4c 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.UInt32.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.UInt32.1.cs @@ -101,11 +101,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -139,11 +138,9 @@ namespace JIT.HardwareIntrinsics.X86 static InsertVector128Test__InsertVector128UInt321() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -151,15 +148,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.UInt64.1.Load.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.UInt64.1.Load.cs index 2b774db..187411d 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.UInt64.1.Load.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.UInt64.1.Load.cs @@ -101,11 +101,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0,int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -139,11 +138,9 @@ namespace JIT.HardwareIntrinsics.X86 static InsertLoadTest__InsertVector128UInt641() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0,int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -151,15 +148,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0,int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0,int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.UInt64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.UInt64.1.cs index 9618100..3624efd 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.UInt64.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/InsertVector128.UInt64.1.cs @@ -101,11 +101,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -139,11 +138,9 @@ namespace JIT.HardwareIntrinsics.X86 static InsertVector128Test__InsertVector128UInt641() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -151,15 +148,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Max.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Max.Byte.cs index 9af1842..d4cb9f6 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Max.Byte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Max.Byte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(byte.MinValue, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(byte.MinValue, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__MaxByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(byte.MinValue, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(byte.MinValue, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(byte.MinValue, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(byte.MinValue, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(byte.MinValue, byte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(byte.MinValue, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Max.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Max.Int16.cs index d17559f..b5ef504 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Max.Int16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Max.Int16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__MaxInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Max.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Max.Int32.cs index be0df43..f6a6525 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Max.Int32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Max.Int32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__MaxInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Max.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Max.SByte.cs index 9e66c81..3bff66d 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Max.SByte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Max.SByte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__MaxSByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Max.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Max.UInt16.cs index fa84e8a..1fc37228 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Max.UInt16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Max.UInt16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__MaxUInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Max.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Max.UInt32.cs index aec15f9..8f23998 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Max.UInt32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Max.UInt32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__MaxUInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Min.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Min.Byte.cs index b7817ab..1e457f4 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Min.Byte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Min.Byte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(byte.MinValue, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(byte.MinValue, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__MinByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(byte.MinValue, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(byte.MinValue, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(byte.MinValue, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(byte.MinValue, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(byte.MinValue, byte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(byte.MinValue, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Min.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Min.Int16.cs index 676a6e2..b960f75 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Min.Int16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Min.Int16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__MinInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Min.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Min.Int32.cs index 9fed4e2..36f40b7 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Min.Int32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Min.Int32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__MinInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Min.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Min.SByte.cs index e575af1..b5da9d8 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Min.SByte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Min.SByte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__MinSByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Min.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Min.UInt16.cs index 5317c11..68ab018 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Min.UInt16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Min.UInt16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__MinUInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Min.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Min.UInt32.cs index d08b57e..d1016d2 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Min.UInt32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Min.UInt32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__MinUInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.Byte.cs index 74feb80..6a3a348 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.Byte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.Byte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__OrByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.Int16.cs index 6d48000..3a8bf57e 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.Int16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.Int16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__OrInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.Int32.cs index 4e53579..9f07d53 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.Int32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.Int32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__OrInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.Int64.cs index e0b1fe8..7777166 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.Int64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.Int64.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__OrInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.SByte.cs index fb8116a..65ce643 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.SByte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.SByte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__OrSByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.UInt16.cs index cb8d629..82e7171 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.UInt16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.UInt16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__OrUInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.UInt32.cs index fc325b2..3ac45db 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.UInt32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.UInt32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__OrUInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.UInt64.cs index 87855e1..7fffb77 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.UInt64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Or.UInt64.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__OrUInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Permute2x128.Int32.2.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Permute2x128.Int32.2.cs index 640f477..b670def 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Permute2x128.Int32.2.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Permute2x128.Int32.2.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static ImmBinaryOpTest__Permute2x128Int322() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Permute2x128.Int64.2.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Permute2x128.Int64.2.cs index 95b8399..2fb8dbb 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Permute2x128.Int64.2.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Permute2x128.Int64.2.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static ImmBinaryOpTest__Permute2x128Int642() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Permute2x128.UInt32.2.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Permute2x128.UInt32.2.cs index 07dd1b7..0476216 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Permute2x128.UInt32.2.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Permute2x128.UInt32.2.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static ImmBinaryOpTest__Permute2x128UInt322() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Permute2x128.UInt64.2.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Permute2x128.UInt64.2.cs index b71a831..19579fe 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Permute2x128.UInt64.2.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Permute2x128.UInt64.2.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static ImmBinaryOpTest__Permute2x128UInt642() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.Int16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.Int16.1.cs index 4d8c65d..a632949 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.Int16.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.Int16.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftLeftLogicalInt161() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.Int16.16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.Int16.16.cs index 1a0c679..cd57722 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.Int16.16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.Int16.16.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftLeftLogicalInt1616() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.Int32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.Int32.1.cs index e927194..39bbeb3 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.Int32.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.Int32.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftLeftLogicalInt321() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.Int32.32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.Int32.32.cs index 91cd2a3..6cf4c10 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.Int32.32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.Int32.32.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftLeftLogicalInt3232() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.Int64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.Int64.1.cs index a6ac26e..b89d3e2 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.Int64.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.Int64.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftLeftLogicalInt641() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.Int64.64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.Int64.64.cs index 5b00b70..496b5ec 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.Int64.64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.Int64.64.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftLeftLogicalInt6464() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.UInt16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.UInt16.1.cs index 8f36a50..dc1c6ab 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.UInt16.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.UInt16.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftLeftLogicalUInt161() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.UInt16.16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.UInt16.16.cs index e0514cb..4b60e5f 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.UInt16.16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.UInt16.16.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftLeftLogicalUInt1616() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.UInt32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.UInt32.1.cs index 4c0d7e3..92ebe0e 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.UInt32.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.UInt32.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftLeftLogicalUInt321() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.UInt32.32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.UInt32.32.cs index 0ddf85a..44ecac2 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.UInt32.32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.UInt32.32.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftLeftLogicalUInt3232() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.UInt64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.UInt64.1.cs index d8af66e..7d8aed5 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.UInt64.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.UInt64.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftLeftLogicalUInt641() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.UInt64.64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.UInt64.64.cs index 7740a1e..c27baf3 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.UInt64.64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical.UInt64.64.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftLeftLogicalUInt6464() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.Byte.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.Byte.1.cs index 1be9fab..9a4dc7e 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.Byte.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.Byte.1.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftLeftLogical128BitLaneByte1() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.Int16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.Int16.1.cs index e85e184..9b641d3 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.Int16.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.Int16.1.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftLeftLogical128BitLaneInt161() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.Int32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.Int32.1.cs index 6125262..c98772e 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.Int32.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.Int32.1.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftLeftLogical128BitLaneInt321() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.Int64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.Int64.1.cs index 0cd8c16..7b21ae6 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.Int64.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.Int64.1.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftLeftLogical128BitLaneInt641() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.SByte.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.SByte.1.cs index f3d767d..593cf14 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.SByte.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.SByte.1.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftLeftLogical128BitLaneSByte1() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.UInt16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.UInt16.1.cs index f42f4ee..8667c7b 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.UInt16.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.UInt16.1.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftLeftLogical128BitLaneUInt161() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.UInt32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.UInt32.1.cs index 55571f8..b3f6d9a 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.UInt32.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.UInt32.1.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftLeftLogical128BitLaneUInt321() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.UInt64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.UInt64.1.cs index 2426bff..03c8a25 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.UInt64.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftLeftLogical128BitLane.UInt64.1.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftLeftLogical128BitLaneUInt641() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightArithmetic.Int16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightArithmetic.Int16.1.cs index 95f3257..8b9651b 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightArithmetic.Int16.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightArithmetic.Int16.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftRightArithmeticInt161() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightArithmetic.Int16.16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightArithmetic.Int16.16.cs index 069b034..9eec392 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightArithmetic.Int16.16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightArithmetic.Int16.16.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftRightArithmeticInt1616() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightArithmetic.Int32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightArithmetic.Int32.1.cs index bf29f8a..04b0e19 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightArithmetic.Int32.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightArithmetic.Int32.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftRightArithmeticInt321() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightArithmetic.Int32.32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightArithmetic.Int32.32.cs index 2d80f0f..ca39cba 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightArithmetic.Int32.32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightArithmetic.Int32.32.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftRightArithmeticInt3232() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.Int16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.Int16.1.cs index ecad25c..2956b3f 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.Int16.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.Int16.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftRightLogicalInt161() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.Int16.16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.Int16.16.cs index 1c97c54..8380732 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.Int16.16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.Int16.16.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftRightLogicalInt1616() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.Int32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.Int32.1.cs index e2206ad..11c671c 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.Int32.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.Int32.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftRightLogicalInt321() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.Int32.32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.Int32.32.cs index b074712..193b73f 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.Int32.32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.Int32.32.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftRightLogicalInt3232() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.Int64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.Int64.1.cs index 79e62b0..236dc0e 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.Int64.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.Int64.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftRightLogicalInt641() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.Int64.64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.Int64.64.cs index 9535d6d..46e195e 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.Int64.64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.Int64.64.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftRightLogicalInt6464() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.UInt16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.UInt16.1.cs index 4f23826..bec0203 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.UInt16.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.UInt16.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftRightLogicalUInt161() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.UInt16.16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.UInt16.16.cs index 04258e0..44e59f4 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.UInt16.16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.UInt16.16.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftRightLogicalUInt1616() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.UInt32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.UInt32.1.cs index e6f27cb..061ac8f 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.UInt32.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.UInt32.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftRightLogicalUInt321() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.UInt32.32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.UInt32.32.cs index 3deea8a..d3bf464 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.UInt32.32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.UInt32.32.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftRightLogicalUInt3232() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.UInt64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.UInt64.1.cs index 91a925c..31bc34b 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.UInt64.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.UInt64.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftRightLogicalUInt641() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.UInt64.64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.UInt64.64.cs index 93ac922..66d1cd0 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.UInt64.64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.UInt64.64.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftRightLogicalUInt6464() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.Byte.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.Byte.1.cs index d0fef0a..e5ae555 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.Byte.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.Byte.1.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftRightLogical128BitLaneByte1() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.Int16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.Int16.1.cs index cd616bb..8c31e22 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.Int16.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.Int16.1.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftRightLogical128BitLaneInt161() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.Int32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.Int32.1.cs index 025dfee..197e253 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.Int32.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.Int32.1.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftRightLogical128BitLaneInt321() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.Int64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.Int64.1.cs index 5059e7a..a197b9d 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.Int64.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.Int64.1.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftRightLogical128BitLaneInt641() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.SByte.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.SByte.1.cs index 4002f08..35b5f5e 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.SByte.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.SByte.1.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftRightLogical128BitLaneSByte1() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.UInt16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.UInt16.1.cs index 4f92ac6..aa6ce9d 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.UInt16.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.UInt16.1.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftRightLogical128BitLaneUInt161() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.UInt32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.UInt32.1.cs index ecd4cb7..968cfb2 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.UInt32.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.UInt32.1.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftRightLogical128BitLaneUInt321() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.UInt64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.UInt64.1.cs index f61b090..ed0b70b 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.UInt64.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical128BitLane.UInt64.1.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftRightLogical128BitLaneUInt641() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.Byte.cs index 781ef37..9464629 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.Byte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.Byte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__SubtractByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.Int16.cs index 8918965..37628d0 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.Int16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.Int16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__SubtractInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.Int32.cs index 041805b..06721cf 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.Int32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.Int32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__SubtractInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.Int64.cs index 37b1611..8fef9c4 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.Int64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.Int64.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__SubtractInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.SByte.cs index 8a60881..60b6216 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.SByte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.SByte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__SubtractSByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.UInt16.cs index c902762..130d725 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.UInt16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.UInt16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__SubtractUInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.UInt32.cs index 3452c01..21ec912 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.UInt32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.UInt32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__SubtractUInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.UInt64.cs index 211b381..1613aca 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.UInt64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Subtract.UInt64.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__SubtractUInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.Byte.cs index df002ce..a958fa5 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.Byte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.Byte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__XorByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.Int16.cs index 229b18c..a75a61b 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.Int16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.Int16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__XorInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.Int32.cs index a0e3f5a..b12b34d 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.Int32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.Int32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__XorInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.Int64.cs index 4071cfa..8ad689f 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.Int64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.Int64.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__XorInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.SByte.cs index a8bdee1..74d6a1a 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.SByte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.SByte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__XorSByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.UInt16.cs index 637db6a..d1d7de9 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.UInt16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.UInt16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__XorUInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.UInt32.cs index 2d0f60a..972e78c 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.UInt32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.UInt32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__XorUInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.UInt64.cs index 3f0be86..65c74b6 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.UInt64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2/Xor.UInt64.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__XorUInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.Int32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.Int32.1.cs index dfce571..af57e00 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.Int32.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.Int32.1.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static ImmBinaryOpTest__BlendInt321() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.Int32.2.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.Int32.2.cs index ef93882..18d46ec 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.Int32.2.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.Int32.2.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static ImmBinaryOpTest__BlendInt322() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.Int32.4.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.Int32.4.cs index b2efe5e..f816dec 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.Int32.4.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.Int32.4.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static ImmBinaryOpTest__BlendInt324() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.Int32.85.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.Int32.85.cs index 43fef94..a8a338a 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.Int32.85.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.Int32.85.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static ImmBinaryOpTest__BlendInt3285() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.UInt32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.UInt32.1.cs index 7a7cd9d..327c40a 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.UInt32.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.UInt32.1.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static ImmBinaryOpTest__BlendUInt321() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.UInt32.2.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.UInt32.2.cs index 354138f..2fc0d1b 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.UInt32.2.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.UInt32.2.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static ImmBinaryOpTest__BlendUInt322() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.UInt32.4.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.UInt32.4.cs index a0643c0..62a4afa 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.UInt32.4.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.UInt32.4.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static ImmBinaryOpTest__BlendUInt324() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.UInt32.85.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.UInt32.85.cs index cba26f0..d43d56c 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.UInt32.85.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx2_Vector128/Blend.UInt32.85.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static ImmBinaryOpTest__BlendUInt3285() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi1/AndNot.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi1/AndNot.UInt32.cs index 9959d51..6776155 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi1/AndNot.UInt32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi1/AndNot.UInt32.cs @@ -72,10 +72,9 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - testStruct._fld1 = (uint)(random.Next(0, int.MaxValue)); - testStruct._fld2 = (uint)(random.Next(0, int.MaxValue)); + testStruct._fld1 = TestLibrary.Generator.GetUInt32(); + testStruct._fld2 = TestLibrary.Generator.GetUInt32(); return testStruct; } @@ -98,22 +97,19 @@ namespace JIT.HardwareIntrinsics.X86 static ScalarBinaryOpTest__AndNotUInt32() { - var random = new Random(); - _clsVar1 = (uint)(random.Next(0, int.MaxValue)); - _clsVar2 = (uint)(random.Next(0, int.MaxValue)); + _clsVar1 = TestLibrary.Generator.GetUInt32(); + _clsVar2 = TestLibrary.Generator.GetUInt32(); } public ScalarBinaryOpTest__AndNotUInt32() { Succeeded = true; - var random = new Random(); + _fld1 = TestLibrary.Generator.GetUInt32(); + _fld2 = TestLibrary.Generator.GetUInt32(); - _fld1 = (uint)(random.Next(0, int.MaxValue)); - _fld2 = (uint)(random.Next(0, int.MaxValue)); - - _data1 = (uint)(random.Next(0, int.MaxValue)); - _data2 = (uint)(random.Next(0, int.MaxValue)); + _data1 = TestLibrary.Generator.GetUInt32(); + _data2 = TestLibrary.Generator.GetUInt32(); } public bool IsSupported => Bmi1.IsSupported && (Environment.Is64BitProcess || ((typeof(UInt32) != typeof(long)) && (typeof(UInt32) != typeof(ulong)))); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi1/AndNot.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi1/AndNot.UInt64.cs index d7a5be7..39ad725 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi1/AndNot.UInt64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi1/AndNot.UInt64.cs @@ -72,10 +72,9 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - testStruct._fld1 = (ulong)(random.Next(0, int.MaxValue)); - testStruct._fld2 = (ulong)(random.Next(0, int.MaxValue)); + testStruct._fld1 = TestLibrary.Generator.GetUInt64(); + testStruct._fld2 = TestLibrary.Generator.GetUInt64(); return testStruct; } @@ -98,22 +97,19 @@ namespace JIT.HardwareIntrinsics.X86 static ScalarBinaryOpTest__AndNotUInt64() { - var random = new Random(); - _clsVar1 = (ulong)(random.Next(0, int.MaxValue)); - _clsVar2 = (ulong)(random.Next(0, int.MaxValue)); + _clsVar1 = TestLibrary.Generator.GetUInt64(); + _clsVar2 = TestLibrary.Generator.GetUInt64(); } public ScalarBinaryOpTest__AndNotUInt64() { Succeeded = true; - var random = new Random(); + _fld1 = TestLibrary.Generator.GetUInt64(); + _fld2 = TestLibrary.Generator.GetUInt64(); - _fld1 = (ulong)(random.Next(0, int.MaxValue)); - _fld2 = (ulong)(random.Next(0, int.MaxValue)); - - _data1 = (ulong)(random.Next(0, int.MaxValue)); - _data2 = (ulong)(random.Next(0, int.MaxValue)); + _data1 = TestLibrary.Generator.GetUInt64(); + _data2 = TestLibrary.Generator.GetUInt64(); } public bool IsSupported => Bmi1.IsSupported && (Environment.Is64BitProcess || ((typeof(UInt64) != typeof(long)) && (typeof(UInt64) != typeof(ulong)))); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi1/ExtractLowestSetBit.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi1/ExtractLowestSetBit.UInt32.cs index a756f79..7a1b55b 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi1/ExtractLowestSetBit.UInt32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi1/ExtractLowestSetBit.UInt32.cs @@ -71,9 +71,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - testStruct._fld = (uint)(random.Next(0, int.MaxValue)); + testStruct._fld = TestLibrary.Generator.GetUInt32(); return testStruct; } @@ -92,18 +91,16 @@ namespace JIT.HardwareIntrinsics.X86 static ScalarUnaryOpTest__ExtractLowestSetBitUInt32() { - var random = new Random(); - _clsVar = (uint)(random.Next(0, int.MaxValue)); + _clsVar = TestLibrary.Generator.GetUInt32(); } public ScalarUnaryOpTest__ExtractLowestSetBitUInt32() { Succeeded = true; - var random = new Random(); - _fld = (uint)(random.Next(0, int.MaxValue)); - _data = (uint)(random.Next(0, int.MaxValue)); + _fld = TestLibrary.Generator.GetUInt32(); + _data = TestLibrary.Generator.GetUInt32(); } public bool IsSupported => Bmi1.IsSupported && (Environment.Is64BitProcess || ((typeof(UInt32) != typeof(long)) && (typeof(UInt32) != typeof(ulong)))); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi1/ExtractLowestSetBit.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi1/ExtractLowestSetBit.UInt64.cs index 5a67474..8604a35 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi1/ExtractLowestSetBit.UInt64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi1/ExtractLowestSetBit.UInt64.cs @@ -71,9 +71,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - testStruct._fld = (ulong)(random.Next(0, int.MaxValue)); + testStruct._fld = TestLibrary.Generator.GetUInt64(); return testStruct; } @@ -92,18 +91,16 @@ namespace JIT.HardwareIntrinsics.X86 static ScalarUnaryOpTest__ExtractLowestSetBitUInt64() { - var random = new Random(); - _clsVar = (ulong)(random.Next(0, int.MaxValue)); + _clsVar = TestLibrary.Generator.GetUInt64(); } public ScalarUnaryOpTest__ExtractLowestSetBitUInt64() { Succeeded = true; - var random = new Random(); - _fld = (ulong)(random.Next(0, int.MaxValue)); - _data = (ulong)(random.Next(0, int.MaxValue)); + _fld = TestLibrary.Generator.GetUInt64(); + _data = TestLibrary.Generator.GetUInt64(); } public bool IsSupported => Bmi1.IsSupported && (Environment.Is64BitProcess || ((typeof(UInt64) != typeof(long)) && (typeof(UInt64) != typeof(ulong)))); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi1/GetMaskUpToLowestSetBit.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi1/GetMaskUpToLowestSetBit.UInt32.cs index 24952e4..ba5d28e 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi1/GetMaskUpToLowestSetBit.UInt32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi1/GetMaskUpToLowestSetBit.UInt32.cs @@ -71,9 +71,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - testStruct._fld = (uint)(random.Next(0, int.MaxValue)); + testStruct._fld = TestLibrary.Generator.GetUInt32(); return testStruct; } @@ -92,18 +91,16 @@ namespace JIT.HardwareIntrinsics.X86 static ScalarUnaryOpTest__GetMaskUpToLowestSetBitUInt32() { - var random = new Random(); - _clsVar = (uint)(random.Next(0, int.MaxValue)); + _clsVar = TestLibrary.Generator.GetUInt32(); } public ScalarUnaryOpTest__GetMaskUpToLowestSetBitUInt32() { Succeeded = true; - var random = new Random(); - _fld = (uint)(random.Next(0, int.MaxValue)); - _data = (uint)(random.Next(0, int.MaxValue)); + _fld = TestLibrary.Generator.GetUInt32(); + _data = TestLibrary.Generator.GetUInt32(); } public bool IsSupported => Bmi1.IsSupported && (Environment.Is64BitProcess || ((typeof(UInt32) != typeof(long)) && (typeof(UInt32) != typeof(ulong)))); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi1/GetMaskUpToLowestSetBit.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi1/GetMaskUpToLowestSetBit.UInt64.cs index 64ea96b..8e74430 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi1/GetMaskUpToLowestSetBit.UInt64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi1/GetMaskUpToLowestSetBit.UInt64.cs @@ -71,9 +71,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - testStruct._fld = (ulong)(random.Next(0, int.MaxValue)); + testStruct._fld = TestLibrary.Generator.GetUInt64(); return testStruct; } @@ -92,18 +91,16 @@ namespace JIT.HardwareIntrinsics.X86 static ScalarUnaryOpTest__GetMaskUpToLowestSetBitUInt64() { - var random = new Random(); - _clsVar = (ulong)(random.Next(0, int.MaxValue)); + _clsVar = TestLibrary.Generator.GetUInt64(); } public ScalarUnaryOpTest__GetMaskUpToLowestSetBitUInt64() { Succeeded = true; - var random = new Random(); - _fld = (ulong)(random.Next(0, int.MaxValue)); - _data = (ulong)(random.Next(0, int.MaxValue)); + _fld = TestLibrary.Generator.GetUInt64(); + _data = TestLibrary.Generator.GetUInt64(); } public bool IsSupported => Bmi1.IsSupported && (Environment.Is64BitProcess || ((typeof(UInt64) != typeof(long)) && (typeof(UInt64) != typeof(ulong)))); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi1/ResetLowestSetBit.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi1/ResetLowestSetBit.UInt32.cs index dad2b90..8b30112 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi1/ResetLowestSetBit.UInt32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi1/ResetLowestSetBit.UInt32.cs @@ -71,9 +71,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - testStruct._fld = (uint)(random.Next(0, int.MaxValue)); + testStruct._fld = TestLibrary.Generator.GetUInt32(); return testStruct; } @@ -92,18 +91,16 @@ namespace JIT.HardwareIntrinsics.X86 static ScalarUnaryOpTest__ResetLowestSetBitUInt32() { - var random = new Random(); - _clsVar = (uint)(random.Next(0, int.MaxValue)); + _clsVar = TestLibrary.Generator.GetUInt32(); } public ScalarUnaryOpTest__ResetLowestSetBitUInt32() { Succeeded = true; - var random = new Random(); - _fld = (uint)(random.Next(0, int.MaxValue)); - _data = (uint)(random.Next(0, int.MaxValue)); + _fld = TestLibrary.Generator.GetUInt32(); + _data = TestLibrary.Generator.GetUInt32(); } public bool IsSupported => Bmi1.IsSupported && (Environment.Is64BitProcess || ((typeof(UInt32) != typeof(long)) && (typeof(UInt32) != typeof(ulong)))); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi1/ResetLowestSetBit.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi1/ResetLowestSetBit.UInt64.cs index cbc65bf..e98f2ac 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi1/ResetLowestSetBit.UInt64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi1/ResetLowestSetBit.UInt64.cs @@ -71,9 +71,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - testStruct._fld = (ulong)(random.Next(0, int.MaxValue)); + testStruct._fld = TestLibrary.Generator.GetUInt64(); return testStruct; } @@ -92,18 +91,16 @@ namespace JIT.HardwareIntrinsics.X86 static ScalarUnaryOpTest__ResetLowestSetBitUInt64() { - var random = new Random(); - _clsVar = (ulong)(random.Next(0, int.MaxValue)); + _clsVar = TestLibrary.Generator.GetUInt64(); } public ScalarUnaryOpTest__ResetLowestSetBitUInt64() { Succeeded = true; - var random = new Random(); - _fld = (ulong)(random.Next(0, int.MaxValue)); - _data = (ulong)(random.Next(0, int.MaxValue)); + _fld = TestLibrary.Generator.GetUInt64(); + _data = TestLibrary.Generator.GetUInt64(); } public bool IsSupported => Bmi1.IsSupported && (Environment.Is64BitProcess || ((typeof(UInt64) != typeof(long)) && (typeof(UInt64) != typeof(ulong)))); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi1/TrailingZeroCount.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi1/TrailingZeroCount.UInt32.cs index 86f107c..39be3a4 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi1/TrailingZeroCount.UInt32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi1/TrailingZeroCount.UInt32.cs @@ -71,9 +71,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - testStruct._fld = (uint)(random.Next(0, int.MaxValue)); + testStruct._fld = TestLibrary.Generator.GetUInt32(); return testStruct; } @@ -92,18 +91,16 @@ namespace JIT.HardwareIntrinsics.X86 static ScalarUnaryOpTest__TrailingZeroCountUInt32() { - var random = new Random(); - _clsVar = (uint)(random.Next(0, int.MaxValue)); + _clsVar = TestLibrary.Generator.GetUInt32(); } public ScalarUnaryOpTest__TrailingZeroCountUInt32() { Succeeded = true; - var random = new Random(); - _fld = (uint)(random.Next(0, int.MaxValue)); - _data = (uint)(random.Next(0, int.MaxValue)); + _fld = TestLibrary.Generator.GetUInt32(); + _data = TestLibrary.Generator.GetUInt32(); } public bool IsSupported => Bmi1.IsSupported && (Environment.Is64BitProcess || ((typeof(UInt32) != typeof(long)) && (typeof(UInt32) != typeof(ulong)))); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi1/TrailingZeroCount.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi1/TrailingZeroCount.UInt64.cs index c417334..a95b143 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi1/TrailingZeroCount.UInt64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi1/TrailingZeroCount.UInt64.cs @@ -71,9 +71,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - testStruct._fld = (ulong)(random.Next(0, int.MaxValue)); + testStruct._fld = TestLibrary.Generator.GetUInt64(); return testStruct; } @@ -92,18 +91,16 @@ namespace JIT.HardwareIntrinsics.X86 static ScalarUnaryOpTest__TrailingZeroCountUInt64() { - var random = new Random(); - _clsVar = (ulong)(random.Next(0, int.MaxValue)); + _clsVar = TestLibrary.Generator.GetUInt64(); } public ScalarUnaryOpTest__TrailingZeroCountUInt64() { Succeeded = true; - var random = new Random(); - _fld = (ulong)(random.Next(0, int.MaxValue)); - _data = (ulong)(random.Next(0, int.MaxValue)); + _fld = TestLibrary.Generator.GetUInt64(); + _data = TestLibrary.Generator.GetUInt64(); } public bool IsSupported => Bmi1.IsSupported && (Environment.Is64BitProcess || ((typeof(UInt64) != typeof(long)) && (typeof(UInt64) != typeof(ulong)))); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi2/ParallelBitDeposit.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi2/ParallelBitDeposit.UInt32.cs index 3ea47f6..9bdac88 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi2/ParallelBitDeposit.UInt32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi2/ParallelBitDeposit.UInt32.cs @@ -72,10 +72,9 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - testStruct._fld1 = (uint)(random.Next(0, int.MaxValue)); - testStruct._fld2 = (uint)(random.Next(0, int.MaxValue)); + testStruct._fld1 = TestLibrary.Generator.GetUInt32(); + testStruct._fld2 = TestLibrary.Generator.GetUInt32(); return testStruct; } @@ -98,22 +97,19 @@ namespace JIT.HardwareIntrinsics.X86 static ScalarBinaryOpTest__ParallelBitDepositUInt32() { - var random = new Random(); - _clsVar1 = (uint)(random.Next(0, int.MaxValue)); - _clsVar2 = (uint)(random.Next(0, int.MaxValue)); + _clsVar1 = TestLibrary.Generator.GetUInt32(); + _clsVar2 = TestLibrary.Generator.GetUInt32(); } public ScalarBinaryOpTest__ParallelBitDepositUInt32() { Succeeded = true; - var random = new Random(); + _fld1 = TestLibrary.Generator.GetUInt32(); + _fld2 = TestLibrary.Generator.GetUInt32(); - _fld1 = (uint)(random.Next(0, int.MaxValue)); - _fld2 = (uint)(random.Next(0, int.MaxValue)); - - _data1 = (uint)(random.Next(0, int.MaxValue)); - _data2 = (uint)(random.Next(0, int.MaxValue)); + _data1 = TestLibrary.Generator.GetUInt32(); + _data2 = TestLibrary.Generator.GetUInt32(); } public bool IsSupported => Bmi2.IsSupported && (Environment.Is64BitProcess || ((typeof(UInt32) != typeof(long)) && (typeof(UInt32) != typeof(ulong)))); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi2/ParallelBitDeposit.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi2/ParallelBitDeposit.UInt64.cs index 986327b..4a97366 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi2/ParallelBitDeposit.UInt64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi2/ParallelBitDeposit.UInt64.cs @@ -72,10 +72,9 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - testStruct._fld1 = (ulong)(random.Next(0, int.MaxValue)); - testStruct._fld2 = (ulong)(random.Next(0, int.MaxValue)); + testStruct._fld1 = TestLibrary.Generator.GetUInt64(); + testStruct._fld2 = TestLibrary.Generator.GetUInt64(); return testStruct; } @@ -98,22 +97,19 @@ namespace JIT.HardwareIntrinsics.X86 static ScalarBinaryOpTest__ParallelBitDepositUInt64() { - var random = new Random(); - _clsVar1 = (ulong)(random.Next(0, int.MaxValue)); - _clsVar2 = (ulong)(random.Next(0, int.MaxValue)); + _clsVar1 = TestLibrary.Generator.GetUInt64(); + _clsVar2 = TestLibrary.Generator.GetUInt64(); } public ScalarBinaryOpTest__ParallelBitDepositUInt64() { Succeeded = true; - var random = new Random(); + _fld1 = TestLibrary.Generator.GetUInt64(); + _fld2 = TestLibrary.Generator.GetUInt64(); - _fld1 = (ulong)(random.Next(0, int.MaxValue)); - _fld2 = (ulong)(random.Next(0, int.MaxValue)); - - _data1 = (ulong)(random.Next(0, int.MaxValue)); - _data2 = (ulong)(random.Next(0, int.MaxValue)); + _data1 = TestLibrary.Generator.GetUInt64(); + _data2 = TestLibrary.Generator.GetUInt64(); } public bool IsSupported => Bmi2.IsSupported && (Environment.Is64BitProcess || ((typeof(UInt64) != typeof(long)) && (typeof(UInt64) != typeof(ulong)))); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi2/ParallelBitExtract.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi2/ParallelBitExtract.UInt32.cs index 8207e1b..f9b4797 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi2/ParallelBitExtract.UInt32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi2/ParallelBitExtract.UInt32.cs @@ -72,10 +72,9 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - testStruct._fld1 = (uint)(random.Next(0, int.MaxValue)); - testStruct._fld2 = (uint)(random.Next(0, int.MaxValue)); + testStruct._fld1 = TestLibrary.Generator.GetUInt32(); + testStruct._fld2 = TestLibrary.Generator.GetUInt32(); return testStruct; } @@ -98,22 +97,19 @@ namespace JIT.HardwareIntrinsics.X86 static ScalarBinaryOpTest__ParallelBitExtractUInt32() { - var random = new Random(); - _clsVar1 = (uint)(random.Next(0, int.MaxValue)); - _clsVar2 = (uint)(random.Next(0, int.MaxValue)); + _clsVar1 = TestLibrary.Generator.GetUInt32(); + _clsVar2 = TestLibrary.Generator.GetUInt32(); } public ScalarBinaryOpTest__ParallelBitExtractUInt32() { Succeeded = true; - var random = new Random(); + _fld1 = TestLibrary.Generator.GetUInt32(); + _fld2 = TestLibrary.Generator.GetUInt32(); - _fld1 = (uint)(random.Next(0, int.MaxValue)); - _fld2 = (uint)(random.Next(0, int.MaxValue)); - - _data1 = (uint)(random.Next(0, int.MaxValue)); - _data2 = (uint)(random.Next(0, int.MaxValue)); + _data1 = TestLibrary.Generator.GetUInt32(); + _data2 = TestLibrary.Generator.GetUInt32(); } public bool IsSupported => Bmi2.IsSupported && (Environment.Is64BitProcess || ((typeof(UInt32) != typeof(long)) && (typeof(UInt32) != typeof(ulong)))); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi2/ParallelBitExtract.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi2/ParallelBitExtract.UInt64.cs index 0f391c3..3d69ba2 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi2/ParallelBitExtract.UInt64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Bmi2/ParallelBitExtract.UInt64.cs @@ -72,10 +72,9 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - testStruct._fld1 = (ulong)(random.Next(0, int.MaxValue)); - testStruct._fld2 = (ulong)(random.Next(0, int.MaxValue)); + testStruct._fld1 = TestLibrary.Generator.GetUInt64(); + testStruct._fld2 = TestLibrary.Generator.GetUInt64(); return testStruct; } @@ -98,22 +97,19 @@ namespace JIT.HardwareIntrinsics.X86 static ScalarBinaryOpTest__ParallelBitExtractUInt64() { - var random = new Random(); - _clsVar1 = (ulong)(random.Next(0, int.MaxValue)); - _clsVar2 = (ulong)(random.Next(0, int.MaxValue)); + _clsVar1 = TestLibrary.Generator.GetUInt64(); + _clsVar2 = TestLibrary.Generator.GetUInt64(); } public ScalarBinaryOpTest__ParallelBitExtractUInt64() { Succeeded = true; - var random = new Random(); + _fld1 = TestLibrary.Generator.GetUInt64(); + _fld2 = TestLibrary.Generator.GetUInt64(); - _fld1 = (ulong)(random.Next(0, int.MaxValue)); - _fld2 = (ulong)(random.Next(0, int.MaxValue)); - - _data1 = (ulong)(random.Next(0, int.MaxValue)); - _data2 = (ulong)(random.Next(0, int.MaxValue)); + _data1 = TestLibrary.Generator.GetUInt64(); + _data2 = TestLibrary.Generator.GetUInt64(); } public bool IsSupported => Bmi2.IsSupported && (Environment.Is64BitProcess || ((typeof(UInt64) != typeof(long)) && (typeof(UInt64) != typeof(ulong)))); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAdd.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAdd.Double.cs index bdb8736..b9911ba 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAdd.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAdd.Double.cs @@ -100,7 +100,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -144,8 +143,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleTernaryOpTest__MultiplyAddDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -158,8 +155,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAdd.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAdd.Single.cs index ab91915..ee0ed20 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAdd.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAdd.Single.cs @@ -100,7 +100,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -144,8 +143,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleTernaryOpTest__MultiplyAddSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -158,8 +155,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAddNegated.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAddNegated.Double.cs index 724719c..4c79102 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAddNegated.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAddNegated.Double.cs @@ -100,7 +100,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -144,8 +143,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleTernaryOpTest__MultiplyAddNegatedDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -158,8 +155,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAddNegated.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAddNegated.Single.cs index 8908a18..7e0978a 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAddNegated.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAddNegated.Single.cs @@ -100,7 +100,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -144,8 +143,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleTernaryOpTest__MultiplyAddNegatedSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -158,8 +155,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAddNegatedScalar.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAddNegatedScalar.Double.cs index 5ea409d..a737f0d 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAddNegatedScalar.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAddNegatedScalar.Double.cs @@ -100,7 +100,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -144,8 +143,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleTernaryOpTest__MultiplyAddNegatedScalarDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -158,8 +155,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAddNegatedScalar.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAddNegatedScalar.Single.cs index 99773dd..1082025 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAddNegatedScalar.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAddNegatedScalar.Single.cs @@ -100,7 +100,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -144,8 +143,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleTernaryOpTest__MultiplyAddNegatedScalarSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -158,8 +155,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAddScalar.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAddScalar.Double.cs index 5bd6d3c..f97a853 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAddScalar.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAddScalar.Double.cs @@ -100,7 +100,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -144,8 +143,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleTernaryOpTest__MultiplyAddScalarDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -158,8 +155,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAddScalar.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAddScalar.Single.cs index 4a1fec4..15eeddf 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAddScalar.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAddScalar.Single.cs @@ -100,7 +100,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -144,8 +143,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleTernaryOpTest__MultiplyAddScalarSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -158,8 +155,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAddSubtract.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAddSubtract.Double.cs index f8d6754..72d9aef 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAddSubtract.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAddSubtract.Double.cs @@ -100,7 +100,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -144,8 +143,6 @@ namespace JIT.HardwareIntrinsics.X86 static AlternatingTernaryOpTest__MultiplyAddSubtractDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -158,8 +155,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAddSubtract.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAddSubtract.Single.cs index b284b48..9ad02bb 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAddSubtract.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplyAddSubtract.Single.cs @@ -100,7 +100,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -144,8 +143,6 @@ namespace JIT.HardwareIntrinsics.X86 static AlternatingTernaryOpTest__MultiplyAddSubtractSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -158,8 +155,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtract.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtract.Double.cs index c79a9ef..2b218a9 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtract.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtract.Double.cs @@ -100,7 +100,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -144,8 +143,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleTernaryOpTest__MultiplySubtractDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -158,8 +155,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtract.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtract.Single.cs index 962b6b0..4aa9166 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtract.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtract.Single.cs @@ -100,7 +100,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -144,8 +143,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleTernaryOpTest__MultiplySubtractSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -158,8 +155,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtractAdd.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtractAdd.Double.cs index e318c0f..705b079 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtractAdd.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtractAdd.Double.cs @@ -100,7 +100,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -144,8 +143,6 @@ namespace JIT.HardwareIntrinsics.X86 static AlternatingTernaryOpTest__MultiplySubtractAddDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -158,8 +155,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtractAdd.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtractAdd.Single.cs index 0263818..ce474b4 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtractAdd.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtractAdd.Single.cs @@ -100,7 +100,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -144,8 +143,6 @@ namespace JIT.HardwareIntrinsics.X86 static AlternatingTernaryOpTest__MultiplySubtractAddSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -158,8 +155,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtractNegated.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtractNegated.Double.cs index 3c02979..4f8f337 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtractNegated.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtractNegated.Double.cs @@ -100,7 +100,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -144,8 +143,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleTernaryOpTest__MultiplySubtractNegatedDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -158,8 +155,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtractNegated.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtractNegated.Single.cs index 971cbd0..530727c 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtractNegated.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtractNegated.Single.cs @@ -100,7 +100,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -144,8 +143,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleTernaryOpTest__MultiplySubtractNegatedSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -158,8 +155,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtractNegatedScalar.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtractNegatedScalar.Double.cs index fcb9436..71a35f7 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtractNegatedScalar.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtractNegatedScalar.Double.cs @@ -100,7 +100,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -144,8 +143,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleTernaryOpTest__MultiplySubtractNegatedScalarDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -158,8 +155,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtractNegatedScalar.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtractNegatedScalar.Single.cs index 1f38d25..7f6a12d 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtractNegatedScalar.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtractNegatedScalar.Single.cs @@ -100,7 +100,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -144,8 +143,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleTernaryOpTest__MultiplySubtractNegatedScalarSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -158,8 +155,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtractScalar.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtractScalar.Double.cs index a58ce72..f293443 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtractScalar.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtractScalar.Double.cs @@ -100,7 +100,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -144,8 +143,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleTernaryOpTest__MultiplySubtractScalarDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -158,8 +155,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtractScalar.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtractScalar.Single.cs index 31ea26d..8c7e663 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtractScalar.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector128/MultiplySubtractScalar.Single.cs @@ -100,7 +100,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -144,8 +143,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleTernaryOpTest__MultiplySubtractScalarSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -158,8 +155,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplyAdd.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplyAdd.Double.cs index 1fb87e4..5a3d67b 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplyAdd.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplyAdd.Double.cs @@ -100,7 +100,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -144,8 +143,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleTernaryOpTest__MultiplyAddDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -158,8 +155,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplyAdd.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplyAdd.Single.cs index acf8922..5d81695 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplyAdd.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplyAdd.Single.cs @@ -100,7 +100,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -144,8 +143,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleTernaryOpTest__MultiplyAddSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -158,8 +155,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplyAddNegated.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplyAddNegated.Double.cs index 78f9893..8d51612 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplyAddNegated.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplyAddNegated.Double.cs @@ -100,7 +100,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -144,8 +143,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleTernaryOpTest__MultiplyAddNegatedDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -158,8 +155,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplyAddNegated.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplyAddNegated.Single.cs index 06aeb8d..ad04c89 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplyAddNegated.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplyAddNegated.Single.cs @@ -100,7 +100,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -144,8 +143,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleTernaryOpTest__MultiplyAddNegatedSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -158,8 +155,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplyAddSubtract.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplyAddSubtract.Double.cs index 58ad565..3cb27f2 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplyAddSubtract.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplyAddSubtract.Double.cs @@ -100,7 +100,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -144,8 +143,6 @@ namespace JIT.HardwareIntrinsics.X86 static AlternatingTernaryOpTest__MultiplyAddSubtractDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -158,8 +155,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplyAddSubtract.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplyAddSubtract.Single.cs index fd7e747..301a2a3 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplyAddSubtract.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplyAddSubtract.Single.cs @@ -100,7 +100,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -144,8 +143,6 @@ namespace JIT.HardwareIntrinsics.X86 static AlternatingTernaryOpTest__MultiplyAddSubtractSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -158,8 +155,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplySubtract.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplySubtract.Double.cs index 9b094b8..6a8f6d3 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplySubtract.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplySubtract.Double.cs @@ -100,7 +100,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -144,8 +143,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleTernaryOpTest__MultiplySubtractDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -158,8 +155,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplySubtract.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplySubtract.Single.cs index a85cbfc..ca134ca 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplySubtract.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplySubtract.Single.cs @@ -100,7 +100,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -144,8 +143,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleTernaryOpTest__MultiplySubtractSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -158,8 +155,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplySubtractAdd.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplySubtractAdd.Double.cs index ef5f658..9ff40d7 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplySubtractAdd.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplySubtractAdd.Double.cs @@ -100,7 +100,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -144,8 +143,6 @@ namespace JIT.HardwareIntrinsics.X86 static AlternatingTernaryOpTest__MultiplySubtractAddDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -158,8 +155,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplySubtractAdd.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplySubtractAdd.Single.cs index 65642d0..db5aaa9 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplySubtractAdd.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplySubtractAdd.Single.cs @@ -100,7 +100,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -144,8 +143,6 @@ namespace JIT.HardwareIntrinsics.X86 static AlternatingTernaryOpTest__MultiplySubtractAddSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -158,8 +155,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplySubtractNegated.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplySubtractNegated.Double.cs index 523eda9..c88c066 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplySubtractNegated.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplySubtractNegated.Double.cs @@ -100,7 +100,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -144,8 +143,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleTernaryOpTest__MultiplySubtractNegatedDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -158,8 +155,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplySubtractNegated.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplySubtractNegated.Single.cs index 30aa66e..cbb211a 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplySubtractNegated.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Fma_Vector256/MultiplySubtractNegated.Single.cs @@ -100,7 +100,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -144,8 +143,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleTernaryOpTest__MultiplySubtractNegatedSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -158,8 +155,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Add.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Add.Single.cs index 051b000..6bc2146 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Add.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Add.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AddSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/AddScalar.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/AddScalar.Single.cs index eff3aab..d35b6cf 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/AddScalar.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/AddScalar.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AddScalarSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/And.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/And.Single.cs index dc74d31..a7b0ddf 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/And.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/And.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AndSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/AndNot.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/AndNot.Single.cs index 818fdc2..8f721c6 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/AndNot.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/AndNot.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AndNotSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareEqual.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareEqual.Single.cs index 4653227..3388472 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareEqual.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareEqual.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareEqualSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareEqualOrderedScalar.Boolean.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareEqualOrderedScalar.Boolean.cs index 8ddc353..672fe39 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareEqualOrderedScalar.Boolean.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareEqualOrderedScalar.Boolean.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -134,8 +133,6 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanComparisonOpTest__CompareEqualOrderedScalarBoolean() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -146,8 +143,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareEqualScalar.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareEqualScalar.Single.cs index a90769a..db824ea 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareEqualScalar.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareEqualScalar.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareEqualScalarSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareEqualUnorderedScalar.Boolean.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareEqualUnorderedScalar.Boolean.cs index 50d870b..b074e2e 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareEqualUnorderedScalar.Boolean.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareEqualUnorderedScalar.Boolean.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -134,8 +133,6 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanComparisonOpTest__CompareEqualUnorderedScalarBoolean() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -146,8 +143,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareGreaterThan.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareGreaterThan.Single.cs index 9268aae..f45d044 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareGreaterThan.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareGreaterThan.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareGreaterThanSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareGreaterThanOrEqual.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareGreaterThanOrEqual.Single.cs index 8ab4726..dbaba37 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareGreaterThanOrEqual.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareGreaterThanOrEqual.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareGreaterThanOrEqualSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareGreaterThanOrEqualOrderedScalar.Boolean.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareGreaterThanOrEqualOrderedScalar.Boolean.cs index 5628e8f..8c94ef3 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareGreaterThanOrEqualOrderedScalar.Boolean.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareGreaterThanOrEqualOrderedScalar.Boolean.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -134,8 +133,6 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanComparisonOpTest__CompareGreaterThanOrEqualOrderedScalarBoolean() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -146,8 +143,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareGreaterThanOrEqualScalar.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareGreaterThanOrEqualScalar.Single.cs index 209c2ea..7a65898 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareGreaterThanOrEqualScalar.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareGreaterThanOrEqualScalar.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareGreaterThanOrEqualScalarSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareGreaterThanOrEqualUnorderedScalar.Boolean.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareGreaterThanOrEqualUnorderedScalar.Boolean.cs index 84b8aa4..131b787 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareGreaterThanOrEqualUnorderedScalar.Boolean.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareGreaterThanOrEqualUnorderedScalar.Boolean.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -134,8 +133,6 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanComparisonOpTest__CompareGreaterThanOrEqualUnorderedScalarBoolean() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -146,8 +143,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareGreaterThanOrderedScalar.Boolean.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareGreaterThanOrderedScalar.Boolean.cs index fc6f3ae..3ea4f89 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareGreaterThanOrderedScalar.Boolean.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareGreaterThanOrderedScalar.Boolean.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -134,8 +133,6 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanComparisonOpTest__CompareGreaterThanOrderedScalarBoolean() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -146,8 +143,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareGreaterThanScalar.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareGreaterThanScalar.Single.cs index c1ef4fd..0a9ebb7 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareGreaterThanScalar.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareGreaterThanScalar.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareGreaterThanScalarSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareGreaterThanUnorderedScalar.Boolean.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareGreaterThanUnorderedScalar.Boolean.cs index 34ca97f..f59203e 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareGreaterThanUnorderedScalar.Boolean.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareGreaterThanUnorderedScalar.Boolean.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -134,8 +133,6 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanComparisonOpTest__CompareGreaterThanUnorderedScalarBoolean() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -146,8 +143,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareLessThan.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareLessThan.Single.cs index a56167d..89b58b8 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareLessThan.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareLessThan.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareLessThanSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareLessThanOrEqual.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareLessThanOrEqual.Single.cs index a5399a5..813f9a7 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareLessThanOrEqual.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareLessThanOrEqual.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareLessThanOrEqualSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareLessThanOrEqualOrderedScalar.Boolean.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareLessThanOrEqualOrderedScalar.Boolean.cs index fa38be8..4f40cf8 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareLessThanOrEqualOrderedScalar.Boolean.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareLessThanOrEqualOrderedScalar.Boolean.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -134,8 +133,6 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanComparisonOpTest__CompareLessThanOrEqualOrderedScalarBoolean() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -146,8 +143,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareLessThanOrEqualScalar.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareLessThanOrEqualScalar.Single.cs index a5f7314..1e8d991 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareLessThanOrEqualScalar.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareLessThanOrEqualScalar.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareLessThanOrEqualScalarSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareLessThanOrEqualUnorderedScalar.Boolean.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareLessThanOrEqualUnorderedScalar.Boolean.cs index cb7b246..3a17770 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareLessThanOrEqualUnorderedScalar.Boolean.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareLessThanOrEqualUnorderedScalar.Boolean.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -134,8 +133,6 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanComparisonOpTest__CompareLessThanOrEqualUnorderedScalarBoolean() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -146,8 +143,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareLessThanOrderedScalar.Boolean.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareLessThanOrderedScalar.Boolean.cs index 95a89ec..b39cc9f 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareLessThanOrderedScalar.Boolean.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareLessThanOrderedScalar.Boolean.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -134,8 +133,6 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanComparisonOpTest__CompareLessThanOrderedScalarBoolean() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -146,8 +143,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareLessThanScalar.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareLessThanScalar.Single.cs index ddcd4dd..269e807 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareLessThanScalar.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareLessThanScalar.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareLessThanScalarSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareLessThanUnorderedScalar.Boolean.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareLessThanUnorderedScalar.Boolean.cs index b6ef513..2ae72ef 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareLessThanUnorderedScalar.Boolean.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareLessThanUnorderedScalar.Boolean.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -134,8 +133,6 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanComparisonOpTest__CompareLessThanUnorderedScalarBoolean() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -146,8 +143,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotEqual.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotEqual.Single.cs index 57edc42..1fa3070 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotEqual.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotEqual.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareNotEqualSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotEqualOrderedScalar.Boolean.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotEqualOrderedScalar.Boolean.cs index e9c10cd..5e3d339 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotEqualOrderedScalar.Boolean.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotEqualOrderedScalar.Boolean.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -134,8 +133,6 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanComparisonOpTest__CompareNotEqualOrderedScalarBoolean() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -146,8 +143,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotEqualScalar.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotEqualScalar.Single.cs index b2c2677..52db598 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotEqualScalar.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotEqualScalar.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareNotEqualScalarSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotEqualUnorderedScalar.Boolean.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotEqualUnorderedScalar.Boolean.cs index ec1ce41..2fdb19a 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotEqualUnorderedScalar.Boolean.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotEqualUnorderedScalar.Boolean.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -134,8 +133,6 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanComparisonOpTest__CompareNotEqualUnorderedScalarBoolean() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -146,8 +143,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotGreaterThan.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotGreaterThan.Single.cs index 9e208ab..d017500 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotGreaterThan.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotGreaterThan.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareNotGreaterThanSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotGreaterThanOrEqual.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotGreaterThanOrEqual.Single.cs index de3e045..2036fca 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotGreaterThanOrEqual.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotGreaterThanOrEqual.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareNotGreaterThanOrEqualSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotGreaterThanOrEqualScalar.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotGreaterThanOrEqualScalar.Single.cs index fb308f4..1b74155 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotGreaterThanOrEqualScalar.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotGreaterThanOrEqualScalar.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareNotGreaterThanOrEqualScalarSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotGreaterThanScalar.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotGreaterThanScalar.Single.cs index dd10df4..3f4e618 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotGreaterThanScalar.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotGreaterThanScalar.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareNotGreaterThanScalarSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotLessThan.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotLessThan.Single.cs index 8108c2f..e2d32f1 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotLessThan.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotLessThan.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareNotLessThanSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotLessThanOrEqual.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotLessThanOrEqual.Single.cs index a4847a7..3ac5860 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotLessThanOrEqual.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotLessThanOrEqual.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareNotLessThanOrEqualSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotLessThanOrEqualScalar.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotLessThanOrEqualScalar.Single.cs index f13c451..8e9b066 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotLessThanOrEqualScalar.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotLessThanOrEqualScalar.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareNotLessThanOrEqualScalarSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotLessThanScalar.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotLessThanScalar.Single.cs index 515fe16..cb1e5a1 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotLessThanScalar.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareNotLessThanScalar.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareNotLessThanScalarSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareOrdered.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareOrdered.Single.cs index 1017857..9a51a53 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareOrdered.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareOrdered.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareOrderedSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareOrderedScalar.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareOrderedScalar.Single.cs index 06c2968..766bf55 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareOrderedScalar.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareOrderedScalar.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareOrderedScalarSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareUnordered.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareUnordered.Single.cs index 44ac371..b3cd667 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareUnordered.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareUnordered.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareUnorderedSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareUnorderedScalar.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareUnorderedScalar.Single.cs index 960af43..719e315 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareUnorderedScalar.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/CompareUnorderedScalar.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareUnorderedScalarSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Divide.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Divide.Single.cs index 6b3d264..6bcdc0a 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Divide.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Divide.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__DivideSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/DivideScalar.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/DivideScalar.Single.cs index ede254d..ba26bc7 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/DivideScalar.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/DivideScalar.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__DivideScalarSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Max.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Max.Single.cs index 8e7164a..7c6d4a1 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Max.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Max.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__MaxSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/MaxScalar.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/MaxScalar.Single.cs index cf0621d..e2b19b8 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/MaxScalar.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/MaxScalar.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__MaxScalarSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Min.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Min.Single.cs index c628b26..dae0089 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Min.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Min.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__MinSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/MinScalar.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/MinScalar.Single.cs index 240c4f7..4f603ae 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/MinScalar.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/MinScalar.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__MinScalarSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Multiply.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Multiply.Single.cs index 6722af2..b0ab895 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Multiply.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Multiply.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__MultiplySingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/MultiplyScalar.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/MultiplyScalar.Single.cs index 94eff09..654a16a 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/MultiplyScalar.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/MultiplyScalar.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__MultiplyScalarSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Or.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Or.Single.cs index 10c51b3..cdae4d5 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Or.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Or.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__OrSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Subtract.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Subtract.Single.cs index b4b7739..13f7451 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Subtract.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Subtract.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__SubtractSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/SubtractScalar.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/SubtractScalar.Single.cs index 308d8f5..9eeb4b5 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/SubtractScalar.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/SubtractScalar.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__SubtractScalarSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Xor.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Xor.Single.cs index 74348c1..da6ccb8 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Xor.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse/Xor.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__XorSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.Byte.cs index 38e90d9..c97641f 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.Byte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.Byte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AddByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.Double.cs index 2b4d7a7..185b263 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.Double.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AddDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.Int16.cs index 96e3b5b..5f3dc3f 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.Int16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.Int16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AddInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.Int32.cs index 881fb09..718ddff 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.Int32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.Int32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AddInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.Int64.cs index 5c86b0a..46fc8cb 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.Int64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.Int64.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AddInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.SByte.cs index 4770b87..e920b5a 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.SByte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.SByte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AddSByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.UInt16.cs index 15db700..c7dfbef 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.UInt16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.UInt16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AddUInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.UInt32.cs index 84594a2..3b95543 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.UInt32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.UInt32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AddUInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.UInt64.cs index 8d980e5..71f3825 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.UInt64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Add.UInt64.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AddUInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AddSaturate.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AddSaturate.Byte.cs index 05167c3..763f18f 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AddSaturate.Byte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AddSaturate.Byte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AddSaturateByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AddSaturate.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AddSaturate.Int16.cs index a92647f..cea585e 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AddSaturate.Int16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AddSaturate.Int16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AddSaturateInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AddSaturate.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AddSaturate.SByte.cs index 4bf96f1..9136691 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AddSaturate.SByte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AddSaturate.SByte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AddSaturateSByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AddSaturate.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AddSaturate.UInt16.cs index d13a09e..517802f 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AddSaturate.UInt16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AddSaturate.UInt16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(ushort.MinValue,ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(ushort.MinValue,ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AddSaturateUInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(ushort.MinValue,ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(ushort.MinValue,ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(ushort.MinValue,ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(ushort.MinValue,ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(ushort.MinValue,ushort.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(ushort.MinValue,ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AddScalar.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AddScalar.Double.cs index 4bbcb5d..e5fe7fa4 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AddScalar.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AddScalar.Double.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AddScalarDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.Byte.cs index 1be8d48..4b00fa5 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.Byte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.Byte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AndByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.Double.cs index 3a70acf..89133cb 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.Double.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AndDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.Int16.cs index c4e0ea8..ed805c1 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.Int16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.Int16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AndInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.Int32.cs index bf79d04..3774059 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.Int32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.Int32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AndInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.Int64.cs index 62ed1d9..dbcf972 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.Int64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.Int64.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AndInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.SByte.cs index e510ff5..51f5897 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.SByte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.SByte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AndSByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.UInt16.cs index ff0cc5a..f296099 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.UInt16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.UInt16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AndUInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.UInt32.cs index 933b355..7a403e5 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.UInt32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.UInt32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AndUInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.UInt64.cs index dc5fb77..0cb7e3a 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.UInt64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/And.UInt64.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AndUInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.Byte.cs index 6c89b18..a040532 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.Byte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.Byte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AndNotByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.Double.cs index 7676865..1b1ca8f 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.Double.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AndNotDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.Int16.cs index 20d3bf9..90e52c6 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.Int16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.Int16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AndNotInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.Int32.cs index 94829cb..d870b53 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.Int32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.Int32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AndNotInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.Int64.cs index 881dd4b..f23f563 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.Int64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.Int64.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AndNotInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.SByte.cs index 491425f..13ae3c5 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.SByte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.SByte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AndNotSByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.UInt16.cs index e5ed906..61dcf9b 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.UInt16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.UInt16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AndNotUInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.UInt32.cs index dff2132..a456d20 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.UInt32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.UInt32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AndNotUInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.UInt64.cs index 0e9b171..b42dca7 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.UInt64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/AndNot.UInt64.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AndNotUInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Average.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Average.Byte.cs index c96f396..3743cf7 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Average.Byte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Average.Byte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AverageByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Average.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Average.UInt16.cs index 9f58b01..dd6b07d 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Average.UInt16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Average.UInt16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(ushort.MinValue,ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(ushort.MinValue,ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__AverageUInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(ushort.MinValue,ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(ushort.MinValue,ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(ushort.MinValue,ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(ushort.MinValue,ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(ushort.MinValue,ushort.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(ushort.MinValue,ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareEqual.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareEqual.Byte.cs index 6efd782..42a4e5d 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareEqual.Byte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareEqual.Byte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareEqualByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareEqual.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareEqual.Double.cs index 0e801b6..dccc79b 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareEqual.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareEqual.Double.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareEqualDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareEqual.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareEqual.Int16.cs index c1c70b8..0000b64 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareEqual.Int16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareEqual.Int16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareEqualInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareEqual.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareEqual.Int32.cs index 792e7e7..f7dcb14 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareEqual.Int32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareEqual.Int32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareEqualInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareEqual.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareEqual.SByte.cs index b663bad..ccee8a4 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareEqual.SByte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareEqual.SByte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareEqualSByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareEqual.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareEqual.UInt16.cs index 87ddcda..b690410 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareEqual.UInt16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareEqual.UInt16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareEqualUInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareEqual.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareEqual.UInt32.cs index 7cd6599..6e4eee4 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareEqual.UInt32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareEqual.UInt32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareEqualUInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareGreaterThan.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareGreaterThan.Double.cs index a0a2479..fec68a3 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareGreaterThan.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareGreaterThan.Double.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareGreaterThanDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareGreaterThan.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareGreaterThan.Int16.cs index d334a5d..31127aa 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareGreaterThan.Int16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareGreaterThan.Int16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareGreaterThanInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareGreaterThan.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareGreaterThan.Int32.cs index 28dfd69..b1a4705 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareGreaterThan.Int32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareGreaterThan.Int32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareGreaterThanInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareGreaterThan.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareGreaterThan.SByte.cs index 9b8ac00..a1a475f 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareGreaterThan.SByte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareGreaterThan.SByte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareGreaterThanSByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareGreaterThanOrEqual.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareGreaterThanOrEqual.Double.cs index 3c3f7a0..dd1a42a 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareGreaterThanOrEqual.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareGreaterThanOrEqual.Double.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareGreaterThanOrEqualDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareLessThan.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareLessThan.Double.cs index 5b73fe9..6b3b870 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareLessThan.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareLessThan.Double.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareLessThanDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareLessThan.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareLessThan.Int16.cs index c7dd978..ac9113f 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareLessThan.Int16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareLessThan.Int16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareLessThanInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareLessThan.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareLessThan.Int32.cs index a188cac..ed1170f 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareLessThan.Int32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareLessThan.Int32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareLessThanInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareLessThan.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareLessThan.SByte.cs index fb63d86..f44b733 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareLessThan.SByte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareLessThan.SByte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareLessThanSByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareLessThanOrEqual.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareLessThanOrEqual.Double.cs index cce9463..95c5a35 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareLessThanOrEqual.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareLessThanOrEqual.Double.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareLessThanOrEqualDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareNotEqual.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareNotEqual.Double.cs index 33aa8a4..7623ebe 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareNotEqual.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareNotEqual.Double.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareNotEqualDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareNotGreaterThan.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareNotGreaterThan.Double.cs index 57a3ac5..3134235 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareNotGreaterThan.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareNotGreaterThan.Double.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareNotGreaterThanDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareNotGreaterThanOrEqual.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareNotGreaterThanOrEqual.Double.cs index 640891c..819e876 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareNotGreaterThanOrEqual.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareNotGreaterThanOrEqual.Double.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareNotGreaterThanOrEqualDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareNotLessThan.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareNotLessThan.Double.cs index e8bc62b..8a91ec2 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareNotLessThan.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareNotLessThan.Double.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareNotLessThanDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareNotLessThanOrEqual.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareNotLessThanOrEqual.Double.cs index ebc12a5..fa33e7e 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareNotLessThanOrEqual.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareNotLessThanOrEqual.Double.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareNotLessThanOrEqualDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareOrdered.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareOrdered.Double.cs index 2523b44d..ea1f2aa 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareOrdered.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareOrdered.Double.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareOrderedDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareUnordered.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareUnordered.Double.cs index 3a449b1..768fdb9 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareUnordered.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/CompareUnordered.Double.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareUnorderedDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Divide.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Divide.Double.cs index 2d9c857..cfb46d3 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Divide.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Divide.Double.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__DivideDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/DivideScalar.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/DivideScalar.Double.cs index 090b68f..c5d8a59 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/DivideScalar.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/DivideScalar.Double.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__DivideScalarDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Extract.UInt16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Extract.UInt16.1.cs index 1f71a9b..01655ed 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Extract.UInt16.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Extract.UInt16.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractScalarTest__ExtractUInt161() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Extract.UInt16.129.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Extract.UInt16.129.cs index cbb63a3..201c6be 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Extract.UInt16.129.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Extract.UInt16.129.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractScalarTest__ExtractUInt16129() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Insert.Int16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Insert.Int16.1.cs index 5c993d0..496e77a 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Insert.Int16.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Insert.Int16.1.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static InsertScalarTest__InsertInt161() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Insert.Int16.129.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Insert.Int16.129.cs index 0823f2c..a1dcb90 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Insert.Int16.129.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Insert.Int16.129.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static InsertScalarTest__InsertInt16129() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Insert.UInt16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Insert.UInt16.1.cs index b97d8d1..ab53e07 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Insert.UInt16.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Insert.UInt16.1.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static InsertScalarTest__InsertUInt161() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Insert.UInt16.129.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Insert.UInt16.129.cs index 53598ca..bf6c40c 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Insert.UInt16.129.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Insert.UInt16.129.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static InsertScalarTest__InsertUInt16129() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)0; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Max.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Max.Byte.cs index 44df944..3c7e4d8 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Max.Byte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Max.Byte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__MaxByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Max.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Max.Double.cs index 88261f8..c74288e 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Max.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Max.Double.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__MaxDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Max.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Max.Int16.cs index 0830171..d48393f 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Max.Int16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Max.Int16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__MaxInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/MaxScalar.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/MaxScalar.Double.cs index 2ccd84a..af58591 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/MaxScalar.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/MaxScalar.Double.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__MaxScalarDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Min.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Min.Byte.cs index 7c6d85d..69cd5fc 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Min.Byte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Min.Byte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MinValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MinValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__MinByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MinValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MinValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MinValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MinValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MinValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MinValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Min.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Min.Double.cs index 87471cd..cbdca42c 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Min.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Min.Double.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__MinDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Min.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Min.Int16.cs index b9fa072..327fa5c 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Min.Int16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Min.Int16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MinValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MinValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__MinInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MinValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MinValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MinValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MinValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MinValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MinValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/MinScalar.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/MinScalar.Double.cs index 17bb0ee..001d2d1 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/MinScalar.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/MinScalar.Double.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__MinScalarDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Multiply.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Multiply.Double.cs index 658277a..c0db478 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Multiply.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Multiply.Double.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__MultiplyDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/MultiplyScalar.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/MultiplyScalar.Double.cs index 85b3df8..dfa41dc 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/MultiplyScalar.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/MultiplyScalar.Double.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__MultiplyScalarDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.Byte.cs index 3bdcd9d..09745f6 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.Byte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.Byte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__OrByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.Double.cs index 1b91447..822281d 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.Double.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__OrDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.Int16.cs index 43023876..18f6974 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.Int16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.Int16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__OrInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.Int32.cs index f9216ce..64aa8c3 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.Int32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.Int32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__OrInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.Int64.cs index f589a82..40d8100 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.Int64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.Int64.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__OrInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.SByte.cs index 27f743e..39005e2 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.SByte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.SByte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__OrSByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.UInt16.cs index d8da42e..1b2f948 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.UInt16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.UInt16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__OrUInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.UInt32.cs index f77ff71..edfb251 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.UInt32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.UInt32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__OrUInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.UInt64.cs index 9c82866..3d60b66 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.UInt64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Or.UInt64.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__OrUInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SetAllVector128.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SetAllVector128.Byte.cs index bbe35d0..2ff76f6 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SetAllVector128.Byte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SetAllVector128.Byte.cs @@ -71,9 +71,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - testStruct._fld = (byte)(random.Next(byte.MinValue, byte.MaxValue)); + testStruct._fld = TestLibrary.Generator.GetByte(); return testStruct; } @@ -100,17 +99,15 @@ namespace JIT.HardwareIntrinsics.X86 static ScalarSimdUnaryOpTest__SetAllVector128Byte() { - var random = new Random(); - _clsVar = (byte)(random.Next(byte.MinValue, byte.MaxValue)); + _clsVar = TestLibrary.Generator.GetByte(); } public ScalarSimdUnaryOpTest__SetAllVector128Byte() { Succeeded = true; - var random = new Random(); - _fld = (byte)(random.Next(byte.MinValue, byte.MaxValue)); - _data = (byte)(random.Next(byte.MinValue, byte.MaxValue)); + _fld = TestLibrary.Generator.GetByte(); + _data = TestLibrary.Generator.GetByte(); _dataTable = new ScalarSimdUnaryOpTest__DataTable(new Byte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SetAllVector128.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SetAllVector128.Double.cs index 7d80eab..e2ccd46 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SetAllVector128.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SetAllVector128.Double.cs @@ -71,7 +71,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); testStruct._fld = TestLibrary.Generator.GetDouble(); return testStruct; @@ -100,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 static ScalarSimdUnaryOpTest__SetAllVector128Double() { - var random = new Random(); _clsVar = TestLibrary.Generator.GetDouble(); } @@ -108,7 +106,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); _fld = TestLibrary.Generator.GetDouble(); _data = TestLibrary.Generator.GetDouble(); _dataTable = new ScalarSimdUnaryOpTest__DataTable(new Double[RetElementCount], LargestVectorSize); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SetAllVector128.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SetAllVector128.Int16.cs index 91bc3f5..5cfa504 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SetAllVector128.Int16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SetAllVector128.Int16.cs @@ -71,9 +71,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - testStruct._fld = (short)(random.Next(short.MinValue, short.MaxValue)); + testStruct._fld = TestLibrary.Generator.GetInt16(); return testStruct; } @@ -100,17 +99,15 @@ namespace JIT.HardwareIntrinsics.X86 static ScalarSimdUnaryOpTest__SetAllVector128Int16() { - var random = new Random(); - _clsVar = (short)(random.Next(short.MinValue, short.MaxValue)); + _clsVar = TestLibrary.Generator.GetInt16(); } public ScalarSimdUnaryOpTest__SetAllVector128Int16() { Succeeded = true; - var random = new Random(); - _fld = (short)(random.Next(short.MinValue, short.MaxValue)); - _data = (short)(random.Next(short.MinValue, short.MaxValue)); + _fld = TestLibrary.Generator.GetInt16(); + _data = TestLibrary.Generator.GetInt16(); _dataTable = new ScalarSimdUnaryOpTest__DataTable(new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SetAllVector128.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SetAllVector128.Int32.cs index 9f620c4..60482f2 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SetAllVector128.Int32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SetAllVector128.Int32.cs @@ -71,9 +71,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - testStruct._fld = (int)(random.Next(int.MinValue, int.MaxValue)); + testStruct._fld = TestLibrary.Generator.GetInt32(); return testStruct; } @@ -100,17 +99,15 @@ namespace JIT.HardwareIntrinsics.X86 static ScalarSimdUnaryOpTest__SetAllVector128Int32() { - var random = new Random(); - _clsVar = (int)(random.Next(int.MinValue, int.MaxValue)); + _clsVar = TestLibrary.Generator.GetInt32(); } public ScalarSimdUnaryOpTest__SetAllVector128Int32() { Succeeded = true; - var random = new Random(); - _fld = (int)(random.Next(int.MinValue, int.MaxValue)); - _data = (int)(random.Next(int.MinValue, int.MaxValue)); + _fld = TestLibrary.Generator.GetInt32(); + _data = TestLibrary.Generator.GetInt32(); _dataTable = new ScalarSimdUnaryOpTest__DataTable(new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SetAllVector128.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SetAllVector128.Int64.cs index f5521e5..747c70a 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SetAllVector128.Int64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SetAllVector128.Int64.cs @@ -71,9 +71,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - testStruct._fld = (long)(random.Next(int.MinValue, int.MaxValue)); + testStruct._fld = TestLibrary.Generator.GetInt64(); return testStruct; } @@ -100,17 +99,15 @@ namespace JIT.HardwareIntrinsics.X86 static ScalarSimdUnaryOpTest__SetAllVector128Int64() { - var random = new Random(); - _clsVar = (long)(random.Next(int.MinValue, int.MaxValue)); + _clsVar = TestLibrary.Generator.GetInt64(); } public ScalarSimdUnaryOpTest__SetAllVector128Int64() { Succeeded = true; - var random = new Random(); - _fld = (long)(random.Next(int.MinValue, int.MaxValue)); - _data = (long)(random.Next(int.MinValue, int.MaxValue)); + _fld = TestLibrary.Generator.GetInt64(); + _data = TestLibrary.Generator.GetInt64(); _dataTable = new ScalarSimdUnaryOpTest__DataTable(new Int64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SetAllVector128.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SetAllVector128.SByte.cs index d7ded31..7ac3a50 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SetAllVector128.SByte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SetAllVector128.SByte.cs @@ -71,9 +71,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - testStruct._fld = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); + testStruct._fld = TestLibrary.Generator.GetSByte(); return testStruct; } @@ -100,17 +99,15 @@ namespace JIT.HardwareIntrinsics.X86 static ScalarSimdUnaryOpTest__SetAllVector128SByte() { - var random = new Random(); - _clsVar = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); + _clsVar = TestLibrary.Generator.GetSByte(); } public ScalarSimdUnaryOpTest__SetAllVector128SByte() { Succeeded = true; - var random = new Random(); - _fld = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); - _data = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); + _fld = TestLibrary.Generator.GetSByte(); + _data = TestLibrary.Generator.GetSByte(); _dataTable = new ScalarSimdUnaryOpTest__DataTable(new SByte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SetAllVector128.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SetAllVector128.UInt16.cs index b19b6ec..fc8d0d6 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SetAllVector128.UInt16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SetAllVector128.UInt16.cs @@ -71,9 +71,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - testStruct._fld = (ushort)(random.Next(ushort.MinValue, ushort.MaxValue)); + testStruct._fld = TestLibrary.Generator.GetUInt16(); return testStruct; } @@ -100,17 +99,15 @@ namespace JIT.HardwareIntrinsics.X86 static ScalarSimdUnaryOpTest__SetAllVector128UInt16() { - var random = new Random(); - _clsVar = (ushort)(random.Next(ushort.MinValue, ushort.MaxValue)); + _clsVar = TestLibrary.Generator.GetUInt16(); } public ScalarSimdUnaryOpTest__SetAllVector128UInt16() { Succeeded = true; - var random = new Random(); - _fld = (ushort)(random.Next(ushort.MinValue, ushort.MaxValue)); - _data = (ushort)(random.Next(ushort.MinValue, ushort.MaxValue)); + _fld = TestLibrary.Generator.GetUInt16(); + _data = TestLibrary.Generator.GetUInt16(); _dataTable = new ScalarSimdUnaryOpTest__DataTable(new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SetAllVector128.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SetAllVector128.UInt32.cs index 5c84bbf..32702bf 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SetAllVector128.UInt32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SetAllVector128.UInt32.cs @@ -71,9 +71,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - testStruct._fld = (uint)(random.Next(0, int.MaxValue)); + testStruct._fld = TestLibrary.Generator.GetUInt32(); return testStruct; } @@ -100,17 +99,15 @@ namespace JIT.HardwareIntrinsics.X86 static ScalarSimdUnaryOpTest__SetAllVector128UInt32() { - var random = new Random(); - _clsVar = (uint)(random.Next(0, int.MaxValue)); + _clsVar = TestLibrary.Generator.GetUInt32(); } public ScalarSimdUnaryOpTest__SetAllVector128UInt32() { Succeeded = true; - var random = new Random(); - _fld = (uint)(random.Next(0, int.MaxValue)); - _data = (uint)(random.Next(0, int.MaxValue)); + _fld = TestLibrary.Generator.GetUInt32(); + _data = TestLibrary.Generator.GetUInt32(); _dataTable = new ScalarSimdUnaryOpTest__DataTable(new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SetAllVector128.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SetAllVector128.UInt64.cs index e2e8298..159eb04 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SetAllVector128.UInt64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SetAllVector128.UInt64.cs @@ -71,9 +71,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - testStruct._fld = (ulong)(random.Next(0, int.MaxValue)); + testStruct._fld = TestLibrary.Generator.GetUInt64(); return testStruct; } @@ -100,17 +99,15 @@ namespace JIT.HardwareIntrinsics.X86 static ScalarSimdUnaryOpTest__SetAllVector128UInt64() { - var random = new Random(); - _clsVar = (ulong)(random.Next(0, int.MaxValue)); + _clsVar = TestLibrary.Generator.GetUInt64(); } public ScalarSimdUnaryOpTest__SetAllVector128UInt64() { Succeeded = true; - var random = new Random(); - _fld = (ulong)(random.Next(0, int.MaxValue)); - _data = (ulong)(random.Next(0, int.MaxValue)); + _fld = TestLibrary.Generator.GetUInt64(); + _data = TestLibrary.Generator.GetUInt64(); _dataTable = new ScalarSimdUnaryOpTest__DataTable(new UInt64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.Int16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.Int16.1.cs index 482a420..7775351 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.Int16.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.Int16.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftLeftLogicalInt161() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.Int16.16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.Int16.16.cs index a335433..dcffdaf 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.Int16.16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.Int16.16.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftLeftLogicalInt1616() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.Int32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.Int32.1.cs index ac43387..1046500 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.Int32.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.Int32.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftLeftLogicalInt321() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.Int32.32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.Int32.32.cs index d16ab0f..d0f5c6e 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.Int32.32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.Int32.32.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftLeftLogicalInt3232() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.Int64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.Int64.1.cs index ba86fd1..2d5e560 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.Int64.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.Int64.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftLeftLogicalInt641() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.Int64.64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.Int64.64.cs index a919c07..35e4ed2 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.Int64.64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.Int64.64.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftLeftLogicalInt6464() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.UInt16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.UInt16.1.cs index 62770dd..02de439 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.UInt16.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.UInt16.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftLeftLogicalUInt161() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.UInt16.16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.UInt16.16.cs index d24c22b..e961582 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.UInt16.16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.UInt16.16.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftLeftLogicalUInt1616() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.UInt32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.UInt32.1.cs index 2b1b5f8..489776c 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.UInt32.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.UInt32.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftLeftLogicalUInt321() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.UInt32.32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.UInt32.32.cs index 49ed2e2..dd8b67d 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.UInt32.32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.UInt32.32.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftLeftLogicalUInt3232() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.UInt64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.UInt64.1.cs index 521d813..5d52c51 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.UInt64.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.UInt64.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftLeftLogicalUInt641() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.UInt64.64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.UInt64.64.cs index 483dc4c..df3926b 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.UInt64.64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical.UInt64.64.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftLeftLogicalUInt6464() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.Byte.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.Byte.1.cs index 966cbc8..0750c6a 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.Byte.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.Byte.1.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftLeftLogical128BitLaneByte1() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.Int16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.Int16.1.cs index f0ab9e5..0dfb57d 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.Int16.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.Int16.1.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftLeftLogical128BitLaneInt161() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.Int32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.Int32.1.cs index 62a2158..82cc098 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.Int32.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.Int32.1.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftLeftLogical128BitLaneInt321() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.Int64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.Int64.1.cs index 735e6d1..67c73f8 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.Int64.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.Int64.1.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftLeftLogical128BitLaneInt641() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.SByte.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.SByte.1.cs index 5d5aaac..258c444 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.SByte.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.SByte.1.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftLeftLogical128BitLaneSByte1() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.UInt16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.UInt16.1.cs index b6c16ce..aa2ca91 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.UInt16.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.UInt16.1.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftLeftLogical128BitLaneUInt161() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.UInt32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.UInt32.1.cs index ed0e220..13860d4 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.UInt32.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.UInt32.1.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftLeftLogical128BitLaneUInt321() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.UInt64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.UInt64.1.cs index fdf7387..38ce681 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.UInt64.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftLeftLogical128BitLane.UInt64.1.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftLeftLogical128BitLaneUInt641() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightArithmetic.Int16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightArithmetic.Int16.1.cs index e5279f3..dab1df0 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightArithmetic.Int16.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightArithmetic.Int16.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftRightArithmeticInt161() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightArithmetic.Int16.16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightArithmetic.Int16.16.cs index f1b074d..16a3ea0 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightArithmetic.Int16.16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightArithmetic.Int16.16.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftRightArithmeticInt1616() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightArithmetic.Int32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightArithmetic.Int32.1.cs index bcafaf4..88b57c6 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightArithmetic.Int32.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightArithmetic.Int32.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftRightArithmeticInt321() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightArithmetic.Int32.32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightArithmetic.Int32.32.cs index 7f1794a..b114cd6 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightArithmetic.Int32.32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightArithmetic.Int32.32.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftRightArithmeticInt3232() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.Int16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.Int16.1.cs index 8b45c9e..7abba5d 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.Int16.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.Int16.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftRightLogicalInt161() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.Int16.16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.Int16.16.cs index 04ea371..69376a9 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.Int16.16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.Int16.16.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftRightLogicalInt1616() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(0, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.Int32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.Int32.1.cs index 7a720d6..38e54c7 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.Int32.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.Int32.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftRightLogicalInt321() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.Int32.32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.Int32.32.cs index ee96701..07e29e6 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.Int32.32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.Int32.32.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftRightLogicalInt3232() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.Int64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.Int64.1.cs index bd512de..06acadf 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.Int64.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.Int64.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftRightLogicalInt641() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.Int64.64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.Int64.64.cs index 10262ef..30d8ce2 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.Int64.64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.Int64.64.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftRightLogicalInt6464() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.UInt16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.UInt16.1.cs index 1ead83a..404a148 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.UInt16.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.UInt16.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftRightLogicalUInt161() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.UInt16.16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.UInt16.16.cs index ab30e06..64b9524 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.UInt16.16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.UInt16.16.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftRightLogicalUInt1616() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.UInt32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.UInt32.1.cs index 4e1cb2e..a01b4f9 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.UInt32.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.UInt32.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftRightLogicalUInt321() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.UInt32.32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.UInt32.32.cs index 5016efe..16f3f2d 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.UInt32.32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.UInt32.32.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftRightLogicalUInt3232() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.UInt64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.UInt64.1.cs index dfe91a8..b041ad5 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.UInt64.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.UInt64.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftRightLogicalUInt641() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.UInt64.64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.UInt64.64.cs index ae02fe8..83ce45f 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.UInt64.64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical.UInt64.64.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftRightLogicalUInt6464() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.Byte.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.Byte.1.cs index 3a6b513..1463f54 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.Byte.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.Byte.1.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftRightLogical128BitLaneByte1() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.Int16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.Int16.1.cs index 0e64543..b3c2e49 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.Int16.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.Int16.1.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftRightLogical128BitLaneInt161() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.Int32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.Int32.1.cs index aa23481..6ca2ea2 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.Int32.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.Int32.1.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftRightLogical128BitLaneInt321() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.Int64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.Int64.1.cs index 29f8cc4..125abd8 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.Int64.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.Int64.1.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftRightLogical128BitLaneInt641() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.SByte.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.SByte.1.cs index b3e9ff8..63c7010 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.SByte.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.SByte.1.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftRightLogical128BitLaneSByte1() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.UInt16.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.UInt16.1.cs index c274462..2998ae0 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.UInt16.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.UInt16.1.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftRightLogical128BitLaneUInt161() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.UInt32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.UInt32.1.cs index 6939fcc..ee27c53 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.UInt32.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.UInt32.1.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftRightLogical128BitLaneUInt321() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.UInt64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.UInt64.1.cs index 2db4063..3845732 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.UInt64.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/ShiftRightLogical128BitLane.UInt64.1.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static ImmUnaryOpTest__ShiftRightLogical128BitLaneUInt641() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)8; } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.Byte.cs index b6af4d9..aaced39 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.Byte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.Byte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__SubtractByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.Double.cs index 3a3b81b..4635c29 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.Double.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__SubtractDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.Int16.cs index 10f9135..3200eac 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.Int16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.Int16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__SubtractInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.Int32.cs index 612e908..dd74d58 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.Int32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.Int32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__SubtractInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.Int64.cs index 3bf0115..a3ab26c 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.Int64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.Int64.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__SubtractInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.SByte.cs index dfa23ed..3ff24e74 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.SByte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.SByte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__SubtractSByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.UInt16.cs index 7673527..3228b4f 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.UInt16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.UInt16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__SubtractUInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.UInt32.cs index c389108..9bb7333 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.UInt32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.UInt32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__SubtractUInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.UInt64.cs index bf0ecf4..61b3e92 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.UInt64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Subtract.UInt64.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__SubtractUInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SubtractSaturate.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SubtractSaturate.Byte.cs index 661c1b7..621543d 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SubtractSaturate.Byte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SubtractSaturate.Byte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__SubtractSaturateByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SubtractSaturate.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SubtractSaturate.Int16.cs index 49ea9db..4a80eaf 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SubtractSaturate.Int16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SubtractSaturate.Int16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__SubtractSaturateInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SubtractSaturate.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SubtractSaturate.SByte.cs index 09d4c9b..45e38a3 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SubtractSaturate.SByte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SubtractSaturate.SByte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__SubtractSaturateSByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SubtractSaturate.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SubtractSaturate.UInt16.cs index b914098..058542a 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SubtractSaturate.UInt16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SubtractSaturate.UInt16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(ushort.MinValue,ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(ushort.MinValue,ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__SubtractSaturateUInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(ushort.MinValue,ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(ushort.MinValue,ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(ushort.MinValue,ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(ushort.MinValue,ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(ushort.MinValue,ushort.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(ushort.MinValue,ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SubtractScalar.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SubtractScalar.Double.cs index a822c1d..dead139 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SubtractScalar.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/SubtractScalar.Double.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__SubtractScalarDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.Byte.cs index e4c6391..8ce37a3 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.Byte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.Byte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__XorByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.Double.cs index 70e7138..9517421 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.Double.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__XorDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.Int16.cs index f26b33d..f147c6b 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.Int16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.Int16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__XorInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.Int32.cs index c9f3d1d..dd8a52b 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.Int32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.Int32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__XorInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.Int64.cs index d3825af..3088b0a 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.Int64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.Int64.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__XorInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.SByte.cs index c852f6d..4bb5dfb 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.SByte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.SByte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__XorSByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.UInt16.cs index e864199..19c600a 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.UInt16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.UInt16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__XorUInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.UInt32.cs index c5bc929..ca80235 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.UInt32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.UInt32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__XorUInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.UInt64.cs index 06d7998a6..bb5a8b3 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.UInt64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse2/Xor.UInt64.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__XorUInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse3/AddSubtract.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse3/AddSubtract.Double.cs index 05d5115..f666d53 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse3/AddSubtract.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse3/AddSubtract.Double.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static AlternatingBinaryOpTest__AddSubtractDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse3/AddSubtract.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse3/AddSubtract.Single.cs index 0b35e24..deb19bb 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse3/AddSubtract.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse3/AddSubtract.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static AlternatingBinaryOpTest__AddSubtractSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse3/HorizontalAdd.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse3/HorizontalAdd.Double.cs index 22bd6c4..3e44d5a 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse3/HorizontalAdd.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse3/HorizontalAdd.Double.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static HorizontalBinaryOpTest__HorizontalAddDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse3/HorizontalAdd.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse3/HorizontalAdd.Single.cs index 5c6ebdc..9d00ff9 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse3/HorizontalAdd.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse3/HorizontalAdd.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static HorizontalBinaryOpTest__HorizontalAddSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse3/HorizontalSubtract.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse3/HorizontalSubtract.Double.cs index efadf16..db2cea3 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse3/HorizontalSubtract.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse3/HorizontalSubtract.Double.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static HorizontalBinaryOpTest__HorizontalSubtractDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse3/HorizontalSubtract.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse3/HorizontalSubtract.Single.cs index 11a5c5a..05ec132 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse3/HorizontalSubtract.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse3/HorizontalSubtract.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static HorizontalBinaryOpTest__HorizontalSubtractSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/BlendVariable.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/BlendVariable.Byte.cs index 8adff41..1783b1d 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/BlendVariable.Byte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/BlendVariable.Byte.cs @@ -100,11 +100,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (byte)(((i % 2) == 0) ? 128 : 1); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); @@ -144,11 +143,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleTernaryOpTest__BlendVariableByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (byte)(((i % 2) == 0) ? 128 : 1); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); @@ -158,17 +155,15 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (byte)(((i % 2) == 0) ? 128 : 1); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (byte)(((i % 2) == 0) ? 128 : 1); } _dataTable = new SimpleTernaryOpTest__DataTable(_data1, _data2, _data3, new Byte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/BlendVariable.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/BlendVariable.Double.cs index ad0b483..602a06b 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/BlendVariable.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/BlendVariable.Double.cs @@ -100,7 +100,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -144,8 +143,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleTernaryOpTest__BlendVariableDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -158,8 +155,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/BlendVariable.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/BlendVariable.SByte.cs index 950404f..3969557 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/BlendVariable.SByte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/BlendVariable.SByte.cs @@ -100,11 +100,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (sbyte)(((i % 2) == 0) ? -128 : 1); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); @@ -144,11 +143,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleTernaryOpTest__BlendVariableSByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (sbyte)(((i % 2) == 0) ? -128 : 1); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); @@ -158,17 +155,15 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (sbyte)(((i % 2) == 0) ? -128 : 1); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld3), ref Unsafe.As(ref _data3[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } for (var i = 0; i < Op3ElementCount; i++) { _data3[i] = (sbyte)(((i % 2) == 0) ? -128 : 1); } _dataTable = new SimpleTernaryOpTest__DataTable(_data1, _data2, _data3, new SByte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/BlendVariable.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/BlendVariable.Single.cs index 049d576..573956b 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/BlendVariable.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/BlendVariable.Single.cs @@ -100,7 +100,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -144,8 +143,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleTernaryOpTest__BlendVariableSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -158,8 +155,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Ceiling.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Ceiling.Double.cs index 2c52bf0..004de3e 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Ceiling.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Ceiling.Double.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleUnaryOpTest__CeilingDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Ceiling.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Ceiling.Single.cs index d6f0c5b..9093d1e 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Ceiling.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Ceiling.Single.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleUnaryOpTest__CeilingSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/CeilingScalar.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/CeilingScalar.Double.cs index c52f86a..0764e9f 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/CeilingScalar.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/CeilingScalar.Double.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CeilingScalarDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/CeilingScalar.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/CeilingScalar.Single.cs index 943416a..39b6fa0 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/CeilingScalar.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/CeilingScalar.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CeilingScalarSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/CompareEqual.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/CompareEqual.Int64.cs index 33c35a4..49efddd 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/CompareEqual.Int64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/CompareEqual.Int64.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareEqualInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/CompareEqual.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/CompareEqual.UInt64.cs index 8fae999..8181abb 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/CompareEqual.UInt64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/CompareEqual.UInt64.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareEqualUInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Byte.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Byte.1.cs index e8d01d1..7077bfb 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Byte.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Byte.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractScalarTest__ExtractByte1() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Byte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Byte.129.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Byte.129.cs index f911455..64e3fd3 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Byte.129.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Byte.129.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractScalarTest__ExtractByte129() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Byte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Int32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Int32.1.cs index 4832bf9..59019ae 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Int32.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Int32.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractScalarTest__ExtractInt321() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Int32.129.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Int32.129.cs index 700869d..77fac2e 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Int32.129.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Int32.129.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractScalarTest__ExtractInt32129() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Int64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Int64.1.cs index 68a4bef..3d554c6 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Int64.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Int64.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractScalarTest__ExtractInt641() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Int64.129.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Int64.129.cs index 0ec0397..3949c63 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Int64.129.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Int64.129.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractScalarTest__ExtractInt64129() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Single.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Single.1.cs index 806044c..ce21f48 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Single.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Single.1.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractScalarTest__ExtractSingle1() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Single.129.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Single.129.cs index e56ffca..b889075 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Single.129.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.Single.129.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractScalarTest__ExtractSingle129() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.UInt32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.UInt32.1.cs index 7f99293..e2a9b5f 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.UInt32.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.UInt32.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractScalarTest__ExtractUInt321() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.UInt32.129.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.UInt32.129.cs index ccc5182..e54387d 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.UInt32.129.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.UInt32.129.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractScalarTest__ExtractUInt32129() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.UInt64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.UInt64.1.cs index 5f2b73a..0a6eaaf 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.UInt64.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.UInt64.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractScalarTest__ExtractUInt641() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.UInt64.129.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.UInt64.129.cs index b3c078f..64a5e13 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.UInt64.129.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Extract.UInt64.129.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static ExtractScalarTest__ExtractUInt64129() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Floor.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Floor.Double.cs index aa7305a..8768605 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Floor.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Floor.Double.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleUnaryOpTest__FloorDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Floor.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Floor.Single.cs index 4f8eb3c..64c7d06 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Floor.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Floor.Single.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleUnaryOpTest__FloorSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/FloorScalar.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/FloorScalar.Double.cs index 84b106b..a4365d8 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/FloorScalar.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/FloorScalar.Double.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__FloorScalarDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/FloorScalar.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/FloorScalar.Single.cs index a38180c..8bde1b4 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/FloorScalar.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/FloorScalar.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__FloorScalarSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Byte.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Byte.1.cs index 3f1be01..007dc1f 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Byte.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Byte.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static InsertScalarTest__InsertByte1() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Byte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Byte.129.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Byte.129.cs index 5eca738..c7132df 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Byte.129.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Byte.129.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static InsertScalarTest__InsertByte129() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Byte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Int32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Int32.1.cs index 93df386..d81df1e 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Int32.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Int32.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static InsertScalarTest__InsertInt321() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Int32.129.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Int32.129.cs index e9dbb57..44a7e9d 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Int32.129.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Int32.129.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static InsertScalarTest__InsertInt32129() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Int64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Int64.1.cs index ff88a45..f10d59a 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Int64.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Int64.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static InsertScalarTest__InsertInt641() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Int64.129.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Int64.129.cs index a8022f1..674c5c9 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Int64.129.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Int64.129.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static InsertScalarTest__InsertInt64129() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Int64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.SByte.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.SByte.1.cs index b5df60d..8f5606c 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.SByte.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.SByte.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static InsertScalarTest__InsertSByte1() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new SByte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.SByte.129.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.SByte.129.cs index a267ce7..eedec97 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.SByte.129.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.SByte.129.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static InsertScalarTest__InsertSByte129() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(0, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new SByte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Single.0.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Single.0.cs index 7447bfd..633a333 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Single.0.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.Single.0.cs @@ -101,7 +101,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -139,8 +138,6 @@ namespace JIT.HardwareIntrinsics.X86 static InsertVector128Test__InsertSingle0() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -151,8 +148,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } 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 index 9ac2c18..a41cfce 100644 --- 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 @@ -101,7 +101,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -139,8 +138,6 @@ namespace JIT.HardwareIntrinsics.X86 static InsertVector128Test__InsertSingle1() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -151,8 +148,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } 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 index 26b132e..da73965 100644 --- 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 @@ -101,7 +101,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -139,8 +138,6 @@ namespace JIT.HardwareIntrinsics.X86 static InsertVector128Test__InsertSingle128() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -151,8 +148,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } 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 index 895b0a8..fede1c5 100644 --- 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 @@ -101,7 +101,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -139,8 +138,6 @@ namespace JIT.HardwareIntrinsics.X86 static InsertVector128Test__InsertSingle129() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -151,8 +148,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } 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 index 4d09531..d6ce59a 100644 --- 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 @@ -101,7 +101,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -139,8 +138,6 @@ namespace JIT.HardwareIntrinsics.X86 static InsertVector128Test__InsertSingle16() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -151,8 +148,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } 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 index cbd08fd..0279bf3 100644 --- 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 @@ -101,7 +101,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -139,8 +138,6 @@ namespace JIT.HardwareIntrinsics.X86 static InsertVector128Test__InsertSingle192() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -151,8 +148,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } 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 index e86be9a..8557595 100644 --- 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 @@ -101,7 +101,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -139,8 +138,6 @@ namespace JIT.HardwareIntrinsics.X86 static InsertVector128Test__InsertSingle2() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -151,8 +148,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } 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 index 22c531f..6591829 100644 --- 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 @@ -101,7 +101,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -139,8 +138,6 @@ namespace JIT.HardwareIntrinsics.X86 static InsertVector128Test__InsertSingle32() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -151,8 +148,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } 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 index 155e637..30f100d 100644 --- 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 @@ -101,7 +101,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -139,8 +138,6 @@ namespace JIT.HardwareIntrinsics.X86 static InsertVector128Test__InsertSingle4() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -151,8 +148,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } 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 index c49c545..44e034d 100644 --- 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 @@ -101,7 +101,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -139,8 +138,6 @@ namespace JIT.HardwareIntrinsics.X86 static InsertVector128Test__InsertSingle48() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -151,8 +148,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } 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 index d84e2a7..f5b1fbb 100644 --- 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 @@ -101,7 +101,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -139,8 +138,6 @@ namespace JIT.HardwareIntrinsics.X86 static InsertVector128Test__InsertSingle64() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -151,8 +148,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } 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 index 68d6990..11df841 100644 --- 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 @@ -101,7 +101,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -139,8 +138,6 @@ namespace JIT.HardwareIntrinsics.X86 static InsertVector128Test__InsertSingle8() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -151,8 +148,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.UInt32.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.UInt32.1.cs index fe15741..ac9cefd 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.UInt32.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.UInt32.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static InsertScalarTest__InsertUInt321() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.UInt32.129.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.UInt32.129.cs index 1443f1f..ce88da4 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.UInt32.129.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.UInt32.129.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static InsertScalarTest__InsertUInt32129() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.UInt64.1.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.UInt64.1.cs index 0bb31ad..fb0b7f6 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.UInt64.1.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.UInt64.1.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static InsertScalarTest__InsertUInt641() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.UInt64.129.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.UInt64.129.cs index e7646d4..d610ec8 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.UInt64.129.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Insert.UInt64.129.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static InsertScalarTest__InsertUInt64129() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Max.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Max.Int32.cs index 150f645..a18edbc 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Max.Int32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Max.Int32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__MaxInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Max.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Max.SByte.cs index 6565d02..8ae64d6 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Max.SByte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Max.SByte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__MaxSByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Max.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Max.UInt16.cs index 3ae9810..ab9621a 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Max.UInt16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Max.UInt16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__MaxUInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Max.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Max.UInt32.cs index 078c116..3874c78 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Max.UInt32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Max.UInt32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__MaxUInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Min.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Min.Int32.cs index 8c9625f..058cfd9 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Min.Int32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Min.Int32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__MinInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Min.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Min.SByte.cs index 062ad81..8d5ef83 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Min.SByte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Min.SByte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__MinSByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Min.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Min.UInt16.cs index 338b193..d5da14c 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Min.UInt16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Min.UInt16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__MinUInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Min.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Min.UInt32.cs index f078444..b6fc5e5 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Min.UInt32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/Min.UInt32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__MinUInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/MultiplyLow.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/MultiplyLow.Int32.cs index eb4d718..53f7737 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/MultiplyLow.Int32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/MultiplyLow.Int32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__MultiplyLowInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/PackUnsignedSaturate.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/PackUnsignedSaturate.UInt16.cs index d778c2a..80e5a5e 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/PackUnsignedSaturate.UInt16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/PackUnsignedSaturate.UInt16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static HorizontalBinaryOpTest__PackUnsignedSaturateUInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new HorizontalBinaryOpTest__DataTable(_data1, _data2, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundCurrentDirection.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundCurrentDirection.Double.cs index 129cd4b..075a75d 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundCurrentDirection.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundCurrentDirection.Double.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleUnaryOpTest__RoundCurrentDirectionDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundCurrentDirection.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundCurrentDirection.Single.cs index de88f2f..cc848a0 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundCurrentDirection.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundCurrentDirection.Single.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleUnaryOpTest__RoundCurrentDirectionSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundCurrentDirectionScalar.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundCurrentDirectionScalar.Double.cs index 2dbb572..f270483 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundCurrentDirectionScalar.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundCurrentDirectionScalar.Double.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__RoundCurrentDirectionScalarDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundCurrentDirectionScalar.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundCurrentDirectionScalar.Single.cs index c1b1256..2bf63fa 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundCurrentDirectionScalar.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundCurrentDirectionScalar.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__RoundCurrentDirectionScalarSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNearestInteger.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNearestInteger.Double.cs index d17eae1..ec8369c 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNearestInteger.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNearestInteger.Double.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleUnaryOpTest__RoundToNearestIntegerDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNearestInteger.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNearestInteger.Single.cs index 6e03bdd..74bb100 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNearestInteger.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNearestInteger.Single.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleUnaryOpTest__RoundToNearestIntegerSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNearestIntegerScalar.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNearestIntegerScalar.Double.cs index e5d64e0..2919bf2 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNearestIntegerScalar.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNearestIntegerScalar.Double.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__RoundToNearestIntegerScalarDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNearestIntegerScalar.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNearestIntegerScalar.Single.cs index 01548b4..18a37bd 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNearestIntegerScalar.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNearestIntegerScalar.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__RoundToNearestIntegerScalarSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNegativeInfinity.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNegativeInfinity.Double.cs index a6464dc..547a894 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNegativeInfinity.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNegativeInfinity.Double.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleUnaryOpTest__RoundToNegativeInfinityDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNegativeInfinity.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNegativeInfinity.Single.cs index d0de8d7..f8f2d94 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNegativeInfinity.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNegativeInfinity.Single.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleUnaryOpTest__RoundToNegativeInfinitySingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNegativeInfinityScalar.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNegativeInfinityScalar.Double.cs index bcfcbd1..0b6d19b 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNegativeInfinityScalar.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNegativeInfinityScalar.Double.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__RoundToNegativeInfinityScalarDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNegativeInfinityScalar.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNegativeInfinityScalar.Single.cs index de5a4d0..62bab55 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNegativeInfinityScalar.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToNegativeInfinityScalar.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__RoundToNegativeInfinityScalarSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToPositiveInfinity.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToPositiveInfinity.Double.cs index 42e2c71..8c56cf3 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToPositiveInfinity.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToPositiveInfinity.Double.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleUnaryOpTest__RoundToPositiveInfinityDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToPositiveInfinity.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToPositiveInfinity.Single.cs index 518479c..a66cc82 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToPositiveInfinity.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToPositiveInfinity.Single.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleUnaryOpTest__RoundToPositiveInfinitySingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToPositiveInfinityScalar.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToPositiveInfinityScalar.Double.cs index f27aa69..793087e 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToPositiveInfinityScalar.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToPositiveInfinityScalar.Double.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__RoundToPositiveInfinityScalarDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToPositiveInfinityScalar.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToPositiveInfinityScalar.Single.cs index 2a1e5d4..1345a8c 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToPositiveInfinityScalar.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToPositiveInfinityScalar.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__RoundToPositiveInfinityScalarSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToZero.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToZero.Double.cs index 587cd20..f6da93b 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToZero.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToZero.Double.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleUnaryOpTest__RoundToZeroDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToZero.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToZero.Single.cs index 4a7043f..8d0406a 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToZero.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToZero.Single.cs @@ -98,7 +98,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); @@ -130,8 +129,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleUnaryOpTest__RoundToZeroSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,8 +137,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToZeroScalar.Double.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToZeroScalar.Double.cs index 6f98b23..9a63a9c 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToZeroScalar.Double.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToZeroScalar.Double.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__RoundToZeroScalarDouble() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetDouble(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetDouble(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToZeroScalar.Single.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToZeroScalar.Single.cs index fb557d2..7dba17e 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToZeroScalar.Single.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/RoundToZeroScalar.Single.cs @@ -99,7 +99,6 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); @@ -137,8 +136,6 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__RoundToZeroScalarSingle() { - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } @@ -149,8 +146,6 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSingle(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSingle(); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllOnes.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllOnes.Byte.cs index fdf5fbb..2bee133 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllOnes.Byte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllOnes.Byte.cs @@ -99,9 +99,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -128,9 +127,7 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanUnaryOpTest__TestAllOnesByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -138,12 +135,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetByte(); } _dataTable = new BooleanUnaryOpTest__DataTable(_data, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllOnes.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllOnes.Int16.cs index 69b2bc22..1bcb4bd 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllOnes.Int16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllOnes.Int16.cs @@ -99,9 +99,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -128,9 +127,7 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanUnaryOpTest__TestAllOnesInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -138,12 +135,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new BooleanUnaryOpTest__DataTable(_data, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllOnes.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllOnes.Int32.cs index 40f142a..52a5cec 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllOnes.Int32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllOnes.Int32.cs @@ -99,9 +99,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -128,9 +127,7 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanUnaryOpTest__TestAllOnesInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -138,12 +135,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new BooleanUnaryOpTest__DataTable(_data, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllOnes.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllOnes.Int64.cs index bcbc8be..843ba3f 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllOnes.Int64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllOnes.Int64.cs @@ -99,9 +99,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -128,9 +127,7 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanUnaryOpTest__TestAllOnesInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -138,12 +135,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new BooleanUnaryOpTest__DataTable(_data, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllOnes.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllOnes.SByte.cs index cf419e1..81310f7 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllOnes.SByte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllOnes.SByte.cs @@ -99,9 +99,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -128,9 +127,7 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanUnaryOpTest__TestAllOnesSByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -138,12 +135,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new BooleanUnaryOpTest__DataTable(_data, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllOnes.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllOnes.UInt16.cs index 13c247b..1077755 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllOnes.UInt16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllOnes.UInt16.cs @@ -99,9 +99,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -128,9 +127,7 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanUnaryOpTest__TestAllOnesUInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -138,12 +135,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new BooleanUnaryOpTest__DataTable(_data, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllOnes.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllOnes.UInt32.cs index c91bf2d..8084c2a 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllOnes.UInt32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllOnes.UInt32.cs @@ -99,9 +99,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -128,9 +127,7 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanUnaryOpTest__TestAllOnesUInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -138,12 +135,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new BooleanUnaryOpTest__DataTable(_data, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllOnes.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllOnes.UInt64.cs index 811fb72..bac74ac 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllOnes.UInt64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllOnes.UInt64.cs @@ -99,9 +99,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -128,9 +127,7 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanUnaryOpTest__TestAllOnesUInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -138,12 +135,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetUInt64(); } _dataTable = new BooleanUnaryOpTest__DataTable(_data, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllZeros.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllZeros.Byte.cs index 6ca5716..a49c859 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllZeros.Byte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllZeros.Byte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanBinaryOpTest__TestAllZerosByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } _dataTable = new BooleanBinaryOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllZeros.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllZeros.Int16.cs index 105a2d8..7bb419b 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllZeros.Int16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllZeros.Int16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanBinaryOpTest__TestAllZerosInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new BooleanBinaryOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllZeros.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllZeros.Int32.cs index d92a250..1c5b4bf 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllZeros.Int32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllZeros.Int32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanBinaryOpTest__TestAllZerosInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new BooleanBinaryOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllZeros.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllZeros.Int64.cs index d5dab66..e230e15 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllZeros.Int64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllZeros.Int64.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanBinaryOpTest__TestAllZerosInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new BooleanBinaryOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllZeros.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllZeros.SByte.cs index 237c2ff..a02fdc8 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllZeros.SByte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllZeros.SByte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanBinaryOpTest__TestAllZerosSByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new BooleanBinaryOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllZeros.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllZeros.UInt16.cs index 90aa6cd..b26926c 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllZeros.UInt16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllZeros.UInt16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanBinaryOpTest__TestAllZerosUInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new BooleanBinaryOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllZeros.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllZeros.UInt32.cs index 28cc988..7be1f21 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllZeros.UInt32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllZeros.UInt32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanBinaryOpTest__TestAllZerosUInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new BooleanBinaryOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllZeros.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllZeros.UInt64.cs index 1703302..78dcda0 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllZeros.UInt64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestAllZeros.UInt64.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanBinaryOpTest__TestAllZerosUInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } _dataTable = new BooleanBinaryOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.Byte.cs index 527bd1a..3aeec53 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.Byte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.Byte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanBinaryOpTest__TestCByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } _dataTable = new BooleanBinaryOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.Int16.cs index bafe521..63617ec 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.Int16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.Int16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanBinaryOpTest__TestCInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new BooleanBinaryOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.Int32.cs index 3cf357a..ffce931 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.Int32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.Int32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanBinaryOpTest__TestCInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new BooleanBinaryOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.Int64.cs index e413f93..bf694e1 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.Int64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.Int64.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanBinaryOpTest__TestCInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new BooleanBinaryOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.SByte.cs index 33827c0..8d11601 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.SByte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.SByte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanBinaryOpTest__TestCSByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new BooleanBinaryOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.UInt16.cs index 6333dcf..769e1e6 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.UInt16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.UInt16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanBinaryOpTest__TestCUInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new BooleanBinaryOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.UInt32.cs index 208c3ce..483da21 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.UInt32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.UInt32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanBinaryOpTest__TestCUInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new BooleanBinaryOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.UInt64.cs index a705392..c2ab04c 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.UInt64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestC.UInt64.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanBinaryOpTest__TestCUInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } _dataTable = new BooleanBinaryOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestMixOnesZeros.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestMixOnesZeros.Byte.cs index e04568c..7322067 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestMixOnesZeros.Byte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestMixOnesZeros.Byte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanTwoComparisonOpTest__TestMixOnesZerosByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } _dataTable = new BooleanTwoComparisonOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestMixOnesZeros.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestMixOnesZeros.Int16.cs index 26897a6..3128a26 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestMixOnesZeros.Int16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestMixOnesZeros.Int16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanTwoComparisonOpTest__TestMixOnesZerosInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new BooleanTwoComparisonOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestMixOnesZeros.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestMixOnesZeros.Int32.cs index e73863f..c126f8e 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestMixOnesZeros.Int32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestMixOnesZeros.Int32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanTwoComparisonOpTest__TestMixOnesZerosInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new BooleanTwoComparisonOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestMixOnesZeros.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestMixOnesZeros.Int64.cs index 8132442..ee64927 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestMixOnesZeros.Int64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestMixOnesZeros.Int64.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanTwoComparisonOpTest__TestMixOnesZerosInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new BooleanTwoComparisonOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestMixOnesZeros.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestMixOnesZeros.SByte.cs index dfbf86c..00f98fa 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestMixOnesZeros.SByte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestMixOnesZeros.SByte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanTwoComparisonOpTest__TestMixOnesZerosSByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new BooleanTwoComparisonOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestMixOnesZeros.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestMixOnesZeros.UInt16.cs index a7610a5..27fdc35 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestMixOnesZeros.UInt16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestMixOnesZeros.UInt16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanTwoComparisonOpTest__TestMixOnesZerosUInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new BooleanTwoComparisonOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestMixOnesZeros.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestMixOnesZeros.UInt32.cs index 9cf3109..d18b495 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestMixOnesZeros.UInt32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestMixOnesZeros.UInt32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanTwoComparisonOpTest__TestMixOnesZerosUInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new BooleanTwoComparisonOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestMixOnesZeros.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestMixOnesZeros.UInt64.cs index 592cfdd..57c0131 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestMixOnesZeros.UInt64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestMixOnesZeros.UInt64.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanTwoComparisonOpTest__TestMixOnesZerosUInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } _dataTable = new BooleanTwoComparisonOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.Byte.cs index b5914c6..9aaad13 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.Byte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.Byte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanTwoComparisonOpTest__TestNotZAndNotCByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } _dataTable = new BooleanTwoComparisonOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.Int16.cs index 4804fa6..555d29c 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.Int16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.Int16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanTwoComparisonOpTest__TestNotZAndNotCInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new BooleanTwoComparisonOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.Int32.cs index 05d8584..41c0143 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.Int32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.Int32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanTwoComparisonOpTest__TestNotZAndNotCInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new BooleanTwoComparisonOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.Int64.cs index 69b31c3..30bc7be 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.Int64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.Int64.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanTwoComparisonOpTest__TestNotZAndNotCInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new BooleanTwoComparisonOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.SByte.cs index 17d25ef..37826a7 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.SByte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.SByte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanTwoComparisonOpTest__TestNotZAndNotCSByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new BooleanTwoComparisonOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.UInt16.cs index 75b9aba..6bb8db6 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.UInt16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.UInt16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanTwoComparisonOpTest__TestNotZAndNotCUInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new BooleanTwoComparisonOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.UInt32.cs index 761c144..901440e 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.UInt32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.UInt32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanTwoComparisonOpTest__TestNotZAndNotCUInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new BooleanTwoComparisonOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.UInt64.cs index b15e615..6e3dc3c 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.UInt64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestNotZAndNotC.UInt64.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanTwoComparisonOpTest__TestNotZAndNotCUInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } _dataTable = new BooleanTwoComparisonOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.Byte.cs index 443cff5..e9f214b 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.Byte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.Byte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanBinaryOpTest__TestZByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } _dataTable = new BooleanBinaryOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.Int16.cs index c49e107..69f2f4c 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.Int16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.Int16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanBinaryOpTest__TestZInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new BooleanBinaryOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.Int32.cs index 99ec9bc..e53b85c 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.Int32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.Int32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanBinaryOpTest__TestZInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new BooleanBinaryOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.Int64.cs index ce2733b..6a2bed5 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.Int64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.Int64.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanBinaryOpTest__TestZInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new BooleanBinaryOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.SByte.cs index 3cc80bb..bec8c5a 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.SByte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.SByte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanBinaryOpTest__TestZSByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new BooleanBinaryOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.UInt16.cs index ad8dbca..88e8a53 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.UInt16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.UInt16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanBinaryOpTest__TestZUInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ushort)(random.Next(0, ushort.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ushort)(random.Next(0, ushort.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt16(); } _dataTable = new BooleanBinaryOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.UInt32.cs index d4b1f28..1b31431 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.UInt32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.UInt32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanBinaryOpTest__TestZUInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (uint)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (uint)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt32(); } _dataTable = new BooleanBinaryOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.UInt64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.UInt64.cs index adc94cb..1ac6de1 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.UInt64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse41/TestZ.UInt64.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -134,11 +133,9 @@ namespace JIT.HardwareIntrinsics.X86 static BooleanBinaryOpTest__TestZUInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -146,15 +143,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (ulong)(random.Next(0, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (ulong)(random.Next(0, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetUInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetUInt64(); } _dataTable = new BooleanBinaryOpTest__DataTable(_data1, _data2, LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse42/CompareGreaterThan.Int64.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse42/CompareGreaterThan.Int64.cs index 59c6e25..fea15cc 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse42/CompareGreaterThan.Int64.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Sse42/CompareGreaterThan.Int64.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__CompareGreaterThanInt64() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (long)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt64(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt64(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int64[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/Abs.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/Abs.Byte.cs index 702cf3e..52b20b3 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/Abs.Byte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/Abs.Byte.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(sbyte.MinValue + 1, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleUnaryOpTest__AbsByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(sbyte.MinValue + 1, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(sbyte.MinValue + 1, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (sbyte)(random.Next(sbyte.MinValue + 1, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new Byte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/Abs.UInt16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/Abs.UInt16.cs index 69fb749..7354010 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/Abs.UInt16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/Abs.UInt16.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(short.MinValue + 1, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleUnaryOpTest__AbsUInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(short.MinValue + 1, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(short.MinValue + 1, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (short)(random.Next(short.MinValue + 1, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/Abs.UInt32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/Abs.UInt32.cs index 00f19f7..2d88451 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/Abs.UInt32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/Abs.UInt32.cs @@ -98,9 +98,8 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(int.MinValue + 1, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -130,9 +129,7 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleUnaryOpTest__AbsUInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(int.MinValue + 1, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); } @@ -140,12 +137,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(int.MinValue + 1, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld), ref Unsafe.As(ref _data[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (int)(random.Next(int.MinValue + 1, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleUnaryOpTest__DataTable(_data, new UInt32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/HorizontalAdd.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/HorizontalAdd.Int16.cs index 7ad6a78..a728599 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/HorizontalAdd.Int16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/HorizontalAdd.Int16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static HorizontalBinaryOpTest__HorizontalAddInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new HorizontalBinaryOpTest__DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/HorizontalAdd.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/HorizontalAdd.Int32.cs index 1de252c..893dbd8 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/HorizontalAdd.Int32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/HorizontalAdd.Int32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static HorizontalBinaryOpTest__HorizontalAddInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new HorizontalBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/HorizontalAddSaturate.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/HorizontalAddSaturate.Int16.cs index 00ef637..f3d1b9b 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/HorizontalAddSaturate.Int16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/HorizontalAddSaturate.Int16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static HorizontalBinaryOpTest__HorizontalAddSaturateInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new HorizontalBinaryOpTest__DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/HorizontalSubtract.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/HorizontalSubtract.Int16.cs index d6eaaae..60fbc63 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/HorizontalSubtract.Int16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/HorizontalSubtract.Int16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static HorizontalBinaryOpTest__HorizontalSubtractInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new HorizontalBinaryOpTest__DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/HorizontalSubtract.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/HorizontalSubtract.Int32.cs index 6b7c3c3..e5748c3 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/HorizontalSubtract.Int32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/HorizontalSubtract.Int32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static HorizontalBinaryOpTest__HorizontalSubtractInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new HorizontalBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/HorizontalSubtractSaturate.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/HorizontalSubtractSaturate.Int16.cs index 2ffe44f..411d89c 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/HorizontalSubtractSaturate.Int16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/HorizontalSubtractSaturate.Int16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static HorizontalBinaryOpTest__HorizontalSubtractSaturateInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new HorizontalBinaryOpTest__DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/MultiplyAddAdjacent.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/MultiplyAddAdjacent.Int16.cs index 9dd4264..4d669a0 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/MultiplyAddAdjacent.Int16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/MultiplyAddAdjacent.Int16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__MultiplyAddAdjacentInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/MultiplyHighRoundScale.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/MultiplyHighRoundScale.Int16.cs index afabe24..4a4c317 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/MultiplyHighRoundScale.Int16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/MultiplyHighRoundScale.Int16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__MultiplyHighRoundScaleInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/Shuffle.Byte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/Shuffle.Byte.cs index e60c4f3..71b80b3 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/Shuffle.Byte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/Shuffle.Byte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__ShuffleByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (byte)(random.Next(0, byte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (byte)(random.Next(0, byte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Byte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/Shuffle.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/Shuffle.SByte.cs index 58341ed..87885b7 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/Shuffle.SByte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/Shuffle.SByte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__ShuffleSByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/Sign.Int16.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/Sign.Int16.cs index 0b75eee..da26dbf 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/Sign.Int16.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/Sign.Int16.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue + 1, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__SignInt16() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue + 1, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue + 1, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (short)(random.Next(short.MinValue + 1, short.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (short)(random.Next(short.MinValue, short.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt16(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt16(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int16[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/Sign.Int32.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/Sign.Int32.cs index 249546b..adf643c 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/Sign.Int32.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/Sign.Int32.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue + 1, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__SignInt32() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue + 1, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue + 1, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (int)(random.Next(int.MinValue + 1, int.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (int)(random.Next(int.MinValue, int.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetInt32(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetInt32(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new Int32[RetElementCount], LargestVectorSize); } diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/Sign.SByte.cs b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/Sign.SByte.cs index 89c3030..c5f1fe6 100644 --- a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/Sign.SByte.cs +++ b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Ssse3/Sign.SByte.cs @@ -99,11 +99,10 @@ namespace JIT.HardwareIntrinsics.X86 public static TestStruct Create() { var testStruct = new TestStruct(); - var random = new Random(); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue + 1, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref testStruct._fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); return testStruct; @@ -137,11 +136,9 @@ namespace JIT.HardwareIntrinsics.X86 static SimpleBinaryOpTest__SignSByte() { - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue + 1, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _clsVar2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); } @@ -149,15 +146,13 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = true; - var random = new Random(); - - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue + 1, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld1), ref Unsafe.As(ref _data1[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } Unsafe.CopyBlockUnaligned(ref Unsafe.As, byte>(ref _fld2), ref Unsafe.As(ref _data2[0]), (uint)Unsafe.SizeOf>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = (sbyte)(random.Next(sbyte.MinValue + 1, sbyte.MaxValue)); } - for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = (sbyte)(random.Next(sbyte.MinValue, sbyte.MaxValue)); } + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = TestLibrary.Generator.GetSByte(); } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = TestLibrary.Generator.GetSByte(); } _dataTable = new SimpleBinaryOpTest__DataTable(_data1, _data2, new SByte[RetElementCount], LargestVectorSize); } -- 2.7.4