Merge pull request #16422 from CarolEidt/Fix15037
authorCarol Eidt <carol.eidt@microsoft.com>
Sun, 18 Feb 2018 17:28:16 +0000 (09:28 -0800)
committerGitHub <noreply@github.com>
Sun, 18 Feb 2018 17:28:16 +0000 (09:28 -0800)
Don't set delayRegFree if no target

179 files changed:
BuildToolsVersion.txt
ILAsmVersion.txt
dependencies.props
src/.nuget/.gitmirrorall [deleted file]
src/ToolBox/SOS/.gitmirror [deleted file]
src/ToolBox/SOS/DacTableGen/.gitmirror [deleted file]
src/ToolBox/SOS/NETCore/.gitmirror [deleted file]
src/ToolBox/SOS/Strike/.gitmirror [deleted file]
src/ToolBox/SOS/Strike/inc/.gitmirror [deleted file]
src/ToolBox/SOS/Strike/xplat/.gitmirror [deleted file]
src/ToolBox/SOS/diasdk/.gitmirror [deleted file]
src/ToolBox/SOS/lldbplugin/.gitmirrorall [deleted file]
src/ToolBox/SOS/tests/.gitmirrorall [deleted file]
src/binder/.gitmirror [deleted file]
src/binder/inc/.gitmirror [deleted file]
src/binder/v3binder/.gitmirror [deleted file]
src/binder/v3binder_crossgen/.gitmirror [deleted file]
src/classlibnative/.gitmirror [deleted file]
src/classlibnative/bcltype/.gitmirror [deleted file]
src/classlibnative/float/.gitmirror [deleted file]
src/classlibnative/inc/.gitmirror [deleted file]
src/classlibnative/nls/.gitmirror [deleted file]
src/coreclr/.gitmirror [deleted file]
src/coreclr/hosts/.gitmirror [deleted file]
src/coreclr/hosts/coreconsole/.gitmirror [deleted file]
src/coreclr/hosts/corerun/.gitmirror [deleted file]
src/coreclr/hosts/inc/.gitmirrorall [deleted file]
src/coreclr/hosts/osxbundlerun/.gitmirrorall [deleted file]
src/coreclr/hosts/unixcoreconsole/.gitmirrorall [deleted file]
src/coreclr/hosts/unixcorerun/.gitmirrorall [deleted file]
src/coreclr/hosts/unixcoreruncommon/.gitmirror [deleted file]
src/corefx/.gitmirrorall [deleted file]
src/debug/.gitmirror [deleted file]
src/debug/createdump/.gitmirrorall [deleted file]
src/debug/daccess/.gitmirror [deleted file]
src/debug/daccess/amd64/.gitmirror [deleted file]
src/debug/daccess/arm/.gitmirror [deleted file]
src/debug/daccess/arm64/.gitmirror [deleted file]
src/debug/daccess/i386/.gitmirror [deleted file]
src/debug/dbgutil/.gitmirror [deleted file]
src/debug/debug-pal/.gitmirror [deleted file]
src/debug/debug-pal/unix/.gitmirror [deleted file]
src/debug/debug-pal/win/.gitmirror [deleted file]
src/debug/di/.gitmirror [deleted file]
src/debug/di/amd64/.gitmirror [deleted file]
src/debug/di/arm/.gitmirror [deleted file]
src/debug/di/arm64/.gitmirror [deleted file]
src/debug/di/i386/.gitmirror [deleted file]
src/debug/ee/.gitmirror [deleted file]
src/debug/ee/amd64/.gitmirror [deleted file]
src/debug/ee/arm/.gitmirror [deleted file]
src/debug/ee/arm64/.gitmirror [deleted file]
src/debug/ee/dac/.gitmirror [deleted file]
src/debug/ee/i386/.gitmirror [deleted file]
src/debug/ee/wks/.gitmirror [deleted file]
src/debug/ildbsymlib/.gitmirror [deleted file]
src/debug/inc/.gitmirror [deleted file]
src/debug/inc/amd64/.gitmirror [deleted file]
src/debug/inc/arm/.gitmirror [deleted file]
src/debug/inc/arm64/.gitmirror [deleted file]
src/debug/inc/dump/.gitmirror [deleted file]
src/debug/inc/i386/.gitmirror [deleted file]
src/debug/shared/.gitmirror [deleted file]
src/debug/shared/amd64/.gitmirror [deleted file]
src/debug/shared/arm/.gitmirror [deleted file]
src/debug/shared/arm64/.gitmirror [deleted file]
src/debug/shared/i386/.gitmirror [deleted file]
src/debug/shim/.gitmirror [deleted file]
src/dlls/.gitmirror [deleted file]
src/dlls/clretwrc/.gitmirror [deleted file]
src/dlls/dbgshim/.gitmirror [deleted file]
src/dlls/mscordac/.gitmirror [deleted file]
src/dlls/mscordbi/.gitmirror [deleted file]
src/dlls/mscoree/.gitmirror [deleted file]
src/dlls/mscoree/coreclr/.gitmirror [deleted file]
src/dlls/mscorpe/.gitmirrorall [deleted file]
src/dlls/mscorrc/.gitmirror [deleted file]
src/dlls/mscorrc/full/.gitmirror [deleted file]
src/dlls/mscorrc/small/.gitmirror [deleted file]
src/gc/.gitmirrorall [deleted file]
src/gcdump/.gitmirror [deleted file]
src/gcdump/i386/.gitmirror [deleted file]
src/gcinfo/.gitmirror [deleted file]
src/gcinfo/crossgen/.gitmirror [deleted file]
src/gcinfo/lib/.gitmirror [deleted file]
src/ilasm/.gitmirrorall [deleted file]
src/ildasm/.gitmirrorall [deleted file]
src/inc/.gitmirrorall [deleted file]
src/ipcman/.gitmirror [deleted file]
src/ipcman/ipcman-staticcrt/.gitmirror [deleted file]
src/jit/compiler.cpp
src/jit/compiler.h
src/jit/lsra.cpp
src/jit/optcse.cpp
src/md/.gitmirror [deleted file]
src/md/ceefilegen/.gitmirror [deleted file]
src/md/compiler/.gitmirror [deleted file]
src/md/compiler/crossgen/.gitmirror [deleted file]
src/md/compiler/dac/.gitmirror [deleted file]
src/md/compiler/dbi/.gitmirror [deleted file]
src/md/compiler/wks/.gitmirror [deleted file]
src/md/datasource/.gitmirror [deleted file]
src/md/datasource/dbi/.gitmirror [deleted file]
src/md/enc/.gitmirror [deleted file]
src/md/enc/crossgen/.gitmirror [deleted file]
src/md/enc/dac/.gitmirror [deleted file]
src/md/enc/dbi/.gitmirror [deleted file]
src/md/enc/wks/.gitmirror [deleted file]
src/md/heaps/.gitmirror [deleted file]
src/md/hotdata/.gitmirror [deleted file]
src/md/hotdata/crossgen/.gitmirror [deleted file]
src/md/hotdata/dac/.gitmirror [deleted file]
src/md/hotdata/full-staticcrt/.gitmirror [deleted file]
src/md/hotdata/full/.gitmirror [deleted file]
src/md/inc/.gitmirror [deleted file]
src/md/runtime/.gitmirror [deleted file]
src/md/runtime/crossgen/.gitmirror [deleted file]
src/md/runtime/dac/.gitmirror [deleted file]
src/md/runtime/dbi/.gitmirror [deleted file]
src/md/runtime/wks/.gitmirror [deleted file]
src/md/tables/.gitmirror [deleted file]
src/md/winmd/.gitmirror [deleted file]
src/md/winmd/crossgen/.gitmirror [deleted file]
src/md/winmd/dac/.gitmirror [deleted file]
src/md/winmd/dbi/.gitmirror [deleted file]
src/md/winmd/inc/.gitmirror [deleted file]
src/md/winmd/wks/.gitmirror [deleted file]
src/mscorlib/.gitmirrorall [deleted file]
src/mscorlib/shared/System/String.Manipulation.cs
src/mscorlib/src/System/MulticastDelegate.cs
src/nativeresources/.gitmirror [deleted file]
src/pal/.gitmirrorall [deleted file]
src/palrt/.gitmirror [deleted file]
src/scripts/.gitmirrorall [deleted file]
src/strongname/.gitmirror [deleted file]
src/strongname/api/.gitmirror [deleted file]
src/strongname/api/crossgen/.gitmirror [deleted file]
src/strongname/api/dac/.gitmirror [deleted file]
src/strongname/api/wks/.gitmirror [deleted file]
src/strongname/inc/.gitmirror [deleted file]
src/tools/.gitmirror [deleted file]
src/tools/GenClrDebugResource/.gitmirror [deleted file]
src/tools/InjectResource/.gitmirror [deleted file]
src/tools/crossgen/.gitmirror [deleted file]
src/tools/metainfo/.gitmirrorall [deleted file]
src/tools/util/.gitmirror [deleted file]
src/unwinder/.gitmirror [deleted file]
src/unwinder/amd64/.gitmirror [deleted file]
src/unwinder/arm/.gitmirror [deleted file]
src/unwinder/arm64/.gitmirror [deleted file]
src/unwinder/dac/.gitmirror [deleted file]
src/unwinder/dac/hostlocal/.gitmirror [deleted file]
src/unwinder/dac/hostwinamd64/.gitmirror [deleted file]
src/unwinder/dac/hostwinx86/.gitmirror [deleted file]
src/unwinder/wks/.gitmirror [deleted file]
src/utilcode/.gitmirror [deleted file]
src/utilcode/crossgen/.gitmirror [deleted file]
src/utilcode/dac/.gitmirror [deleted file]
src/utilcode/dyncrt/.gitmirror [deleted file]
src/utilcode/staticnohost/.gitmirror [deleted file]
src/vm/.gitmirror [deleted file]
src/vm/amd64/.gitmirror [deleted file]
src/vm/arm/.gitmirror [deleted file]
src/vm/arm64/.gitmirror [deleted file]
src/vm/assemblyspec.cpp
src/vm/coreclr/.gitmirror [deleted file]
src/vm/crossgen/.gitmirror [deleted file]
src/vm/crossgen_mscorlib/.gitmirror [deleted file]
src/vm/dac/.gitmirror [deleted file]
src/vm/hash.cpp
src/vm/i386/.gitmirror [deleted file]
src/vm/threadsuspend.cpp
src/vm/wks/.gitmirror [deleted file]
src/zap/.gitmirror [deleted file]
src/zap/crossgen/.gitmirror [deleted file]
src/zap/wks/.gitmirror [deleted file]
tests/runtest.cmd
tests/src/JIT/Regression/JitBlue/DevDiv_543057a/DevDiv_543057a.cs [new file with mode: 0644]
tests/src/JIT/Regression/JitBlue/DevDiv_543057a/DevDiv_543057a.csproj [new file with mode: 0644]

index c1c4035..fa4528c 100644 (file)
@@ -1 +1 @@
-2.1.0-preview2-02511-02
+2.1.0-preview2-02516-02
index f1e3c65..7e588a0 100644 (file)
@@ -1 +1 @@
-2.1.0-preview2-26212-01
+2.1.0-preview2-26218-01
index 2dd24e9..153287d 100644 (file)
 
   <!-- Source of truth for dependency tooling: the commit hash of the dotnet/versions master branch as of the last auto-upgrade. -->
   <PropertyGroup>
-    <CoreFxCurrentRef>b3eb126afa4ee4e0433c322dcd245e899ecfc60d</CoreFxCurrentRef>
-    <CoreClrCurrentRef>b3eb126afa4ee4e0433c322dcd245e899ecfc60d</CoreClrCurrentRef>
-    <BuildToolsCurrentRef>4f5edc2cff312f4af6e48a249c0d7b8f0f95ea30</BuildToolsCurrentRef>
-    <PgoDataCurrentRef>b3eb126afa4ee4e0433c322dcd245e899ecfc60d</PgoDataCurrentRef>
+    <CoreFxCurrentRef>7657a6f8cd7c1faa71504e68a154bca8c0c4b3c3</CoreFxCurrentRef>
+    <CoreClrCurrentRef>e50641ce8a22508af923785e00f0c8e68d3d7dcc</CoreClrCurrentRef>
+    <BuildToolsCurrentRef>7657a6f8cd7c1faa71504e68a154bca8c0c4b3c3</BuildToolsCurrentRef>
+    <PgoDataCurrentRef>e50641ce8a22508af923785e00f0c8e68d3d7dcc</PgoDataCurrentRef>
   </PropertyGroup>
 
   <!-- Tests/infrastructure dependency versions. -->
   <PropertyGroup>
-    <MicrosoftPrivateCoreFxNETCoreAppPackageVersion>4.5.0-preview2-26212-01</MicrosoftPrivateCoreFxNETCoreAppPackageVersion>
-    <MicrosoftNETCorePlatformsPackageVersion>2.1.0-preview2-26212-01</MicrosoftNETCorePlatformsPackageVersion>
-    <PgoDataPackageVersion>99.99.99-master-20180212-0035</PgoDataPackageVersion>
-    <MicrosoftNETCoreRuntimeCoreCLRPackageVersion>2.1.0-preview2-26212-01</MicrosoftNETCoreRuntimeCoreCLRPackageVersion>
+    <MicrosoftPrivateCoreFxNETCoreAppPackageVersion>4.5.0-preview2-26216-03</MicrosoftPrivateCoreFxNETCoreAppPackageVersion>
+    <MicrosoftNETCorePlatformsPackageVersion>2.1.0-preview2-26216-03</MicrosoftNETCorePlatformsPackageVersion>
+    <PgoDataPackageVersion>99.99.99-master-20180217-0048</PgoDataPackageVersion>
+    <MicrosoftNETCoreRuntimeCoreCLRPackageVersion>2.1.0-preview2-26218-01</MicrosoftNETCoreRuntimeCoreCLRPackageVersion>
     <XunitPackageVersion>2.2.0-beta2-build3300</XunitPackageVersion>
     <XunitConsoleNetcorePackageVersion>1.0.2-prerelease-00177</XunitConsoleNetcorePackageVersion>
     <XunitPerformanceApiPackageVersion>1.0.0-beta-build0015</XunitPerformanceApiPackageVersion>
@@ -50,7 +50,7 @@
   <!-- Package versions used as toolsets -->
   <PropertyGroup>
     <FeedTasksPackage>Microsoft.DotNet.Build.Tasks.Feed</FeedTasksPackage>
-    <FeedTasksPackageVersion>2.1.0-preview2-02511-02</FeedTasksPackageVersion>
+    <FeedTasksPackageVersion>2.1.0-preview2-02516-02</FeedTasksPackageVersion>
   </PropertyGroup>
 
   <!-- Package dependency verification/auto-upgrade configuration. -->
diff --git a/src/.nuget/.gitmirrorall b/src/.nuget/.gitmirrorall
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/ToolBox/SOS/.gitmirror b/src/ToolBox/SOS/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/ToolBox/SOS/DacTableGen/.gitmirror b/src/ToolBox/SOS/DacTableGen/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/ToolBox/SOS/NETCore/.gitmirror b/src/ToolBox/SOS/NETCore/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/ToolBox/SOS/Strike/.gitmirror b/src/ToolBox/SOS/Strike/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/ToolBox/SOS/Strike/inc/.gitmirror b/src/ToolBox/SOS/Strike/inc/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/ToolBox/SOS/Strike/xplat/.gitmirror b/src/ToolBox/SOS/Strike/xplat/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/ToolBox/SOS/diasdk/.gitmirror b/src/ToolBox/SOS/diasdk/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/ToolBox/SOS/lldbplugin/.gitmirrorall b/src/ToolBox/SOS/lldbplugin/.gitmirrorall
deleted file mode 100644 (file)
index 9ee5c57..0000000
+++ /dev/null
@@ -1 +0,0 @@
-This folder will be mirrored by the Git-TFS Mirror recursively.
\ No newline at end of file
diff --git a/src/ToolBox/SOS/tests/.gitmirrorall b/src/ToolBox/SOS/tests/.gitmirrorall
deleted file mode 100644 (file)
index 9ee5c57..0000000
+++ /dev/null
@@ -1 +0,0 @@
-This folder will be mirrored by the Git-TFS Mirror recursively.
\ No newline at end of file
diff --git a/src/binder/.gitmirror b/src/binder/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/binder/inc/.gitmirror b/src/binder/inc/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/binder/v3binder/.gitmirror b/src/binder/v3binder/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/binder/v3binder_crossgen/.gitmirror b/src/binder/v3binder_crossgen/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/classlibnative/.gitmirror b/src/classlibnative/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/classlibnative/bcltype/.gitmirror b/src/classlibnative/bcltype/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/classlibnative/float/.gitmirror b/src/classlibnative/float/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/classlibnative/inc/.gitmirror b/src/classlibnative/inc/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/classlibnative/nls/.gitmirror b/src/classlibnative/nls/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/coreclr/.gitmirror b/src/coreclr/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/coreclr/hosts/.gitmirror b/src/coreclr/hosts/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/coreclr/hosts/coreconsole/.gitmirror b/src/coreclr/hosts/coreconsole/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/coreclr/hosts/corerun/.gitmirror b/src/coreclr/hosts/corerun/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/coreclr/hosts/inc/.gitmirrorall b/src/coreclr/hosts/inc/.gitmirrorall
deleted file mode 100644 (file)
index 9ee5c57..0000000
+++ /dev/null
@@ -1 +0,0 @@
-This folder will be mirrored by the Git-TFS Mirror recursively.
\ No newline at end of file
diff --git a/src/coreclr/hosts/osxbundlerun/.gitmirrorall b/src/coreclr/hosts/osxbundlerun/.gitmirrorall
deleted file mode 100644 (file)
index 9ee5c57..0000000
+++ /dev/null
@@ -1 +0,0 @@
-This folder will be mirrored by the Git-TFS Mirror recursively.
\ No newline at end of file
diff --git a/src/coreclr/hosts/unixcoreconsole/.gitmirrorall b/src/coreclr/hosts/unixcoreconsole/.gitmirrorall
deleted file mode 100644 (file)
index 9ee5c57..0000000
+++ /dev/null
@@ -1 +0,0 @@
-This folder will be mirrored by the Git-TFS Mirror recursively.
\ No newline at end of file
diff --git a/src/coreclr/hosts/unixcorerun/.gitmirrorall b/src/coreclr/hosts/unixcorerun/.gitmirrorall
deleted file mode 100644 (file)
index 9ee5c57..0000000
+++ /dev/null
@@ -1 +0,0 @@
-This folder will be mirrored by the Git-TFS Mirror recursively.
\ No newline at end of file
diff --git a/src/coreclr/hosts/unixcoreruncommon/.gitmirror b/src/coreclr/hosts/unixcoreruncommon/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/corefx/.gitmirrorall b/src/corefx/.gitmirrorall
deleted file mode 100644 (file)
index 9ee5c57..0000000
+++ /dev/null
@@ -1 +0,0 @@
-This folder will be mirrored by the Git-TFS Mirror recursively.
\ No newline at end of file
diff --git a/src/debug/.gitmirror b/src/debug/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/debug/createdump/.gitmirrorall b/src/debug/createdump/.gitmirrorall
deleted file mode 100644 (file)
index 9ee5c57..0000000
+++ /dev/null
@@ -1 +0,0 @@
-This folder will be mirrored by the Git-TFS Mirror recursively.
\ No newline at end of file
diff --git a/src/debug/daccess/.gitmirror b/src/debug/daccess/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/debug/daccess/amd64/.gitmirror b/src/debug/daccess/amd64/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/debug/daccess/arm/.gitmirror b/src/debug/daccess/arm/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/debug/daccess/arm64/.gitmirror b/src/debug/daccess/arm64/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/debug/daccess/i386/.gitmirror b/src/debug/daccess/i386/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/debug/dbgutil/.gitmirror b/src/debug/dbgutil/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/debug/debug-pal/.gitmirror b/src/debug/debug-pal/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/debug/debug-pal/unix/.gitmirror b/src/debug/debug-pal/unix/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/debug/debug-pal/win/.gitmirror b/src/debug/debug-pal/win/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/debug/di/.gitmirror b/src/debug/di/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/debug/di/amd64/.gitmirror b/src/debug/di/amd64/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/debug/di/arm/.gitmirror b/src/debug/di/arm/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/debug/di/arm64/.gitmirror b/src/debug/di/arm64/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/debug/di/i386/.gitmirror b/src/debug/di/i386/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/debug/ee/.gitmirror b/src/debug/ee/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/debug/ee/amd64/.gitmirror b/src/debug/ee/amd64/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/debug/ee/arm/.gitmirror b/src/debug/ee/arm/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/debug/ee/arm64/.gitmirror b/src/debug/ee/arm64/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/debug/ee/dac/.gitmirror b/src/debug/ee/dac/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/debug/ee/i386/.gitmirror b/src/debug/ee/i386/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/debug/ee/wks/.gitmirror b/src/debug/ee/wks/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/debug/ildbsymlib/.gitmirror b/src/debug/ildbsymlib/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/debug/inc/.gitmirror b/src/debug/inc/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/debug/inc/amd64/.gitmirror b/src/debug/inc/amd64/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/debug/inc/arm/.gitmirror b/src/debug/inc/arm/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/debug/inc/arm64/.gitmirror b/src/debug/inc/arm64/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/debug/inc/dump/.gitmirror b/src/debug/inc/dump/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/debug/inc/i386/.gitmirror b/src/debug/inc/i386/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/debug/shared/.gitmirror b/src/debug/shared/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/debug/shared/amd64/.gitmirror b/src/debug/shared/amd64/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/debug/shared/arm/.gitmirror b/src/debug/shared/arm/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/debug/shared/arm64/.gitmirror b/src/debug/shared/arm64/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/debug/shared/i386/.gitmirror b/src/debug/shared/i386/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/debug/shim/.gitmirror b/src/debug/shim/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/dlls/.gitmirror b/src/dlls/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/dlls/clretwrc/.gitmirror b/src/dlls/clretwrc/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/dlls/dbgshim/.gitmirror b/src/dlls/dbgshim/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/dlls/mscordac/.gitmirror b/src/dlls/mscordac/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/dlls/mscordbi/.gitmirror b/src/dlls/mscordbi/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/dlls/mscoree/.gitmirror b/src/dlls/mscoree/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/dlls/mscoree/coreclr/.gitmirror b/src/dlls/mscoree/coreclr/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/dlls/mscorpe/.gitmirrorall b/src/dlls/mscorpe/.gitmirrorall
deleted file mode 100644 (file)
index 9ee5c57..0000000
+++ /dev/null
@@ -1 +0,0 @@
-This folder will be mirrored by the Git-TFS Mirror recursively.
\ No newline at end of file
diff --git a/src/dlls/mscorrc/.gitmirror b/src/dlls/mscorrc/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/dlls/mscorrc/full/.gitmirror b/src/dlls/mscorrc/full/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/dlls/mscorrc/small/.gitmirror b/src/dlls/mscorrc/small/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/gc/.gitmirrorall b/src/gc/.gitmirrorall
deleted file mode 100644 (file)
index 9ee5c57..0000000
+++ /dev/null
@@ -1 +0,0 @@
-This folder will be mirrored by the Git-TFS Mirror recursively.
\ No newline at end of file
diff --git a/src/gcdump/.gitmirror b/src/gcdump/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/gcdump/i386/.gitmirror b/src/gcdump/i386/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/gcinfo/.gitmirror b/src/gcinfo/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/gcinfo/crossgen/.gitmirror b/src/gcinfo/crossgen/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/gcinfo/lib/.gitmirror b/src/gcinfo/lib/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/ilasm/.gitmirrorall b/src/ilasm/.gitmirrorall
deleted file mode 100644 (file)
index 9ee5c57..0000000
+++ /dev/null
@@ -1 +0,0 @@
-This folder will be mirrored by the Git-TFS Mirror recursively.
\ No newline at end of file
diff --git a/src/ildasm/.gitmirrorall b/src/ildasm/.gitmirrorall
deleted file mode 100644 (file)
index 9ee5c57..0000000
+++ /dev/null
@@ -1 +0,0 @@
-This folder will be mirrored by the Git-TFS Mirror recursively.
\ No newline at end of file
diff --git a/src/inc/.gitmirrorall b/src/inc/.gitmirrorall
deleted file mode 100644 (file)
index 9ee5c57..0000000
+++ /dev/null
@@ -1 +0,0 @@
-This folder will be mirrored by the Git-TFS Mirror recursively.
\ No newline at end of file
diff --git a/src/ipcman/.gitmirror b/src/ipcman/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/ipcman/ipcman-staticcrt/.gitmirror b/src/ipcman/ipcman-staticcrt/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
index cec1dd3..d240728 100644 (file)
@@ -2666,47 +2666,44 @@ void Compiler::compSetProcessor()
                     opts.setSupportedISA(InstructionSet_POPCNT);
                 }
             }
-            if (jitFlags.IsSet(JitFlags::JIT_FLAG_USE_SSE3))
+
+            // There are currently two sets of flags that control SSE3 through SSE4.2 support
+            // This is the general EnableSSE3_4 flag and the individual ISA flags. We need to
+            // check both for any given ISA.
+            if (JitConfig.EnableSSE3_4())
             {
-                if (configEnableISA(InstructionSet_SSE3))
+                if (jitFlags.IsSet(JitFlags::JIT_FLAG_USE_SSE3))
                 {
-                    opts.setSupportedISA(InstructionSet_SSE3);
+                    if (configEnableISA(InstructionSet_SSE3))
+                    {
+                        opts.setSupportedISA(InstructionSet_SSE3);
+                    }
                 }
-            }
-            if (jitFlags.IsSet(JitFlags::JIT_FLAG_USE_SSE41))
-            {
-                if (configEnableISA(InstructionSet_SSE41))
+                if (jitFlags.IsSet(JitFlags::JIT_FLAG_USE_SSE41))
                 {
-                    opts.setSupportedISA(InstructionSet_SSE41);
+                    if (configEnableISA(InstructionSet_SSE41))
+                    {
+                        opts.setSupportedISA(InstructionSet_SSE41);
+                    }
                 }
-            }
-            if (jitFlags.IsSet(JitFlags::JIT_FLAG_USE_SSE42))
-            {
-                if (configEnableISA(InstructionSet_SSE42))
+                if (jitFlags.IsSet(JitFlags::JIT_FLAG_USE_SSE42))
                 {
-                    opts.setSupportedISA(InstructionSet_SSE42);
+                    if (configEnableISA(InstructionSet_SSE42))
+                    {
+                        opts.setSupportedISA(InstructionSet_SSE42);
+                    }
                 }
-            }
-            if (jitFlags.IsSet(JitFlags::JIT_FLAG_USE_SSSE3))
-            {
-                if (configEnableISA(InstructionSet_SSSE3))
+                if (jitFlags.IsSet(JitFlags::JIT_FLAG_USE_SSSE3))
                 {
-                    opts.setSupportedISA(InstructionSet_SSSE3);
+                    if (configEnableISA(InstructionSet_SSSE3))
+                    {
+                        opts.setSupportedISA(InstructionSet_SSSE3);
+                    }
                 }
             }
         }
     }
 
-    opts.compCanUseSSE4 = false;
-    if (!jitFlags.IsSet(JitFlags::JIT_FLAG_PREJIT) && jitFlags.IsSet(JitFlags::JIT_FLAG_USE_SSE41) &&
-        jitFlags.IsSet(JitFlags::JIT_FLAG_USE_SSE42))
-    {
-        if (JitConfig.EnableSSE3_4() != 0)
-        {
-            opts.compCanUseSSE4 = true;
-        }
-    }
-
     if (!compIsForInlining())
     {
         if (canUseVexEncoding())
@@ -2716,8 +2713,12 @@ void Compiler::compSetProcessor()
             codeGen->getEmitter()->SetContainsAVX(false);
             codeGen->getEmitter()->SetContains256bitAVX(false);
         }
-        else if (CanUseSSE4())
+        else if (compSupports(InstructionSet_SSSE3) || compSupports(InstructionSet_SSE41) ||
+                 compSupports(InstructionSet_SSE42))
         {
+            // Emitter::UseSSE4 controls whether we support the 4-byte encoding for certain
+            // instructions. We need to check if either is supported independently, since
+            // it is currently possible to enable/disable them separately.
             codeGen->getEmitter()->SetUseSSE4(true);
         }
     }
index 4ac30bf..72dafe3 100644 (file)
@@ -5772,6 +5772,7 @@ protected:
     static fgWalkPreFn  optHasNonCSEChild;
 
     static fgWalkPreFn optUnmarkCSEs;
+    static fgWalkPreFn optHasCSEdefWithSideeffect;
 
     static int __cdecl optCSEcostCmpEx(const void* op1, const void* op2);
     static int __cdecl optCSEcostCmpSz(const void* op1, const void* op2);
@@ -7462,7 +7463,10 @@ private:
             return SIMD_AVX2_Supported;
         }
 
-        if (CanUseSSE4())
+        // SIMD_SSE4_Supported actually requires all of SSE3, SSSE3, SSE4.1, and SSE4.2
+        // to be supported. We can only enable it if all four are enabled in the compiler
+        if (compSupports(InstructionSet_SSE42) && compSupports(InstructionSet_SSE41) &&
+            compSupports(InstructionSet_SSSE3) && compSupports(InstructionSet_SSE3))
         {
             return SIMD_SSE4_Supported;
         }
@@ -8024,7 +8028,7 @@ private:
         return false;
     }
 
-    // Whether SSE2 is available
+    // Whether SSE and SSE2 is available
     bool canUseSSE2() const
     {
 #ifdef _TARGET_XARCH_
@@ -8034,16 +8038,6 @@ private:
 #endif
     }
 
-    // Whether SSE3, SSSE3, SSE4.1 and SSE4.2 is available
-    bool CanUseSSE4() const
-    {
-#ifdef _TARGET_XARCH_
-        return opts.compCanUseSSE4;
-#else
-        return false;
-#endif
-    }
-
     bool compSupports(InstructionSet isa) const
     {
 #if defined(_TARGET_XARCH_) || defined(_TARGET_ARM64_)
@@ -8169,7 +8163,6 @@ public:
         bool compUseCMOV;
 #ifdef _TARGET_XARCH_
         bool compCanUseSSE2; // Allow CodeGen to use "movq XMM" instructions
-        bool compCanUseSSE4; // Allow CodeGen to use SSE3, SSSE3, SSE4.1 and SSE4.2 instructions
 #endif                       // _TARGET_XARCH_
 
 #if defined(_TARGET_XARCH_) || defined(_TARGET_ARM64_)
index 776908e..4898968 100644 (file)
@@ -3358,8 +3358,10 @@ bool LinearScan::isRefPositionActive(RefPosition* refPosition, LsraLocation refL
 //    False - otherwise
 //
 // Notes:
-//    This helper is designed to be used only from allocateBusyReg().
-//    The caller must have already checked for the case where 'refPosition' is a fixed ref.
+//    This helper is designed to be used only from allocateBusyReg(), where:
+//    - This register was *not* found when looking for a free register, and
+//    - The caller must have already checked for the case where 'refPosition' is a fixed ref
+//      (asserted at the beginning of this method).
 //
 bool LinearScan::isRegInUse(RegRecord* regRec, RefPosition* refPosition)
 {
@@ -3370,27 +3372,43 @@ bool LinearScan::isRegInUse(RegRecord* regRec, RefPosition* refPosition)
     {
         if (!assignedInterval->isActive)
         {
-            // This can only happen if we have a recentRefPosition active at this location that hasn't yet been freed
-            // (Or, in the case of ARM, the other half of a double is either active or has an active recentRefPosition).
+            // This can only happen if we have a recentRefPosition active at this location that hasn't yet been freed.
             CLANG_FORMAT_COMMENT_ANCHOR;
 
-#ifdef _TARGET_ARM_
-            if (refPosition->getInterval()->registerType == TYP_DOUBLE)
+            if (isRefPositionActive(assignedInterval->recentRefPosition, refPosition->nodeLocation))
             {
-                if (!isRefPositionActive(assignedInterval->recentRefPosition, refPosition->nodeLocation))
+                return true;
+            }
+            else
+            {
+#ifdef _TARGET_ARM_
+                // In the case of TYP_DOUBLE, we may have the case where 'assignedInterval' is inactive,
+                // but the other half register is active. If so, it must be have an active recentRefPosition,
+                // as above.
+                if (refPosition->getInterval()->registerType == TYP_DOUBLE)
                 {
                     RegRecord* otherHalfRegRec = findAnotherHalfRegRec(regRec);
-                    assert(otherHalfRegRec->assignedInterval->isActive ||
-                           isRefPositionActive(otherHalfRegRec->assignedInterval->recentRefPosition,
-                                               refPosition->nodeLocation));
+                    if (!otherHalfRegRec->assignedInterval->isActive)
+                    {
+                        if (isRefPositionActive(otherHalfRegRec->assignedInterval->recentRefPosition,
+                                                refPosition->nodeLocation))
+                        {
+                            return true;
+                        }
+                        else
+                        {
+                            assert(!"Unexpected inactive assigned interval in isRegInUse");
+                            return true;
+                        }
+                    }
                 }
-            }
-            else
+                else
 #endif
-            {
-                assert(isRefPositionActive(assignedInterval->recentRefPosition, refPosition->nodeLocation));
+                {
+                    assert(!"Unexpected inactive assigned interval in isRegInUse");
+                    return true;
+                }
             }
-            return true;
         }
         RefPosition* nextAssignedRef = assignedInterval->getNextRefPosition();
 
index 1ce5442..5a8841e 100644 (file)
@@ -308,35 +308,115 @@ Compiler::fgWalkResult Compiler::optUnmarkCSEs(GenTree** pTree, fgWalkData* data
     }
     else // optUnmarkCSE(tree) returned false
     {
-        // This node is a CSE def and can not be removed.
+        // This node must be a CSE def and it can not be removed.
         // Instead we will add it to the 'keepList'.
         assert(IS_CSE_DEF(tree->gtCSEnum));
 
-        if (comp->gtTreeHasSideEffects(tree, GTF_PERSISTENT_SIDE_EFFECTS_IN_CSE))
+        // The prior call to optHasCSEdefWithSideeffect ensures this
+        //
+        assert(!comp->gtTreeHasSideEffects(tree, GTF_PERSISTENT_SIDE_EFFECTS_IN_CSE));
+
+#ifdef DEBUG
+        if (comp->verbose)
         {
-            // If the nested CSE def has persistent side effects then just abort
-            // as this case is problematic.
-            return WALK_ABORT;
+            printf("Preserving the CSE def #%02d at ", GET_CSE_INDEX(tree->gtCSEnum));
+            printTreeID(tree);
+            printf(" because it is nested inside a CSE use\n");
         }
-        else
+#endif // DEBUG
+
+        // This tree and all of its sub-trees will be kept
+        //
+        *wbKeepList = comp->gtBuildCommaList(*wbKeepList, tree);
+
+        return WALK_SKIP_SUBTREES;
+    }
+
+    return WALK_CONTINUE;
+}
+
+//------------------------------------------------------------------------
+// Compiler::optHasCSEdefWithSideeffect
+//    Helper passed to Compiler::fgWalkAllTreesPre() to deternine if
+//    a sub-tree has a CSE def that contains persistent side-effects.
+// Return values:
+//    We will return WALK_ABORT upon encountering the case above.
+//    A final return value of WALK_CONTINUE or WALK_SKIP_SUBTREES means that
+//    there wasn't a CSE def with persistent side-effects.
+//
+//    argument 'pTree' is a pointer to a GenTree*
+//    argument 'data' contains pCallbackData which needs to be cast from void*
+//       to our actual 'wbKeepList' a pointer to a GenTree*
+//
+//    Any nodes visited that are in the 'keepList' are skipped
+//    For visted node not in the 'keepList' we check if the node is a CSE def
+//    and if it is then we check if it has persistent side-effects
+//    and if so we return WALK_ABORT.
+//
+
+/* static */
+Compiler::fgWalkResult Compiler::optHasCSEdefWithSideeffect(GenTree** pTree, fgWalkData* data)
+{
+    GenTree*  tree       = *pTree;
+    Compiler* comp       = data->compiler;
+    GenTree** wbKeepList = (GenTree**)(data->pCallbackData);
+    GenTree*  keepList   = nullptr;
+
+    noway_assert(wbKeepList != nullptr);
+
+    keepList = *wbKeepList;
+
+    // We may already have a side effect list that is being kept
+    //
+    if (keepList)
+    {
+        GenTree* keptTree = keepList;
+
+        while (keptTree->OperGet() == GT_COMMA)
         {
-#ifdef DEBUG
-            if (comp->verbose)
+            assert(keptTree->OperKind() & GTK_SMPOP);
+            GenTree* op1 = keptTree->gtOp.gtOp1;
+            GenTree* op2 = keptTree->gtGetOp2();
+
+            // For the GT_COMMA case the op1 is part of the original CSE tree
+            // that is being kept because it contains some side-effect
+            //
+            if (tree == op1)
             {
-                printf("Preserving the CSE def #%02d at ", GET_CSE_INDEX(tree->gtCSEnum));
-                printTreeID(tree);
-                printf(" because it is nested inside a CSE use\n");
+                // This tree and all of its sub trees are being kept
+                return WALK_SKIP_SUBTREES;
             }
-#endif // DEBUG
 
-            // This tree and all of its sub-trees are being kept
+            // For the GT_COMMA case, op2 is the remaining side-effects of the
+            // original CSE tree.  This can again be another GT_COMMA or the
+            // final side-effect part.
             //
-            *wbKeepList = comp->gtBuildCommaList(*wbKeepList, tree);
-
+            keptTree = op2;
+        }
+        if (tree == keptTree)
+        {
+            // This tree and all of its sub trees are being kept
             return WALK_SKIP_SUBTREES;
         }
     }
+    // Now 'tree' is known to be a node that is not in the 'keepList',
+    //
+    // We will check if it is a CSE def
+    //
+    if (IS_CSE_DEF(tree->gtCSEnum))
+    {
+        // This node is a CSE def
 
+        // If this node contains any persistent side effects then we will return WALK_ABORT.
+        //
+        if (comp->gtTreeHasSideEffects(tree, GTF_PERSISTENT_SIDE_EFFECTS_IN_CSE))
+        {
+            // This nested CSE def contains a persistent side effect
+            // We just abort now as this case is problematic.
+            //
+            return WALK_ABORT;
+        }
+    }
     return WALK_CONTINUE;
 }
 
@@ -2437,13 +2517,28 @@ bool Compiler::optValnumCSE_UnmarkCSEs(GenTree* deadTree, GenTree** wbKeepList)
 {
     assert(optValnumCSE_phase);
 
+    // If we have a non-empty *wbKeepList, then we first check for the rare case where we
+    // have a nested CSE def that has side-effects and return false if have this case
+    //
+    if (*wbKeepList != nullptr)
+    {
+        Compiler::fgWalkResult result = fgWalkTreePre(&deadTree, optHasCSEdefWithSideeffect, (void*)wbKeepList);
+        if (result == WALK_ABORT)
+        {
+            return false;
+        }
+    }
+
     // We need to communicate the 'keepList' to optUnmarkCSEs
     // as any part of the 'deadTree' tree that is in the keepList is preserved
     // and is not deleted and does not have its ref counts decremented
     // We communicate this value using the walkData.pCallbackData field
     //
+
     Compiler::fgWalkResult result = fgWalkTreePre(&deadTree, optUnmarkCSEs, (void*)wbKeepList);
-    return (result != WALK_ABORT);
+    assert(result != WALK_ABORT);
+
+    return true;
 }
 
 /*****************************************************************************
diff --git a/src/md/.gitmirror b/src/md/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/md/ceefilegen/.gitmirror b/src/md/ceefilegen/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/md/compiler/.gitmirror b/src/md/compiler/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/md/compiler/crossgen/.gitmirror b/src/md/compiler/crossgen/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/md/compiler/dac/.gitmirror b/src/md/compiler/dac/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/md/compiler/dbi/.gitmirror b/src/md/compiler/dbi/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/md/compiler/wks/.gitmirror b/src/md/compiler/wks/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/md/datasource/.gitmirror b/src/md/datasource/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/md/datasource/dbi/.gitmirror b/src/md/datasource/dbi/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/md/enc/.gitmirror b/src/md/enc/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/md/enc/crossgen/.gitmirror b/src/md/enc/crossgen/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/md/enc/dac/.gitmirror b/src/md/enc/dac/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/md/enc/dbi/.gitmirror b/src/md/enc/dbi/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/md/enc/wks/.gitmirror b/src/md/enc/wks/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/md/heaps/.gitmirror b/src/md/heaps/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/md/hotdata/.gitmirror b/src/md/hotdata/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/md/hotdata/crossgen/.gitmirror b/src/md/hotdata/crossgen/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/md/hotdata/dac/.gitmirror b/src/md/hotdata/dac/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/md/hotdata/full-staticcrt/.gitmirror b/src/md/hotdata/full-staticcrt/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/md/hotdata/full/.gitmirror b/src/md/hotdata/full/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/md/inc/.gitmirror b/src/md/inc/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/md/runtime/.gitmirror b/src/md/runtime/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/md/runtime/crossgen/.gitmirror b/src/md/runtime/crossgen/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/md/runtime/dac/.gitmirror b/src/md/runtime/dac/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/md/runtime/dbi/.gitmirror b/src/md/runtime/dbi/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/md/runtime/wks/.gitmirror b/src/md/runtime/wks/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/md/tables/.gitmirror b/src/md/tables/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/md/winmd/.gitmirror b/src/md/winmd/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/md/winmd/crossgen/.gitmirror b/src/md/winmd/crossgen/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/md/winmd/dac/.gitmirror b/src/md/winmd/dac/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/md/winmd/dbi/.gitmirror b/src/md/winmd/dbi/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/md/winmd/inc/.gitmirror b/src/md/winmd/inc/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/md/winmd/wks/.gitmirror b/src/md/winmd/wks/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/mscorlib/.gitmirrorall b/src/mscorlib/.gitmirrorall
deleted file mode 100644 (file)
index 9ee5c57..0000000
+++ /dev/null
@@ -1 +0,0 @@
-This folder will be mirrored by the Git-TFS Mirror recursively.
\ No newline at end of file
index f829bd3..1d500e8 100644 (file)
@@ -17,13 +17,6 @@ namespace System
     {
         private const int StackallocIntBufferSizeLimit = 128;
 
-        // Workaround for https://github.com/dotnet/coreclr/issues/16197
-        [StructLayout(LayoutKind.Sequential, Size = StackallocIntBufferSizeLimit * sizeof(int))]
-        struct StackallocIntBuffer
-        {
-            private int _dummy;
-        }
-
         private static unsafe void FillStringChecked(string dest, int destPos, string src)
         {
             Debug.Assert(dest != null);
@@ -1079,9 +1072,7 @@ namespace System
             if (newValue == null)
                 newValue = string.Empty;
 
-            // Workaround for https://github.com/dotnet/coreclr/issues/16197
-            // Span<int> initialSpan = stackalloc int[StackallocIntBufferSizeLimit];
-            Span<int> initialSpan; StackallocIntBuffer initialBuffer; unsafe { initialSpan = new Span<int>(&initialBuffer, StackallocIntBufferSizeLimit); }
+            Span<int> initialSpan = stackalloc int[StackallocIntBufferSizeLimit];
             var replacementIndices = new ValueListBuilder<int>(initialSpan);
 
             unsafe
index 39d6723..ef630bc 100644 (file)
@@ -4,8 +4,6 @@
 
 using System;
 using System.Reflection;
-using System.Runtime;
-using System.Runtime.CompilerServices;
 using System.Runtime.Serialization;
 using System.Diagnostics;
 using System.Reflection.Emit;
@@ -431,18 +429,22 @@ namespace System
 
         public static bool operator ==(MulticastDelegate d1, MulticastDelegate d2)
         {
-            if ((Object)d1 == null)
-                return (Object)d2 == null;
+            if (ReferenceEquals(d1, d2))
+            {
+                return true;
+            }
 
-            return d1.Equals(d2);
+            return d1 is null ? false : d1.Equals(d2);
         }
 
         public static bool operator !=(MulticastDelegate d1, MulticastDelegate d2)
         {
-            if ((Object)d1 == null)
-                return (Object)d2 != null;
+            if (ReferenceEquals(d1, d2))
+            {
+                return false;
+            }
 
-            return !d1.Equals(d2);
+            return d1 is null ? true : !d1.Equals(d2);
         }
 
         public override sealed int GetHashCode()
diff --git a/src/nativeresources/.gitmirror b/src/nativeresources/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/pal/.gitmirrorall b/src/pal/.gitmirrorall
deleted file mode 100644 (file)
index 9ee5c57..0000000
+++ /dev/null
@@ -1 +0,0 @@
-This folder will be mirrored by the Git-TFS Mirror recursively.
\ No newline at end of file
diff --git a/src/palrt/.gitmirror b/src/palrt/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/scripts/.gitmirrorall b/src/scripts/.gitmirrorall
deleted file mode 100644 (file)
index 9ee5c57..0000000
+++ /dev/null
@@ -1 +0,0 @@
-This folder will be mirrored by the Git-TFS Mirror recursively.
\ No newline at end of file
diff --git a/src/strongname/.gitmirror b/src/strongname/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/strongname/api/.gitmirror b/src/strongname/api/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/strongname/api/crossgen/.gitmirror b/src/strongname/api/crossgen/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/strongname/api/dac/.gitmirror b/src/strongname/api/dac/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/strongname/api/wks/.gitmirror b/src/strongname/api/wks/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/strongname/inc/.gitmirror b/src/strongname/inc/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/tools/.gitmirror b/src/tools/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/tools/GenClrDebugResource/.gitmirror b/src/tools/GenClrDebugResource/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/tools/InjectResource/.gitmirror b/src/tools/InjectResource/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/tools/crossgen/.gitmirror b/src/tools/crossgen/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/tools/metainfo/.gitmirrorall b/src/tools/metainfo/.gitmirrorall
deleted file mode 100644 (file)
index 9ee5c57..0000000
+++ /dev/null
@@ -1 +0,0 @@
-This folder will be mirrored by the Git-TFS Mirror recursively.
\ No newline at end of file
diff --git a/src/tools/util/.gitmirror b/src/tools/util/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/unwinder/.gitmirror b/src/unwinder/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/unwinder/amd64/.gitmirror b/src/unwinder/amd64/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/unwinder/arm/.gitmirror b/src/unwinder/arm/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/unwinder/arm64/.gitmirror b/src/unwinder/arm64/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/unwinder/dac/.gitmirror b/src/unwinder/dac/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/unwinder/dac/hostlocal/.gitmirror b/src/unwinder/dac/hostlocal/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/unwinder/dac/hostwinamd64/.gitmirror b/src/unwinder/dac/hostwinamd64/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/unwinder/dac/hostwinx86/.gitmirror b/src/unwinder/dac/hostwinx86/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/unwinder/wks/.gitmirror b/src/unwinder/wks/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/utilcode/.gitmirror b/src/utilcode/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/utilcode/crossgen/.gitmirror b/src/utilcode/crossgen/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/utilcode/dac/.gitmirror b/src/utilcode/dac/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/utilcode/dyncrt/.gitmirror b/src/utilcode/dyncrt/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/utilcode/staticnohost/.gitmirror b/src/utilcode/staticnohost/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/vm/.gitmirror b/src/vm/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/vm/amd64/.gitmirror b/src/vm/amd64/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/vm/arm/.gitmirror b/src/vm/arm/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/vm/arm64/.gitmirror b/src/vm/arm64/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
index 7f2829d..8d3f76f 100644 (file)
@@ -792,9 +792,9 @@ BOOL AreSameBinderInstance(ICLRPrivBinder *pBinderA, ICLRPrivBinder *pBinderB)
 {
     LIMITED_METHOD_CONTRACT;
     
-    BOOL fIsSameInstance = FALSE;
+    BOOL fIsSameInstance = (pBinderA == pBinderB);
     
-    if ((pBinderA != NULL) && (pBinderB != NULL))
+    if (!fIsSameInstance && (pBinderA != NULL) && (pBinderB != NULL))
     {
         // Get the ID for the first binder
         UINT_PTR binderIDA = 0, binderIDB = 0;
diff --git a/src/vm/coreclr/.gitmirror b/src/vm/coreclr/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/vm/crossgen/.gitmirror b/src/vm/crossgen/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/vm/crossgen_mscorlib/.gitmirror b/src/vm/crossgen_mscorlib/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/vm/dac/.gitmirror b/src/vm/dac/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
index 6b6b213..20eddfd 100644 (file)
@@ -878,9 +878,18 @@ void HashMap::Rehash()
     _ASSERTE (OwnLock());
 #endif
 
-    DWORD cbNewSize = g_rgPrimes[m_iPrimeIndex = NewSize()];
+    UPTR newPrimeIndex = NewSize();
 
-    ASSERT(m_iPrimeIndex < 70);
+    ASSERT(newPrimeIndex < g_rgNumPrimes);
+
+    if ((m_iPrimeIndex == newPrimeIndex) && (m_cbDeletes == 0))
+    {
+        return;
+    }
+
+    m_iPrimeIndex = newPrimeIndex;
+
+    DWORD cbNewSize = g_rgPrimes[m_iPrimeIndex];
 
     Bucket* rgBuckets = Buckets();
     UPTR cbCurrSize =   GetSize(rgBuckets);
diff --git a/src/vm/i386/.gitmirror b/src/vm/i386/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
index 8ba0607..821b6a9 100644 (file)
@@ -669,39 +669,6 @@ struct StackCrawlContext
     CrawlFrame  LatchedCF;
 };
 
-
-#if _TARGET_AMD64_
-// Returns the PC for the next instruction
-// If you want to skip ahead of a NOP padding sequence
-// You'll need to call this thing multiple times, until it returns NULL
-
-#define NOP_REX_PREFIX ((char)0x66)
-#define XCHG_EAX_EAX ((char)0x90)
-
-int isAtNop(const void *ip)
-{
-    const char *NextByte = (const char *)ip;
-    STRESS_LOG1(LF_EH, LL_INFO100, "AMD64 - isAtNop ip 0x%p\n", ip);
-    
-    int lpfxCount = 0;
-    //
-    // Read in length prefixes - no effect
-    //
-    for (lpfxCount = 0; lpfxCount < 14; lpfxCount++)
-    {
-        if (NextByte[lpfxCount] != NOP_REX_PREFIX)
-            break;
-    }
-
-    //
-    // xchg eax, eax
-    // 
-    if (NextByte[lpfxCount] == XCHG_EAX_EAX)
-        return (lpfxCount + 1);
-    return 0;
-}
-#endif // _TARGET_AMD64_
-
 // Crawl the stack looking for Thread Abort related information (whether we're executing inside a CER or an error handling clauses
 // of some sort).
 static StackWalkAction TAStackCrawlCallBackWorker(CrawlFrame* pCf, StackCrawlContext *pData)
@@ -802,34 +769,6 @@ static StackWalkAction TAStackCrawlCallBackWorker(CrawlFrame* pCf, StackCrawlCon
     }
 #endif  // !WIN64EXCEPTIONS
 
-#if _TARGET_AMD64_ 
-    STRESS_LOG1(LF_EH, LL_INFO10, "AMD64 - in TAStackCrawlCallBack 0x%x offset\n", offs);
-    STRESS_LOG1(LF_EH, LL_INFO10, "AMD64 - in TAStackCrawlCallBack frame IP is 0x%p\n", (void *)GetControlPC(pCf->GetRegisterSet()));
-    STRESS_LOG3(LF_EH, LL_INFO100, "AMD64 - in TAStackCrawlCallBack: STACKCRAWL method:%pM (), Frame:%p, FrameVtable = %pV\n",
-              pMD, pFrame, pCf->IsFrameless()?0:(*(void**)pFrame));
-  
-    DWORD OffsSkipNop = offs;
-  
-    if ( pCf->IsFrameless() && pCf->IsActiveFrame())
-    {
-        // If the frame is the top most frame and is managed,
-        // get the ip
-        void *oldIP = (void *)GetControlPC(pCf->GetRegisterSet());
-  
-        // skip over the nop to get newIP
-        int bNop = isAtNop(oldIP);
-  
-        // Skip over the nop if any
-        OffsSkipNop += bNop;
-
-        if (bNop != 0)
-        {
-            STRESS_LOG1(LF_EH, LL_INFO100, "AMD64 - TAStackCrawlCallBack: STACKCRAWL new Offset 0x%x V\n", OffsSkipNop );
-        }
-    }
-#endif // _TARGET_AMD64_
-  
-
     for(ULONG i=0; i < EHCount; i++)
     {
         pJitManager->GetNextEHClause(&pEnumState, &EHClause);
diff --git a/src/vm/wks/.gitmirror b/src/vm/wks/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/zap/.gitmirror b/src/zap/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/zap/crossgen/.gitmirror b/src/zap/crossgen/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
diff --git a/src/zap/wks/.gitmirror b/src/zap/wks/.gitmirror
deleted file mode 100644 (file)
index f507630..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. 
\ No newline at end of file
index d98cdbb..8682aad 100644 (file)
@@ -68,6 +68,7 @@ set __IlasmRoundTrip=
 set __CollectDumps=
 set __DoCrossgen=
 set __CrossgenAltJit=
+set __PerfTests=
 
 :Arg_Loop
 if "%1" == "" goto ArgsDone
@@ -130,6 +131,11 @@ echo %__MsgPrefix%CORE_ROOT is initially set to: "%CORE_ROOT%"
 shift 
 :ArgsDone
 
+:: Done with argument processing. Check argument values for validity.
+
+if defined __TestEnv (if not exist %__TestEnv% echo %__MsgPrefix%Error: Test Environment script %__TestEnv% not found && exit /b 1)
+if "%__PerfTests%"=="true" (if defined __GenerateLayoutOnly echo %__MsgPrefix%Error: Don't specify both "PerfTests" and "GenerateLayoutOnly" && exit /b 1)
+
 :: Set the remaining variables based upon the determined configuration
 set "__BinDir=%__RootBinDir%\Product\%__BuildOS%.%__BuildArch%.%__BuildType%"
 set "__TestWorkingDir=%__RootBinDir%\tests\%__BuildOS%.%__BuildArch%.%__BuildType%"
@@ -140,20 +146,20 @@ set "__TestWorkingDir=%__RootBinDir%\tests\%__BuildOS%.%__BuildArch%.%__BuildTyp
 if not defined XunitTestBinBase       set  XunitTestBinBase=%__TestWorkingDir%
 if not defined XunitTestReportDirBase set  XunitTestReportDirBase=%XunitTestBinBase%\Reports\
 
-if not exist %__LogsDir% md %__LogsDir%
+:: Set up msbuild and tools environment. Check if msbuild and VS exist.
 
 set _msbuildexe=
 if /i "%__VSVersion%" == "vs2017" (
-  set "__VSToolsRoot=%VS150COMNTOOLS%"
-  set "__VCToolsRoot=%VS150COMNTOOLS%\..\..\VC\Auxiliary\Build"
+    set "__VSToolsRoot=%VS150COMNTOOLS%"
+    set "__VCToolsRoot=%VS150COMNTOOLS%\..\..\VC\Auxiliary\Build"
 
-  set _msbuildexe="%VS150COMNTOOLS%\..\..\MSBuild\15.0\Bin\MSBuild.exe"
+    set _msbuildexe="%VS150COMNTOOLS%\..\..\MSBuild\15.0\Bin\MSBuild.exe"
 ) else if /i "%__VSVersion%" == "vs2015" (
-  set "__VSToolsRoot=%VS140COMNTOOLS%"
-  set "__VCToolsRoot=%VS140COMNTOOLS%\..\..\VC"
+    set "__VSToolsRoot=%VS140COMNTOOLS%"
+    set "__VCToolsRoot=%VS140COMNTOOLS%\..\..\VC"
 
-  set _msbuildexe="%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe"
-  if not exist !_msbuildexe! set _msbuildexe="%ProgramFiles%\MSBuild\14.0\Bin\MSBuild.exe"
+    set _msbuildexe="%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe"
+    if not exist !_msbuildexe! set _msbuildexe="%ProgramFiles%\MSBuild\14.0\Bin\MSBuild.exe"
 )
 
 :: Does VS really exist?
@@ -162,7 +168,10 @@ if not exist "%__VCToolsRoot%\vcvarsall.bat"          goto NoVS
 if not exist "%__VSToolsRoot%\VsDevCmd.bat"           goto NoVS
 
 :: Does MSBuild really exist?
-if not exist %_msbuildexe% echo %__MsgPrefix%Error: Could not find MSBuild.exe.  Please see https://github.com/dotnet/coreclr/blob/master/Documentation/project-docs/developer-guide.md for build instructions. && exit /b 1
+if not exist %_msbuildexe% (
+    echo %__MsgPrefix%Error: Could not find MSBuild.exe.  Please see https://github.com/dotnet/coreclr/blob/master/Documentation/project-docs/developer-guide.md for build instructions.
+    exit /b 1
+)
 
 if not defined VSINSTALLDIR (
     echo %__MsgPrefix%Error: runtest.cmd should be run from a Visual Studio Command Prompt.  Please see https://github.com/dotnet/coreclr/blob/master/Documentation/project-docs/developer-guide.md for build instructions.
@@ -189,12 +198,21 @@ if defined DoLink (
     set __msbuildCommonArgs=%__msbuildCommonArgs% /p:RunTestsViaIllink=true
 )
 
+if not exist %__LogsDir% md %__LogsDir%
+
+REM These log files are created automatically by the test run process. Q: what do they depend on being set?
+set __TestRunHtmlLog=%__LogsDir%\TestRun_%__BuildOS%__%__BuildArch%__%__BuildType%.html
+set __TestRunXmlLog=%__LogsDir%\TestRun_%__BuildOS%__%__BuildArch%__%__BuildType%.xml
+
 REM Prepare the Test Drop
-echo %__MsgPrefix%Removing 'ni' files and 'lock' folders from %__TestWorkingDir%
-REM Cleans any NI from the last run
-powershell -NoProfile "Get-ChildItem -path %__TestWorkingDir% -Include '*.ni.*' -Recurse -Force | Remove-Item -force"
-REM Cleans up any lock folder used for synchronization from last run
-powershell -NoProfile "Get-ChildItem -path %__TestWorkingDir% -Include 'lock' -Recurse -Force |  where {$_.Attributes -eq 'Directory'}| Remove-Item -force -Recurse"
+
+if not defined __GenerateLayoutOnly (
+    echo %__MsgPrefix%Removing 'ni' files and 'lock' folders from %__TestWorkingDir%
+    REM Cleans any NI from the last run
+    powershell -NoProfile "Get-ChildItem -path %__TestWorkingDir% -Include '*.ni.*' -Recurse -Force | Remove-Item -force"
+    REM Cleans up any lock folder used for synchronization from last run
+    powershell -NoProfile "Get-ChildItem -path %__TestWorkingDir% -Include 'lock' -Recurse -Force |  where {$_.Attributes -eq 'Directory'}| Remove-Item -force -Recurse"
+)
 
 if defined CORE_ROOT goto SkipCoreRootSetup
 
@@ -207,29 +225,31 @@ xcopy "%__BinDir%" "%CORE_ROOT%"
 
 :SkipCoreRootSetup
 
+if not exist %CORE_ROOT%\coreclr.dll (
+    echo %__MsgPrefix%Error: Ensure you have done a successful build of the Product and %CORE_ROOT% contains runtime binaries.
+    exit /b 1
+)
 
-if defined __TestEnv (if not exist %__TestEnv% echo %__MsgPrefix%Error: Test Environment script %__TestEnv% not found && exit /b 1)
-
-REM These log files are created automatically by the test run process. Q: what do they depend on being set?
-set __TestRunHtmlLog=%__LogsDir%\TestRun_%__BuildOS%__%__BuildArch%__%__BuildType%.html
-set __TestRunXmlLog=%__LogsDir%\TestRun_%__BuildOS%__%__BuildArch%__%__BuildType%.xml
+if "%__PerfTests%"=="true" goto RunPerfTests
 
+REM =========================================================================================
+REM ===
+REM === Run normal (non-perf) tests
+REM ===
+REM =========================================================================================
 
-if "%__PerfTests%"=="true" goto RunPerfTests
+call :SetTestEnvironment
 
-call :ResolveDependecies
+call :ResolveDependencies
+if errorlevel 1 exit /b 1
 
 if defined __DoCrossgen call :PrecompileFX
 
-if  defined __GenerateLayoutOnly (
-    REM Delete the unecessary mscorlib.ni file.
-    if exist %CORE_ROOT%\mscorlib.ni.dll del %CORE_ROOT%\mscorlib.ni.dll
-    exit /b 0
-)
+REM Delete the unecessary mscorlib.ni file.
+if exist %CORE_ROOT%\mscorlib.ni.dll del %CORE_ROOT%\mscorlib.ni.dll
 
-if not exist %CORE_ROOT%\coreclr.dll (
-    echo %__MsgPrefix%Error: Ensure you have done a successful build of the Product and %CORE_ROOT% contains runtime binaries.
-    exit /b 1
+if defined __GenerateLayoutOnly (
+    exit /b 0
 )
 
 ::Check if the test Binaries are built
@@ -258,9 +278,6 @@ if "%__CollectDumps%"=="true" (
 echo %__MsgPrefix%CORE_ROOT that will be used is: %CORE_ROOT%
 echo %__MsgPrefix%Starting the test run ...
 
-REM Delete the unecessary mscorlib.ni file.
-if exist %CORE_ROOT%\mscorlib.ni.dll del %CORE_ROOT%\mscorlib.ni.dll
-
 set __BuildLogRootName=TestRunResults
 call :msbuild "%__ProjectFilesDir%\runtest.proj" /p:Runtests=true /clp:showcommandline
 set __errorlevel=%errorlevel%
@@ -275,7 +292,13 @@ if %__errorlevel% GEQ 1 (
     exit /b 1
 )
 
-if not defined __PerfTests goto :SkipRunPerfTests
+goto TestsDone
+
+REM =========================================================================================
+REM ===
+REM === Run perf tests
+REM ===
+REM =========================================================================================
 
 :RunPerfTests 
 echo %__MsgPrefix%CORE_ROOT that will be used is: %CORE_ROOT%  
@@ -290,7 +313,7 @@ if errorlevel 1 (
    echo     Html report: %__TestRunHtmlLog%  
 )  
 
-:SkipRunPerfTests
+goto TestsDone
 
 REM =========================================================================================
 REM ===
@@ -298,6 +321,8 @@ REM === All tests complete!
 REM ===
 REM =========================================================================================
 
+:TestsDone
+
 echo %__MsgPrefix%Test run successful. Refer to the log files for details:
 echo     %__TestRunHtmlLog%
 echo     %__TestRunXmlLog%
@@ -305,11 +330,10 @@ exit /b 0
 
 REM =========================================================================================
 REM ===
-REM === Helper routines
+REM === Compile the managed assemblies in Core_ROOT before running the tests
 REM ===
 REM =========================================================================================
 
-REM Compile the managed assemblies in Core_ROOT before running the tests
 :PrecompileAssembly
 
 if defined __JitDisasm goto :jitdisasm
@@ -373,15 +397,21 @@ for %%F in (%CORE_ROOT%\*.dll) do call :PrecompileAssembly "%CORE_ROOT%" "%%F" %
 endlocal
 exit /b 0
 
+REM =========================================================================================
+REM ===
+REM === Subroutine to invoke msbuild.
+REM ===
+REM === All arguments are passed to msbuild. The first argument should be the .proj file to invoke.
+REM ===
+REM === On entry, environment variable __BuildLogRootName must be set to a file name prefix for the generated log files.
+REM === All the "standard" environment variables that aren't expected to change per invocation must also be set,
+REM === like __msbuildCommonArgs.
+REM ===
+REM === The build log files will be overwritten, not appended to.
+REM ===
+REM =========================================================================================
+
 :msbuild
-@REM Subroutine to invoke msbuild. All arguments are passed to msbuild. The first argument should be the
-@REM .proj file to invoke.
-@REM
-@REM On entry, __BuildLogRootName must be set to a file name prefix for the generated log file.
-@REM All the "standard" environment variables that aren't expected to change per invocation must also be set,
-@REM like __msbuildCommonArgs.
-@REM
-@REM The build log files will be overwritten, not appended to.
 
 echo %__MsgPrefix%Invoking msbuild
 
@@ -413,12 +443,13 @@ if errorlevel 1 (
 
 exit /b 0
 
-:ResolveDependecies:
+REM =========================================================================================
+REM ===
+REM === Set various environment variables, based on arguments to this script, before invoking the tests.
+REM ===
+REM =========================================================================================
 
-if "%CORE_ROOT%" == "" (
-    echo %__MsgPrefix%Error: Ensure you have done a successful build of the Product and Run - runtest BuildArch BuildType {path to product binaries}.
-    exit /b 1
-)
+:SetTestEnvironment
 
 :: Long GC tests take about 10 minutes per test on average, so
 :: they often bump up against the default 10 minute timeout.
@@ -452,6 +483,15 @@ if defined __IlasmRoundTrip (
     set RunningIlasmRoundTrip=1
 )
 
+exit /b 0
+
+REM =========================================================================================
+REM ===
+REM === Generate the "layout" directory in CORE_ROOT; download dependencies.
+REM ===
+REM =========================================================================================
+
+:ResolveDependencies
 set __BuildLogRootName=Tests_GenerateRuntimeLayout
 call :msbuild "%__ProjectFilesDir%\runtest.proj" /p:GenerateRuntimeLayout=true 
 if errorlevel 1 (
@@ -462,7 +502,11 @@ echo %__MsgPrefix%Created the runtime layout with all dependencies in %CORE_ROOT
 
 exit /b 0
 
-
+REM =========================================================================================
+REM ===
+REM === Display a help message describing how to use this script.
+REM ===
+REM =========================================================================================
 
 :Usage
 @REM NOTE: The caret character is used to escape meta-characters known to the CMD shell. This character does
@@ -505,16 +549,17 @@ echo gcname ^<name^>             - Runs the tests with COMPlus_GCName=name
 echo timeout ^<n^>               - Sets the per-test timeout in milliseconds ^(default is 10 minutes = 10 * 60 * 1000 = 600000^).
 echo                             Note: some options override this ^(gcstresslevel, longgc, gcsimulator^).
 echo msbuildargs ^<args...^>     - Pass all subsequent args directly to msbuild invocations.
-echo ^<CORE_ROOT^>               - Path to the runtime to test (if specified).
+echo ^<CORE_ROOT^>               - Path to the runtime to test ^(if specified^).
 echo.
 echo Note that arguments are not case-sensitive.
 echo.
 echo Examples:
 echo   %0 x86 checked
-echo   %0 x64 release GenerateLayoutOnly
+echo   %0 x64 checked GenerateLayoutOnly
+echo   %0 x64 release
 exit /b 1
 
 :NoVS
-echo Visual Studio 2015 or 2017 (Community is free) is a prerequisite to build this repository.
+echo Visual Studio 2015 or 2017 ^(Community is free^) is a prerequisite to build this repository.
 echo See: https://github.com/dotnet/coreclr/blob/master/Documentation/project-docs/developer-guide.md#prerequisites
 exit /b 1
diff --git a/tests/src/JIT/Regression/JitBlue/DevDiv_543057a/DevDiv_543057a.cs b/tests/src/JIT/Regression/JitBlue/DevDiv_543057a/DevDiv_543057a.cs
new file mode 100644 (file)
index 0000000..cfa907a
--- /dev/null
@@ -0,0 +1,74 @@
+// 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.
+//
+
+// The bug captured by this test was a case where:
+// - We have COMPlus_JitStressRegs=3, so we're limiting the available registers.
+// - We have a DIV with two double operands that are casts from int lclVars, and it is passed to a call.
+// - We have 4 float lclVars in registers:
+//   - One is active in a caller-save register (that will be x in our case)
+//   - One is active in a callee-save register (y)
+//   - One is inactive in a caller-save register (z)
+//   - One is inactive in a callee-save register (w)
+// - When we allocate the def (target) register for the second cast, we spill the first one.
+// - When we try to reload it, we were incorrectly returning false from 'isRegInUse()'
+//   for the inactive interval in the second half.
+
+using System;
+using System.Runtime.CompilerServices;
+
+public class DevDiv_543057
+
+{
+    public const int Pass = 100;
+    public const int Fail = -1;
+
+    [MethodImplAttribute(MethodImplOptions.NoInlining)]
+    public static float GetFloat(int i)
+    {
+        return (float)i;
+    }
+    [MethodImplAttribute(MethodImplOptions.NoInlining)]
+    public static int test(int i, int j)
+    {
+        // x and y will be preferenced to callee-save
+        //   they need to have enough references to qualify for callee-save
+        // z and w will not
+        // x and z will be inactive at the call to Math.Ceiling
+        // y and w will be active
+        float x = GetFloat(1);
+        float y = GetFloat(2);
+        float z = GetFloat(3);
+        // We want w in f1. At this point z is likely to be in f0.
+        // So define 'result' first.
+        float result = x - y;
+        float w = x + y + z;
+        if (i != j)
+        {
+            // Here all our floats are in registers. z is going to be redefined, so it is inactive,
+            // and w is not used except in the else clause so it is also inactive.
+            z = (float) Math.Ceiling(((double)i) / ((double)j));
+            // Now we use x and y so that they are live across the call to Math.Ceiling.
+            result = z + y + w;
+        }
+        else
+        {
+            // Here we need to use all of our float arguments so that they are all live.
+            y = x * y * z * w;
+            x = y * 2;
+            // Now x and y are going to be live across this call, to encourage them to get a callee-save reg.
+            Console.WriteLine("FAIL");
+            // And use x a couple more times.
+            x *= y;
+            result += x + y;
+        }
+        Console.WriteLine("Result: " + result);
+        return Pass;
+    }
+    public static int Main()
+    {
+        return test(5, 6);
+    }
+}
+
diff --git a/tests/src/JIT/Regression/JitBlue/DevDiv_543057a/DevDiv_543057a.csproj b/tests/src/JIT/Regression/JitBlue/DevDiv_543057a/DevDiv_543057a.csproj
new file mode 100644 (file)
index 0000000..6d58ab0
--- /dev/null
@@ -0,0 +1,37 @@
+<?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>
+    <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+  </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>
+  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+  <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+  </PropertyGroup> 
+</Project>