diff options
author | Tanner Gooding <tagoo@outlook.com> | 2018-03-16 15:31:33 -0700 |
---|---|---|
committer | Tanner Gooding <tagoo@outlook.com> | 2018-03-19 11:31:47 -0700 |
commit | d74772b94656ad876ff40bc52ee069dc522552c1 (patch) | |
tree | dc5a3d2f224d7d0d92ebdd55f73a867de7752229 /tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.UInt32.32.cs | |
parent | 48f03db99df3b7824d39a864edaab77b02020077 (diff) | |
download | coreclr-d74772b94656ad876ff40bc52ee069dc522552c1.tar.gz coreclr-d74772b94656ad876ff40bc52ee069dc522552c1.tar.bz2 coreclr-d74772b94656ad876ff40bc52ee069dc522552c1.zip |
Regenerating the x86 HWIntrinsic tests to track each vector size separately
Diffstat (limited to 'tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.UInt32.32.cs')
-rw-r--r-- | tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.UInt32.32.cs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.UInt32.32.cs b/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.UInt32.32.cs index fc805e78dc..cc21fd1b12 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.UInt32.32.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Avx2/ShiftRightLogical.UInt32.32.cs @@ -85,10 +85,10 @@ namespace JIT.HardwareIntrinsics.X86 public sealed unsafe class SimpleUnaryOpTest__ShiftRightLogicalUInt3232 { - private const int VectorSize = 32; + private static readonly int LargestVectorSize = 32; - private const int Op1ElementCount = VectorSize / sizeof(UInt32); - private const int RetElementCount = VectorSize / sizeof(UInt32); + private static readonly int Op1ElementCount = Unsafe.SizeOf<Vector256<UInt32>>() / sizeof(UInt32); + private static readonly int RetElementCount = Unsafe.SizeOf<Vector256<UInt32>>() / sizeof(UInt32); private static UInt32[] _data = new UInt32[Op1ElementCount]; @@ -103,7 +103,7 @@ namespace JIT.HardwareIntrinsics.X86 var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector256<UInt32>, byte>(ref _clsVar), ref Unsafe.As<UInt32, byte>(ref _data[0]), VectorSize); + Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector256<UInt32>, byte>(ref _clsVar), ref Unsafe.As<UInt32, byte>(ref _data[0]), (uint)Unsafe.SizeOf<Vector256<UInt32>>()); } public SimpleUnaryOpTest__ShiftRightLogicalUInt3232() @@ -113,10 +113,10 @@ namespace JIT.HardwareIntrinsics.X86 var random = new Random(); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } - Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector256<UInt32>, byte>(ref _fld), ref Unsafe.As<UInt32, byte>(ref _data[0]), VectorSize); + Unsafe.CopyBlockUnaligned(ref Unsafe.As<Vector256<UInt32>, byte>(ref _fld), ref Unsafe.As<UInt32, byte>(ref _data[0]), (uint)Unsafe.SizeOf<Vector256<UInt32>>()); for (var i = 0; i < Op1ElementCount; i++) { _data[i] = (uint)(random.Next(0, int.MaxValue)); } - _dataTable = new SimpleUnaryOpTest__DataTable<UInt32, UInt32>(_data, new UInt32[RetElementCount], VectorSize); + _dataTable = new SimpleUnaryOpTest__DataTable<UInt32, UInt32>(_data, new UInt32[RetElementCount], LargestVectorSize); } public bool IsSupported => Avx2.IsSupported; @@ -267,7 +267,7 @@ namespace JIT.HardwareIntrinsics.X86 UInt32[] outArray = new UInt32[RetElementCount]; Unsafe.WriteUnaligned(ref Unsafe.As<UInt32, byte>(ref inArray[0]), firstOp); - Unsafe.CopyBlockUnaligned(ref Unsafe.As<UInt32, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), VectorSize); + Unsafe.CopyBlockUnaligned(ref Unsafe.As<UInt32, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector256<UInt32>>()); ValidateResult(inArray, outArray, method); } @@ -277,8 +277,8 @@ namespace JIT.HardwareIntrinsics.X86 UInt32[] inArray = new UInt32[Op1ElementCount]; UInt32[] outArray = new UInt32[RetElementCount]; - Unsafe.CopyBlockUnaligned(ref Unsafe.As<UInt32, byte>(ref inArray[0]), ref Unsafe.AsRef<byte>(firstOp), VectorSize); - Unsafe.CopyBlockUnaligned(ref Unsafe.As<UInt32, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), VectorSize); + Unsafe.CopyBlockUnaligned(ref Unsafe.As<UInt32, byte>(ref inArray[0]), ref Unsafe.AsRef<byte>(firstOp), (uint)Unsafe.SizeOf<Vector256<UInt32>>()); + Unsafe.CopyBlockUnaligned(ref Unsafe.As<UInt32, byte>(ref outArray[0]), ref Unsafe.AsRef<byte>(result), (uint)Unsafe.SizeOf<Vector256<UInt32>>()); ValidateResult(inArray, outArray, method); } |