Fix validation code in Sse2.MultiplyLow tests
authorJacek Blaszczynski <biosciencenow@outlook.com>
Thu, 1 Feb 2018 18:58:52 +0000 (19:58 +0100)
committerJacek Blaszczynski <biosciencenow@outlook.com>
Thu, 1 Feb 2018 18:58:52 +0000 (19:58 +0100)
Fixes #16153

tests/src/JIT/HardwareIntrinsics/X86/Sse2/MultiplyLow.cs

index c3482b7..6ee97ce 100644 (file)
@@ -33,9 +33,9 @@ namespace IntelHardwareIntrinsicTest
 
                     CheckMethod<short> checkInt16 = (short x, short y, short z, ref short a) =>
                     {
-                        var tmp = ((int)x * y) * 0x0000ffff;
+                        int tmp = (((int)x * (int)y) & 0x0000ffff);
                         a = unchecked((short)tmp);
-                        return -a == z;
+                        return a == z;
                     };
 
                     if (!shortTable.CheckResult(checkInt16))