diff options
Diffstat (limited to 'tests/src/JIT/SIMD')
-rwxr-xr-x | tests/src/JIT/SIMD/Vector3Interop.cs | 6 | ||||
-rw-r--r-- | tests/src/JIT/SIMD/VectorDot.cs | 7 | ||||
-rw-r--r-- | tests/src/JIT/SIMD/VectorIntEquals.cs | 61 | ||||
-rw-r--r-- | tests/src/JIT/SIMD/VectorUtil.cs | 2 |
4 files changed, 68 insertions, 8 deletions
diff --git a/tests/src/JIT/SIMD/Vector3Interop.cs b/tests/src/JIT/SIMD/Vector3Interop.cs index fa6f8700d5..147adf44a8 100755 --- a/tests/src/JIT/SIMD/Vector3Interop.cs +++ b/tests/src/JIT/SIMD/Vector3Interop.cs @@ -112,7 +112,7 @@ class PInvokeTest // Expected return value = 1 + 2 + 3 + 10 + 11 + 12 = 39 if (nativeCall_PInvoke_Vector3Arg(iv, v1, str, v2) != 39) { - Console.Write("PInvoke Vector3Arg test failed\n"); + Console.WriteLine("PInvoke Vector3Arg test failed"); return false; } } @@ -130,7 +130,7 @@ class PInvokeTest f6, v2, // stack f7, f8); // stack if (sum != 1002) { - Console.Write("PInvoke Vector3Arg_Unix test failed\n"); + Console.WriteLine("PInvoke Vector3Arg_Unix test failed"); return false; } } @@ -151,7 +151,7 @@ class PInvokeTest v3, // stack f9); // stack if (sum != 1090) { - Console.Write("PInvoke Vector3Arg_Unix2 test failed\n"); + Console.WriteLine("PInvoke Vector3Arg_Unix2 test failed"); return false; } } diff --git a/tests/src/JIT/SIMD/VectorDot.cs b/tests/src/JIT/SIMD/VectorDot.cs index 2efe79e5ab..22c1493394 100644 --- a/tests/src/JIT/SIMD/VectorDot.cs +++ b/tests/src/JIT/SIMD/VectorDot.cs @@ -113,12 +113,17 @@ internal partial class VectorTest if (VectorDotTest<ulong>.VectorDot(3ul, 2ul, 6ul * (ulong)Vector<ulong>.Count) != Pass) returnVal = Fail; JitLog jitLog = new JitLog(); - // Dot is only recognized as an intrinsic for floating point element types. + // Dot is only recognized as an intrinsic for floating point element types + // and Vector<int> on AVX. if (!jitLog.Check("Dot", "Single")) returnVal = Fail; if (!jitLog.Check("Dot", "Double")) returnVal = Fail; if (!jitLog.Check("System.Numerics.Vector4:Dot")) returnVal = Fail; if (!jitLog.Check("System.Numerics.Vector3:Dot")) returnVal = Fail; if (!jitLog.Check("System.Numerics.Vector2:Dot")) returnVal = Fail; + if (Vector<int>.Count == 8) + { + if (!jitLog.Check("Dot", "Int32")) returnVal = Fail; + } jitLog.Dispose(); return returnVal; diff --git a/tests/src/JIT/SIMD/VectorIntEquals.cs b/tests/src/JIT/SIMD/VectorIntEquals.cs index bbbbbe519d..fae49aac1d 100644 --- a/tests/src/JIT/SIMD/VectorIntEquals.cs +++ b/tests/src/JIT/SIMD/VectorIntEquals.cs @@ -17,12 +17,67 @@ internal partial class VectorTest Vector<int> B = new Vector<int>(3); Vector<int> C = new Vector<int>(5); - bool result = A.Equals(B); - if (!result) return Fail; + if (!result) + { + return Fail; + } result = A.Equals(C); - if (result) return Fail; + if (result) + { + return Fail; + } + + if (A.Equals(Vector<int>.Zero)) + { + return Fail; + } + + if (!Vector<int>.Zero.Equals(Vector<int>.Zero)) + { + return Fail; + } + + if (Vector<int>.Zero.Equals(B)) + { + return Fail; + } + + if (!(A == B)) + { + return Fail; + } + + if (A == Vector<int>.Zero) + { + return Fail; + } + + if (!(A != Vector<int>.Zero)) + { + return Fail; + } + + if (A != B) + { + return Fail; + } + + if (!(A != C)) + { + return Fail; + } + + if (!(Vector<int>.Zero != A)) + { + return Fail; + } + + if (Vector<int>.Zero != Vector<int>.Zero) + { + return Fail; + } return Pass; } diff --git a/tests/src/JIT/SIMD/VectorUtil.cs b/tests/src/JIT/SIMD/VectorUtil.cs index d1b669df29..6501aac767 100644 --- a/tests/src/JIT/SIMD/VectorUtil.cs +++ b/tests/src/JIT/SIMD/VectorUtil.cs @@ -309,7 +309,7 @@ class JitLog : IDisposable } if (simdIntrinsicsSupported && methodFound) { - Console.WriteLine("Method " + method + " was compiled but should not have been\n"); + Console.WriteLine("Method " + method + " was compiled but should not have been"); return false; } // Useful when developing / debugging just to be sure that we reached here: |