Adding back the tests for Avx.MaskLoad
authorTanner Gooding <tagoo@outlook.com>
Sat, 30 Jun 2018 19:12:32 +0000 (12:12 -0700)
committerTanner Gooding <tagoo@outlook.com>
Mon, 2 Jul 2018 16:58:57 +0000 (09:58 -0700)
Commit migrated from https://github.com/dotnet/coreclr/commit/e524fbe359fe181259545611b883ee888d140b8f

src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/MaskLoad.cs
src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/MaskLoad_r.csproj [new file with mode: 0644]
src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/MaskLoad_ro.csproj [new file with mode: 0644]

index 2a493e0..cb1ca41 100644 (file)
@@ -24,7 +24,7 @@ namespace IntelHardwareIntrinsicTest
             {
                 using (TestTable<float, uint> floatTable = new TestTable<float, uint>(new float[8] { 1, -5, 100, 0, 1, 2, 3, 4 }, new uint[8] { uint.MaxValue, uint.MaxValue, 0, 0, uint.MaxValue, uint.MaxValue, 0, 0 }, new float[8]))
                 {
-                    Vector256<float> vf = Avx.MaskLoad((float*)(floatTable.inArrayPtr), Avx.LoadVector256((uint*)(floatTable.maskArrayPtr)));
+                    Vector256<float> vf = Avx.MaskLoad((float*)(floatTable.inArrayPtr), Avx.LoadVector256((float*)(floatTable.maskArrayPtr)));
                     Unsafe.Write(floatTable.outArrayPtr, vf);
 
                     if (!floatTable.CheckResult((x, m, y) => m == uint.MaxValue ? BitConverter.SingleToInt32Bits(x) == BitConverter.SingleToInt32Bits(y) : BitConverter.SingleToInt32Bits(y) == 0))
@@ -41,7 +41,7 @@ namespace IntelHardwareIntrinsicTest
 
                 using (TestTable<double, ulong> doubleTable = new TestTable<double, ulong>(new double[4] { 1, -5, 100, 0}, new ulong[4] { 0, ulong.MaxValue, ulong.MaxValue, 0}, new double[4]))
                 {
-                    Vector256<double> vf = Avx.MaskLoad((double*)(doubleTable.inArrayPtr), Avx.LoadVector256((ulong*)(doubleTable.maskArrayPtr)));
+                    Vector256<double> vf = Avx.MaskLoad((double*)(doubleTable.inArrayPtr), Avx.LoadVector256((double*)(doubleTable.maskArrayPtr)));
                     Unsafe.Write(doubleTable.outArrayPtr, vf);
 
                     if (!doubleTable.CheckResult((x, m, y) =>  m == ulong.MaxValue ? BitConverter.DoubleToInt64Bits(x) == BitConverter.DoubleToInt64Bits(y) : BitConverter.DoubleToInt64Bits(y) == 0))
@@ -58,7 +58,7 @@ namespace IntelHardwareIntrinsicTest
 
                 using (TestTable<float, uint> floatTable = new TestTable<float, uint>(new float[4] { 1, -5, 100, 0 }, new uint[4] { uint.MaxValue, 0, 0, uint.MaxValue }, new float[4]))
                 {
-                    Vector128<float> vf = Avx.MaskLoad((float*)(floatTable.inArrayPtr), Sse2.LoadVector128((uint*)(floatTable.maskArrayPtr)));
+                    Vector128<float> vf = Avx.MaskLoad((float*)(floatTable.inArrayPtr), Sse.LoadVector128((float*)(floatTable.maskArrayPtr)));
                     Unsafe.Write(floatTable.outArrayPtr, vf);
 
                     if (!floatTable.CheckResult((x, m, y) => m == uint.MaxValue ? BitConverter.SingleToInt32Bits(x) == BitConverter.SingleToInt32Bits(y) : BitConverter.SingleToInt32Bits(y) == 0))
@@ -75,7 +75,7 @@ namespace IntelHardwareIntrinsicTest
 
                 using (TestTable<double, ulong> doubleTable = new TestTable<double, ulong>(new double[2] { 1, -5}, new ulong[2] { 0, ulong.MaxValue}, new double[2]))
                 {
-                    Vector128<double> vf = Avx.MaskLoad((double*)(doubleTable.inArrayPtr), Sse2.LoadVector128((ulong*)(doubleTable.maskArrayPtr)));
+                    Vector128<double> vf = Avx.MaskLoad((double*)(doubleTable.inArrayPtr), Sse2.LoadVector128((double*)(doubleTable.maskArrayPtr)));
                     Unsafe.Write(doubleTable.outArrayPtr, vf);
 
                     if (!doubleTable.CheckResult((x, m, y) =>  m == ulong.MaxValue ? BitConverter.DoubleToInt64Bits(x) == BitConverter.DoubleToInt64Bits(y) : BitConverter.DoubleToInt64Bits(y) == 0))
diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/MaskLoad_r.csproj b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/MaskLoad_r.csproj
new file mode 100644 (file)
index 0000000..1150e2c
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?> 
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">       
+  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />     
+  <PropertyGroup>      
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>        
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>      
+    <SchemaVersion>2.0</SchemaVersion> 
+    <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>  
+    <OutputType>Exe</OutputType>       
+    <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> 
+    <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>      
+    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>        
+  </PropertyGroup>     
+  <!-- Default configurations to help VS understand the configurations -->     
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "></PropertyGroup>       
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " />   
+  <ItemGroup>  
+    <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">   
+      <Visible>False</Visible> 
+    </CodeAnalysisDependentAssemblyPaths>      
+  </ItemGroup> 
+  <PropertyGroup>      
+    <DebugType>None</DebugType>        
+    <Optimize></Optimize>      
+  </PropertyGroup>     
+  <ItemGroup>  
+    <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />       
+  </ItemGroup> 
+  <ItemGroup>  
+    <Compile Include="MaskLoad.cs" />  
+  </ItemGroup> 
+  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" /> 
+  <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' "></PropertyGroup>   
+</Project>
diff --git a/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/MaskLoad_ro.csproj b/src/coreclr/tests/src/JIT/HardwareIntrinsics/X86/Avx/MaskLoad_ro.csproj
new file mode 100644 (file)
index 0000000..ec56cde
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?> 
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">       
+  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />     
+  <PropertyGroup>      
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>        
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>      
+    <SchemaVersion>2.0</SchemaVersion> 
+    <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>  
+    <OutputType>Exe</OutputType>       
+    <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> 
+    <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>      
+    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>        
+  </PropertyGroup>     
+  <!-- Default configurations to help VS understand the configurations -->     
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "></PropertyGroup>       
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " />   
+  <ItemGroup>  
+    <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">   
+      <Visible>False</Visible> 
+    </CodeAnalysisDependentAssemblyPaths>      
+  </ItemGroup> 
+  <PropertyGroup>      
+    <DebugType>None</DebugType>        
+    <Optimize>True</Optimize>  
+  </PropertyGroup>     
+  <ItemGroup>  
+    <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />       
+  </ItemGroup> 
+  <ItemGroup>  
+    <Compile Include="MaskLoad.cs" />  
+  </ItemGroup> 
+  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" /> 
+  <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' "></PropertyGroup>   
+</Project>