summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAndy Ayers <andya@microsoft.com>2018-10-30 11:24:37 -0700
committerGitHub <noreply@github.com>2018-10-30 11:24:37 -0700
commit626def86af589734999a0e62d3a83c2acb9de54a (patch)
tree6a008a9d281db750f51f32795d5eec7b116392ee /tests
parent67ed270f13012e85b2925360d32673614f834449 (diff)
downloadcoreclr-626def86af589734999a0e62d3a83c2acb9de54a.tar.gz
coreclr-626def86af589734999a0e62d3a83c2acb9de54a.tar.bz2
coreclr-626def86af589734999a0e62d3a83c2acb9de54a.zip
JIT: Fix call flag propagation for GenTreeArrElem (#20660)
Closes #20651. Also fix up some "near miss" cases for GenTreeField and GenTreeBoundsCheck, where we get lucky and the importer currently splits trees with temps so the currently ignored child nodes have no interesting side effects. Revise GenTreeField a bit to pull more of the initialization work into the constructor. Add a missing R2R field propagation for field nodes in GtClone (evidently also never hit in practice).
Diffstat (limited to 'tests')
-rw-r--r--tests/src/JIT/Regression/JitBlue/GitHub_20651/GitHub_20651.cs25
-rw-r--r--tests/src/JIT/Regression/JitBlue/GitHub_20651/GitHub_20651.csproj39
2 files changed, 64 insertions, 0 deletions
diff --git a/tests/src/JIT/Regression/JitBlue/GitHub_20651/GitHub_20651.cs b/tests/src/JIT/Regression/JitBlue/GitHub_20651/GitHub_20651.cs
new file mode 100644
index 0000000000..81a532d2f0
--- /dev/null
+++ b/tests/src/JIT/Regression/JitBlue/GitHub_20651/GitHub_20651.cs
@@ -0,0 +1,25 @@
+// 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.
+
+using System;
+
+class X
+{
+ static string s = "hello, world";
+
+ static string[,] G()
+ {
+ string[,] strings = new string[3,3];
+ strings[0,0] = s;
+ return strings;
+ }
+
+ // Ensure GTF_CALL flag is propagated to MD array accessor
+ public static int Main()
+ {
+ int c = G()[0,0].GetHashCode();
+ int v = s.GetHashCode();
+ return c == v ? 100 : -1;
+ }
+}
diff --git a/tests/src/JIT/Regression/JitBlue/GitHub_20651/GitHub_20651.csproj b/tests/src/JIT/Regression/JitBlue/GitHub_20651/GitHub_20651.csproj
new file mode 100644
index 0000000000..52a913f869
--- /dev/null
+++ b/tests/src/JIT/Regression/JitBlue/GitHub_20651/GitHub_20651.csproj
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <AssemblyName>$(MSBuildProjectName)</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <CLRTestPriority>1</CLRTestPriority>
+ </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="GitHub_20651.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> \ No newline at end of file