summaryrefslogtreecommitdiff
path: root/tests/src/JIT/Regression/JitBlue
diff options
context:
space:
mode:
Diffstat (limited to 'tests/src/JIT/Regression/JitBlue')
-rw-r--r--tests/src/JIT/Regression/JitBlue/DevDiv_1206929/DevDiv_1206929.cs50
-rw-r--r--tests/src/JIT/Regression/JitBlue/DevDiv_1206929/DevDiv_1206929.csproj47
-rw-r--r--tests/src/JIT/Regression/JitBlue/DevDiv_359733/DevDiv_359733.il66
-rw-r--r--tests/src/JIT/Regression/JitBlue/DevDiv_359733/DevDiv_359733.ilproj41
-rw-r--r--tests/src/JIT/Regression/JitBlue/DevDiv_359737/DevDiv_359737.il42
-rw-r--r--tests/src/JIT/Regression/JitBlue/DevDiv_359737/DevDiv_359737.ilproj41
-rw-r--r--tests/src/JIT/Regression/JitBlue/DevDiv_362706/DevDiv_362706.il162
-rw-r--r--tests/src/JIT/Regression/JitBlue/DevDiv_362706/DevDiv_362706.ilproj51
-rw-r--r--tests/src/JIT/Regression/JitBlue/DevDiv_367099/DevDiv_367099.il99
-rw-r--r--tests/src/JIT/Regression/JitBlue/DevDiv_367099/DevDiv_367099.ilproj51
-rw-r--r--tests/src/JIT/Regression/JitBlue/DevDiv_370233/DevDiv_370233.il136
-rw-r--r--tests/src/JIT/Regression/JitBlue/DevDiv_370233/DevDiv_370233.ilproj51
-rw-r--r--tests/src/JIT/Regression/JitBlue/DevDiv_377155/DevDiv_377155.il75
-rw-r--r--tests/src/JIT/Regression/JitBlue/DevDiv_377155/DevDiv_377155.ilproj51
-rw-r--r--tests/src/JIT/Regression/JitBlue/GitHub_7508/Vector3Test.cs152
-rw-r--r--tests/src/JIT/Regression/JitBlue/GitHub_7508/Vector3Test.csproj46
16 files changed, 1161 insertions, 0 deletions
diff --git a/tests/src/JIT/Regression/JitBlue/DevDiv_1206929/DevDiv_1206929.cs b/tests/src/JIT/Regression/JitBlue/DevDiv_1206929/DevDiv_1206929.cs
new file mode 100644
index 0000000000..d363360272
--- /dev/null
+++ b/tests/src/JIT/Regression/JitBlue/DevDiv_1206929/DevDiv_1206929.cs
@@ -0,0 +1,50 @@
+using System;
+using System.Runtime.CompilerServices;
+
+namespace ReadMemBytes
+{
+ class Program
+ {
+ static int Pass = 100;
+ static int Fail = -1;
+
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ static unsafe int TestMemBytesNotReadPastTheLimit(byte *p, int byteLength)
+ {
+ int count = 0;
+ for (int i= 0; i< byteLength; ++i)
+ {
+ // RyuJIT lowering has an optimization to recognize the condition in
+ // "If" stmnt and generate "test byte ptr [p+i], 0" instruction. Due
+ // to a bug that has been fixed it will end up generating "test dword ptr [p+i], 0"
+ // that will lead to reading 4 bytes instead of a single byte.
+ if ((p[i] & 0xffffff00) != 0)
+ {
+ ++count;
+ }
+ }
+
+ return count;
+ }
+ static unsafe int Main(string[] args)
+ {
+ byte* buffer = stackalloc byte[4];
+ buffer[0] = 0;
+ buffer[1] = buffer[2] = buffer[3] = 0xff;
+
+ int result = TestMemBytesNotReadPastTheLimit(buffer, 1);
+ if (result != 0)
+ {
+ Console.WriteLine("Failed: Read past the end of buffer");
+ return Fail;
+ }
+ else
+ {
+ Console.WriteLine("Pass");
+ }
+
+ return Pass;
+
+ }
+ }
+}
diff --git a/tests/src/JIT/Regression/JitBlue/DevDiv_1206929/DevDiv_1206929.csproj b/tests/src/JIT/Regression/JitBlue/DevDiv_1206929/DevDiv_1206929.csproj
new file mode 100644
index 0000000000..a1f7eaa470
--- /dev/null
+++ b/tests/src/JIT/Regression/JitBlue/DevDiv_1206929/DevDiv_1206929.csproj
@@ -0,0 +1,47 @@
+<?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>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <DebugType></DebugType>
+ <Optimize>True</Optimize>
+ <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="DevDiv_1206929.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <PropertyGroup>
+ <ProjectJson>$(JitPackagesConfigFileDirectory)minimal\project.json</ProjectJson>
+ <ProjectLockJson>$(JitPackagesConfigFileDirectory)minimal\project.lock.json</ProjectLockJson>
+ </PropertyGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Regression/JitBlue/DevDiv_359733/DevDiv_359733.il b/tests/src/JIT/Regression/JitBlue/DevDiv_359733/DevDiv_359733.il
new file mode 100644
index 0000000000..18a712a4ae
--- /dev/null
+++ b/tests/src/JIT/Regression/JitBlue/DevDiv_359733/DevDiv_359733.il
@@ -0,0 +1,66 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+// This test originally triggered an assert during remorphing while performing constant propagation when
+// extracting the side effects of a discarded tree (specifically, the tree that corresponds to the xor in
+// method C::M, which transitively takes exception-producing covnersions as arguments). The assert was
+// attempting to ensure that if value numbers were present on the comma node used to hold the side effects,
+// then value numbers were also present on the expression being added to the list. This condition may be violated
+// when remorphing, however, and the assertion was appropiately weakened.
+
+.assembly extern mscorlib {}
+.assembly DevDiv_1359733 {}
+
+.class private C extends [mscorlib]System.Object
+{
+ .method private static int16 M(bool a0, int16 a1, int16 a2, int32 a3) cil managed noinlining
+ {
+ .locals init (int32 l0, int16 l1, int64 l2, int16 l3, int8 l4, float32 l5, int8 l6)
+
+ ldloc l3
+ ldloc l5
+ conv.i8
+ conv.r8
+ neg
+ conv.ovf.u1.un
+ ldloc.s l5
+ conv.ovf.i8
+ ldc.i8 0x4007ACD1
+ ldloc l6
+ shr
+ rem
+ nop
+ ldc.i8 0x21C591BD
+ neg
+ cgt.un
+ xor
+ pop
+ ret
+ }
+
+ .method private static int32 Main() cil managed
+ {
+ .entrypoint
+
+ .try
+ {
+ ldc.i4 0
+ ldc.i4 0
+ ldc.i4 0
+ ldc.i4 0
+ call int16 C::M(bool, int16, int16, int32)
+ pop
+ leave.s done
+ }
+ catch [mscorlib]System.Exception
+ {
+ pop
+ leave.s done
+ }
+
+ done:
+ ldc.i4 100
+ ret
+ }
+}
diff --git a/tests/src/JIT/Regression/JitBlue/DevDiv_359733/DevDiv_359733.ilproj b/tests/src/JIT/Regression/JitBlue/DevDiv_359733/DevDiv_359733.ilproj
new file mode 100644
index 0000000000..8f0870dc0f
--- /dev/null
+++ b/tests/src/JIT/Regression/JitBlue/DevDiv_359733/DevDiv_359733.ilproj
@@ -0,0 +1,41 @@
+<?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>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT .0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <DebugType>None</DebugType>
+ <Optimize>True</Optimize>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="DevDiv_359733.il" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Regression/JitBlue/DevDiv_359737/DevDiv_359737.il b/tests/src/JIT/Regression/JitBlue/DevDiv_359737/DevDiv_359737.il
new file mode 100644
index 0000000000..9917c21fca
--- /dev/null
+++ b/tests/src/JIT/Regression/JitBlue/DevDiv_359737/DevDiv_359737.il
@@ -0,0 +1,42 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+.assembly extern mscorlib {}
+.assembly DevDiv_359737 {}
+
+// This test originally repro'd a bug in morph that transformed modulus by a constant into division and subtraction
+// while re-morphing as part of CSE.
+
+.class C extends [mscorlib]System.Object
+{
+ .method static int16 M() cil managed noinlining
+ {
+ ldc.i4 0x78804C04
+ conv.ovf.u2
+ dup
+ rem
+ ret
+ }
+
+ .method static int32 Main() cil managed
+ {
+ .entrypoint
+
+ .try
+ {
+ call int16 C::M()
+ pop
+ leave.s done
+ }
+ catch [mscorlib]System.Exception
+ {
+ pop
+ leave.s done
+ }
+
+ done:
+ ldc.i4 100
+ ret
+ }
+}
diff --git a/tests/src/JIT/Regression/JitBlue/DevDiv_359737/DevDiv_359737.ilproj b/tests/src/JIT/Regression/JitBlue/DevDiv_359737/DevDiv_359737.ilproj
new file mode 100644
index 0000000000..f05d981217
--- /dev/null
+++ b/tests/src/JIT/Regression/JitBlue/DevDiv_359737/DevDiv_359737.ilproj
@@ -0,0 +1,41 @@
+<?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>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT .0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <DebugType>None</DebugType>
+ <Optimize>True</Optimize>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="DevDiv_359737.il" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Regression/JitBlue/DevDiv_362706/DevDiv_362706.il b/tests/src/JIT/Regression/JitBlue/DevDiv_362706/DevDiv_362706.il
new file mode 100644
index 0000000000..a5b7a6dbb6
--- /dev/null
+++ b/tests/src/JIT/Regression/JitBlue/DevDiv_362706/DevDiv_362706.il
@@ -0,0 +1,162 @@
+// Reading from 'C:\SuperPMI\compiler_hpp__1784____Assertion_failed__lvRefCnt.mc' dumping raw IL for MC Indexes to console
+// ProcessName - 'ILGEN'
+.assembly extern mscorlib{}
+.assembly DevDiv_362706{}
+.class C extends [mscorlib]System.Object
+{
+ .method static unsigned int64 M(float32, int32) cil managed noinlining
+ {
+ .maxstack 65535
+ .locals init (unsigned int8, native unsigned int)
+
+ ldc.i8 0x085d689753da3de1
+ ldc.i8 0xe61597946032e570
+ clt.un
+ conv.u8
+ ldc.i8 0x7982285f972837bd
+ ldc.i8 0xbff060a0e0e2eeba
+ sub
+ ldloc 0x0001
+ shl
+ mul.ovf
+ ldarg.s 0x00
+ starg.s 0x00
+ brtrue IL_005f
+ ldc.i8 0xbcb846d27e2968bf
+ conv.r.un
+ ckfinite
+ pop
+ ldarg.s 0x01
+ conv.ovf.i8
+ ldc.i8 0xe3b63c00f2954a6c
+ ldc.i8 0x3332cfb7aa00a0b0
+ div.un
+ clt
+ stloc 0x0001
+
+IL_005f:
+ ldloc 0x0000
+ ldc.i4 0x1ef1d296
+ ldc.r8 float64(0x157cd4c7a3c884f1)
+ ldc.r8 float64(0xa5da6ecb57585851)
+ add
+ ckfinite
+ neg
+ conv.r.un
+ conv.ovf.i4.un
+ cgt.un
+ not
+ or
+ ldarg.s 0x00
+ conv.r.un
+ ldarg 0x0000
+ ldc.i8 0x9cb75a81b3443e9c
+ conv.ovf.u8.un
+ conv.i4
+ pop
+ neg
+ cgt.un
+ ldloc 0x0001
+ ldc.i4 0x1bf905b2
+ ldloc.s 0x00
+ xor
+ rem
+ ldloc.s 0x00
+ ldc.r8 float64(0x94424127b67875d0)
+ ldc.i8 0x96e1b4664d5ad509
+ conv.ovf.i2
+ conv.r4
+ add
+ conv.ovf.u2.un
+ shr.un
+ shr
+ ldc.i8 0x1919368cc08e5eb1
+ ldc.i8 0x4b6a3f418d2e0236
+ ceq
+ ceq
+ starg.s 0x01
+ bgt IL_011a
+ ldarg.s 0x00
+ conv.ovf.i8.un
+ ldloc 0x0000
+ ldc.r8 float64(0x7e83ec1e8c2e0e94)
+ conv.ovf.i2
+ shl
+ not
+ not
+ conv.i8
+ conv.ovf.u8
+ ldc.i4 0x8a3055bd
+ neg
+ ldarg 0x0001
+ xor
+ conv.i8
+ ldc.i4 0xa2d0ea18
+ shr.un
+ ldc.i8 0x53ac012d34eb9f44
+ xor
+ neg
+ add
+ ldarg 0x0000
+ conv.ovf.u4.un
+ shr
+ or
+ conv.r8
+ pop
+
+IL_011a:
+ ldarg 0x0000
+ neg
+ ldarg 0x0000
+ neg
+ div
+ ldloc.s 0x01
+ ldarg 0x0001
+ ldloc 0x0000
+ ldloc 0x0001
+ and
+ shl
+ mul.ovf.un
+ starg.s 0x01
+ ldc.i4 0xc47fec23
+ conv.r8
+ div
+ conv.ovf.i8.un
+ not
+ ldc.r8 float64(0x401dee505a2add2e)
+ ldc.i8 0x0dc5a76cd1306317
+ conv.i1
+ conv.r8
+ add
+ conv.r4
+ conv.ovf.i1.un
+ nop
+ stloc.s 0x00
+ nop
+ ret
+ }
+
+ .method static int32 Main() cil managed
+ {
+ .entrypoint
+
+ .try
+ {
+ ldc.r4 float32(0xFF800000)
+ ldc.i4.s 25
+ call unsigned int64 C::M(float32, int32)
+ pop
+ leave.s done
+ }
+ catch [mscorlib]System.Exception
+ {
+ pop
+ leave.s done
+ }
+
+ done:
+ ldc.i4 100
+ ret
+ }
+}
+// Dumped 1
diff --git a/tests/src/JIT/Regression/JitBlue/DevDiv_362706/DevDiv_362706.ilproj b/tests/src/JIT/Regression/JitBlue/DevDiv_362706/DevDiv_362706.ilproj
new file mode 100644
index 0000000000..6058846d69
--- /dev/null
+++ b/tests/src/JIT/Regression/JitBlue/DevDiv_362706/DevDiv_362706.ilproj
@@ -0,0 +1,51 @@
+<?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>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <DebugType>None</DebugType>
+ <Optimize>True</Optimize>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="DevDiv_362706.il" />
+ </ItemGroup>
+ <PropertyGroup>
+ <CLRTestBatchPreCommands><![CDATA[
+$(CLRTestBatchPreCommands)
+set COMPlus_JitStressRegs=0x200
+]]></CLRTestBatchPreCommands>
+ <BashCLRTestPreCommands><![CDATA[
+$(BashCLRTestPreCommands)
+export COMPlus_JitStressRegs=0x200
+]]></BashCLRTestPreCommands>
+ </PropertyGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Regression/JitBlue/DevDiv_367099/DevDiv_367099.il b/tests/src/JIT/Regression/JitBlue/DevDiv_367099/DevDiv_367099.il
new file mode 100644
index 0000000000..f01b508ffd
--- /dev/null
+++ b/tests/src/JIT/Regression/JitBlue/DevDiv_367099/DevDiv_367099.il
@@ -0,0 +1,99 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+.assembly extern legacy library mscorlib {}
+
+.assembly devdiv_367099 {}
+
+.class public auto ansi beforefieldinit P
+ extends [mscorlib]System.Object
+{
+ .method public hidebysig static int32 Main() cil managed
+ {
+ .entrypoint
+ // Code size 14 (0xe)
+ .maxstack 1
+ .locals init (int32 V_0)
+ IL_0000: nop
+ IL_0001: call void P::TestCatchReturn()
+ IL_0006: nop
+ IL_0007: ldc.i4.s 100
+ IL_0009: stloc.0
+ IL_000a: br.s IL_000c
+
+ IL_000c: ldloc.0
+ IL_000d: ret
+ } // end of method P::Main
+
+ .method public hidebysig static void TestCatchReturn() cil managed
+ {
+ // Code size 30 (0x1e)
+ .maxstack 1
+ IL_0000: nop
+ .try
+ {
+ IL_0001: nop
+ IL_0002: nop
+ IL_0003: leave.s IL_001b
+
+ } // end .try
+ catch [mscorlib]System.Exception
+ {
+ IL_0005: pop
+ IL_0006: nop
+ .try
+ {
+ IL_0007: nop
+ .try
+ {
+ .try
+ {
+ IL_0008: nop
+ IL_0009: leave.s IL_001c
+
+ } // end .try
+ catch [mscorlib]System.Object
+ {
+ IL_000b: pop
+ IL_000c: nop
+ IL_000d: leave.s IL_001c
+
+ } // end handler
+ } // end .try
+ finally
+ {
+ IL_000f: nop
+ IL_0010: nop
+ IL_0011: endfinally
+ } // end handler
+ } // end .try
+ catch [mscorlib]System.Exception
+ {
+ IL_0012: pop
+ IL_0013: nop
+ IL_0014: nop
+ IL_0015: leave.s IL_0017
+
+ } // end handler
+ IL_0017: nop
+ IL_0018: nop
+ IL_0019: leave.s IL_001b
+
+ } // end handler
+ IL_001b: nop
+ IL_001c: nop
+ IL_001d: ret
+ } // end of method P::TestCatchReturn
+
+ .method public hidebysig specialname rtspecialname
+ instance void .ctor() cil managed
+ {
+ // Code size 7 (0x7)
+ .maxstack 8
+ IL_0000: ldarg.0
+ IL_0001: call instance void [mscorlib]System.Object::.ctor()
+ IL_0006: ret
+ } // end of method P::.ctor
+
+} // end of class P
diff --git a/tests/src/JIT/Regression/JitBlue/DevDiv_367099/DevDiv_367099.ilproj b/tests/src/JIT/Regression/JitBlue/DevDiv_367099/DevDiv_367099.ilproj
new file mode 100644
index 0000000000..bb4737395d
--- /dev/null
+++ b/tests/src/JIT/Regression/JitBlue/DevDiv_367099/DevDiv_367099.ilproj
@@ -0,0 +1,51 @@
+<?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>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <DebugType>None</DebugType>
+ <Optimize>True</Optimize>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="DevDiv_367099.il" />
+ </ItemGroup>
+ <PropertyGroup>
+ <CLRTestBatchPreCommands><![CDATA[
+$(CLRTestBatchPreCommands)
+set COMPlus_JitStressRegs=0x200
+]]></CLRTestBatchPreCommands>
+ <BashCLRTestPreCommands><![CDATA[
+$(BashCLRTestPreCommands)
+export COMPlus_JitStressRegs=0x200
+]]></BashCLRTestPreCommands>
+ </PropertyGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Regression/JitBlue/DevDiv_370233/DevDiv_370233.il b/tests/src/JIT/Regression/JitBlue/DevDiv_370233/DevDiv_370233.il
new file mode 100644
index 0000000000..3da4b63953
--- /dev/null
+++ b/tests/src/JIT/Regression/JitBlue/DevDiv_370233/DevDiv_370233.il
@@ -0,0 +1,136 @@
+.assembly extern mscorlib{}
+.assembly DevDiv_370233{}
+.class C extends [mscorlib]System.Object
+{
+ .method static unsigned int32 M(bool, bool)
+ {
+ .maxstack 65535
+ .locals init (unsigned int32, unsigned int64, unsigned int8, unsigned int8, native int, float64, char, unsigned int16, bool, char, bool)
+
+ ldloc 0x0006
+ ldc.i4 0x11467af6
+ shr
+ conv.ovf.u8
+ dup
+ sub
+ ldloc.s 0x06
+ ldloc.s 0x07
+ neg
+ rem.un
+ conv.ovf.i8.un
+ xor
+ neg
+ conv.ovf.u
+ conv.r4
+ ldloc 0x0005
+ ldloc.s 0x05
+ ckfinite
+ ckfinite
+ conv.r4
+ ceq
+ ldarg 0x0001
+ conv.r4
+ pop
+ pop
+ ldloc 0x0001
+ ldloc 0x0001
+ neg
+ conv.i8
+ ldloc.s 0x04
+ shr
+ clt.un
+ conv.ovf.i1.un
+ conv.i8
+ not
+ nop
+ ldc.i8 0x16cb54ea7cfcd50d
+ ldloc 0x0001
+ clt
+ ldloc.s 0x01
+ conv.ovf.u1
+ conv.ovf.i2.un
+ cgt
+ conv.ovf.i8
+ ldc.i8 0x6be45c7b8c08f1d5
+ conv.ovf.u8
+ ldloc.s 0x01
+ add.ovf
+ not
+ ldloc.s 0x03
+ shr.un
+ ldloc.s 0x01
+ add
+ not
+ ldloc.s 0x03
+ neg
+ shr
+ nop
+ conv.u4
+ neg
+ shr.un
+ ceq
+ ldloc 0x0001
+ conv.r4
+ ldc.r8 float64(0x9b4c7410aec1e6d3)
+ add
+ ldloc.s 0x00
+ ldarg.s 0x00
+ xor
+ ldloc.s 0x08
+ mul
+ not
+ conv.r.un
+ ldloc.s 0x02
+ ldloc 0x0006
+ add
+ conv.r4
+ mul
+ cgt
+ ldloc.s 0x05
+ ldloc.s 0x05
+ cgt.un
+ ldarg 0x0001
+ not
+ shl
+ div
+ ldc.i8 0x5892c0a0bd150d05
+ ldc.i8 0x8c33eb17e67e9772
+ neg
+ ceq
+ not
+ ldloc.s 0x00
+ ldloc 0x0003
+ ceq
+ or
+ pop
+ xor
+ conv.r.un
+ ceq
+ conv.u2
+ ret
+ }
+
+ .method static int32 Main() cil managed
+ {
+ .entrypoint
+
+ .try
+ {
+ ldc.i4 0
+ ldc.i4.s 0
+ call unsigned int32 C::M(bool, bool)
+ pop
+ leave.s done
+ }
+ catch [mscorlib]System.Exception
+ {
+ pop
+ leave.s done
+ }
+
+ done:
+ ldc.i4 100
+ ret
+ }
+}
+// Dumped 1
diff --git a/tests/src/JIT/Regression/JitBlue/DevDiv_370233/DevDiv_370233.ilproj b/tests/src/JIT/Regression/JitBlue/DevDiv_370233/DevDiv_370233.ilproj
new file mode 100644
index 0000000000..4642defb16
--- /dev/null
+++ b/tests/src/JIT/Regression/JitBlue/DevDiv_370233/DevDiv_370233.ilproj
@@ -0,0 +1,51 @@
+<?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>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <DebugType>None</DebugType>
+ <Optimize>True</Optimize>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="DevDiv_370233.il" />
+ </ItemGroup>
+ <PropertyGroup>
+ <CLRTestBatchPreCommands><![CDATA[
+$(CLRTestBatchPreCommands)
+set COMPlus_JitStressRegs=0x200
+]]></CLRTestBatchPreCommands>
+ <BashCLRTestPreCommands><![CDATA[
+$(BashCLRTestPreCommands)
+export COMPlus_JitStressRegs=0x200
+]]></BashCLRTestPreCommands>
+ </PropertyGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Regression/JitBlue/DevDiv_377155/DevDiv_377155.il b/tests/src/JIT/Regression/JitBlue/DevDiv_377155/DevDiv_377155.il
new file mode 100644
index 0000000000..4c1ab4a125
--- /dev/null
+++ b/tests/src/JIT/Regression/JitBlue/DevDiv_377155/DevDiv_377155.il
@@ -0,0 +1,75 @@
+// ProcessName - 'ILGEN'
+.assembly extern mscorlib{}
+.assembly DevDiv_377155{}
+.class C extends [mscorlib]System.Object
+{
+ .method static float32 M() cil managed noinlining
+ {
+ .maxstack 65535
+ .locals init (float64, native unsigned int, native int, char, unsigned int64, bool)
+
+ ldloc.s 0x04
+ conv.ovf.u8.un
+ conv.ovf.u2.un
+ ldc.r8 float64(0x9eda41f595fa8ca8)
+ conv.r4
+ conv.u8
+ pop
+ ldc.i4 0x1de50978
+ ldloc 0x0004
+ ldloc.s 0x04
+ or
+ ldc.i8 0x2d9c5178675b7af5
+ ldloc 0x0004
+ ldloc 0x0004
+ mul
+ ldloc.s 0x04
+ conv.ovf.u2.un
+ shr.un
+ not
+ not
+ or
+ cgt.un
+ ldc.i4 0xbdc937ef
+ ldloc.s 0x05
+ add.ovf.un
+ clt.un
+ shl
+ not
+ neg
+ shr.un
+ conv.r4
+ ckfinite
+ ldloc.s 0x00
+ clt.un
+ nop
+ brtrue IL_0052
+ nop
+IL_0052:
+ ldloc 0x0000
+ ret
+ }
+
+ .method static int32 Main() cil managed
+ {
+ .entrypoint
+
+ .try
+ {
+ call float32 C::M()
+ pop
+ leave.s done
+ }
+ catch [mscorlib]System.Exception
+ {
+ pop
+ leave.s done
+ }
+
+ done:
+ ldc.i4 100
+ ret
+ }
+
+}
+// Dumped 1
diff --git a/tests/src/JIT/Regression/JitBlue/DevDiv_377155/DevDiv_377155.ilproj b/tests/src/JIT/Regression/JitBlue/DevDiv_377155/DevDiv_377155.ilproj
new file mode 100644
index 0000000000..32d609496e
--- /dev/null
+++ b/tests/src/JIT/Regression/JitBlue/DevDiv_377155/DevDiv_377155.ilproj
@@ -0,0 +1,51 @@
+<?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>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <DebugType>None</DebugType>
+ <Optimize>True</Optimize>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="DevDiv_377155.il" />
+ </ItemGroup>
+ <PropertyGroup>
+ <CLRTestBatchPreCommands><![CDATA[
+$(CLRTestBatchPreCommands)
+set COMPlus_JitStressRegs=0x200
+]]></CLRTestBatchPreCommands>
+ <BashCLRTestPreCommands><![CDATA[
+$(BashCLRTestPreCommands)
+export COMPlus_JitStressRegs=0x200
+]]></BashCLRTestPreCommands>
+ </PropertyGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Regression/JitBlue/GitHub_7508/Vector3Test.cs b/tests/src/JIT/Regression/JitBlue/GitHub_7508/Vector3Test.cs
new file mode 100644
index 0000000000..609141fd64
--- /dev/null
+++ b/tests/src/JIT/Regression/JitBlue/GitHub_7508/Vector3Test.cs
@@ -0,0 +1,152 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+// Since Issue 7508 was a performance issue, there's not really a correctness
+// test for this.
+// However, this is a very simple test that can be used to compare the code generated
+// for a non-accelerated vector of 3 floats, a "raw" Vector3 and a Vector3
+// wrapped in a struct.
+
+using System;
+using System.Diagnostics;
+using System.Runtime.CompilerServices;
+using System.Numerics;
+
+namespace Test01
+{
+ public struct SimpleVector3
+ {
+ [MethodImpl( MethodImplOptions.AggressiveInlining )]
+ public SimpleVector3( float x, float y, float z )
+ {
+ this.x = x;
+ this.y = y;
+ this.z = z;
+ }
+
+ [MethodImpl( MethodImplOptions.AggressiveInlining )]
+ public static SimpleVector3 operator +( SimpleVector3 a, SimpleVector3 b )
+ => new SimpleVector3( a.x + b.x, a.y + b.y, a.z + b.z );
+
+ public float X
+ {
+ get { return x; }
+ set { x = value; }
+ }
+
+ public float Y
+ {
+ get { return y; }
+ set { y = value; }
+ }
+
+ public float Z
+ {
+ get { return z; }
+ set { z = value; }
+ }
+
+ float x, y, z;
+ }
+
+ public struct WrappedVector3
+ {
+ [MethodImpl( MethodImplOptions.AggressiveInlining )]
+ public WrappedVector3( float x, float y, float z )
+ {
+ v = new System.Numerics.Vector3( x, y, z );
+ }
+
+ [MethodImpl( MethodImplOptions.AggressiveInlining )]
+ WrappedVector3( System.Numerics.Vector3 v )
+ {
+ this.v = v;
+ }
+
+ [MethodImpl( MethodImplOptions.AggressiveInlining )]
+ public static WrappedVector3 operator +( WrappedVector3 a, WrappedVector3 b )
+ => new WrappedVector3( a.v + b.v );
+
+ public float X
+ {
+ get { return v.X; }
+ set { v.X = value; }
+ }
+
+ public float Y
+ {
+ get { return v.Y; }
+ set { v.Y = value; }
+ }
+
+ public float Z
+ {
+ get { return v.Z; }
+ set { v.Z = value; }
+ }
+
+ Vector3 v;
+ }
+
+ public class Program
+ {
+ static Random random = new Random( 12345 );
+ [MethodImpl( MethodImplOptions.NoInlining )]
+ static SimpleVector3 RandomSimpleVector3()
+ => new SimpleVector3( (float)random.NextDouble(), (float)random.NextDouble(), (float)random.NextDouble() );
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ static WrappedVector3 RandomWrappedVector3()
+ => new WrappedVector3( (float)random.NextDouble(), (float)random.NextDouble(), (float)random.NextDouble() );
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ static Vector3 RandomVector3()
+ => new Vector3( (float)random.NextDouble(), (float)random.NextDouble(), (float)random.NextDouble() );
+
+ public static float TestSimple()
+ {
+ var simpleA = RandomSimpleVector3();
+ var simpleB = RandomSimpleVector3();
+ var simpleC = simpleA + simpleB;
+ Console.WriteLine("Simple Vector3: {0},{1},{2}", simpleC.X, simpleC.Y, simpleC.Z);
+ return simpleC.X + simpleC.Y + simpleC.Z;
+ }
+ public static float TestWrapped()
+ {
+ var wrappedA = RandomWrappedVector3();
+ var wrappedB = RandomWrappedVector3();
+ var wrappedC = wrappedA + wrappedB;
+ Console.WriteLine("Wrapped Vector3: {0},{1},{2}", wrappedC.X, wrappedC.Y, wrappedC.Z);
+ return wrappedC.X + wrappedC.Y + wrappedC.Z;
+ }
+ public static float TestSIMD()
+ {
+ var a = RandomVector3();
+ var b = RandomVector3();
+ var c = a + b;
+ Console.WriteLine("SIMD Vector3: {0},{1},{2}", c.X, c.Y, c.Z);
+ return c.X + c.Y + c.Z;
+ }
+ public static int Main( string[] args )
+ {
+ int returnVal = 100;
+
+ // First, test a simple (non-SIMD) Vector3 type
+ float f = TestSimple();
+
+ // Now a wrapped SIMD Vector3.
+ if (TestWrapped() != f)
+ {
+ returnVal = -1;
+ }
+
+ // Now, SIMD Vector3
+ if (TestSIMD() != f)
+ {
+ returnVal = -1;
+ }
+
+ return 100;
+ }
+ }
+}
+
diff --git a/tests/src/JIT/Regression/JitBlue/GitHub_7508/Vector3Test.csproj b/tests/src/JIT/Regression/JitBlue/GitHub_7508/Vector3Test.csproj
new file mode 100644
index 0000000000..2e97f364b9
--- /dev/null
+++ b/tests/src/JIT/Regression/JitBlue/GitHub_7508/Vector3Test.csproj
@@ -0,0 +1,46 @@
+<?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>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <PropertyGroup>
+ <DebugType></DebugType>
+ <Optimize>True</Optimize>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="$(MSBuildProjectName).cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <PropertyGroup>
+ <ProjectJson>$(JitPackagesConfigFileDirectory)threading+thread\project.json</ProjectJson>
+ <ProjectLockJson>$(JitPackagesConfigFileDirectory)threading+thread\project.lock.json</ProjectLockJson>
+ </PropertyGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>