forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request dotnet/coreclr#21589 from CarolEidt/Fix21546
Transform SIMD8 to FIELD_LIST if promoted Commit migrated from dotnet/coreclr@b0996f3
- Loading branch information
Showing
3 changed files
with
112 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
78 changes: 78 additions & 0 deletions
78
src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_21546/GitHub_21546.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
// 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; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Runtime.CompilerServices; | ||
|
||
using Point = System.Numerics.Vector2; | ||
|
||
namespace GitHub_21546 | ||
{ | ||
public class test | ||
{ | ||
static Point checkA; | ||
static Point checkB; | ||
static Point checkC; | ||
static int returnVal; | ||
|
||
[MethodImpl(MethodImplOptions.NoInlining)] | ||
static void check(Point a, Point b, Point c) | ||
{ | ||
if (a != checkA) | ||
{ | ||
Console.WriteLine($"A doesn't match. Should be {checkA} but is {a}"); | ||
returnVal = -1; | ||
} | ||
if (b != checkB) | ||
{ | ||
Console.WriteLine($"B doesn't match. Should be {checkB} but is {b}"); | ||
returnVal = -1; | ||
} | ||
if (c != checkC) | ||
{ | ||
Console.WriteLine($"C doesn't match. Should be {checkC} but is {c}"); | ||
returnVal = -1; | ||
} | ||
} | ||
|
||
[MethodImpl(MethodImplOptions.NoInlining)] | ||
static void FailureCase(List<Point> p) | ||
{ | ||
Point p1 = p[0]; | ||
Point p2 = p.Last(); | ||
|
||
check(p1, p[1], p2); | ||
check(p1, p[1], p2); | ||
check(p1, p[1], p2); | ||
} | ||
|
||
static Point NextPoint(Random random) | ||
{ | ||
return new Point( | ||
(float)random.NextDouble(), | ||
(float)random.NextDouble() | ||
); | ||
} | ||
|
||
static int Main() | ||
{ | ||
returnVal = 100; | ||
Random random = new Random(13); | ||
List<Point> p = new List<Point>(); | ||
|
||
checkA = NextPoint(random); | ||
p.Add(checkA); | ||
checkB = NextPoint(random); | ||
p.Add(checkB); | ||
checkC = NextPoint(random); | ||
p.Add(checkC); | ||
|
||
FailureCase(p); | ||
|
||
return returnVal; | ||
} | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
src/coreclr/tests/src/JIT/Regression/JitBlue/GitHub_21546/GitHub_21546.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<SchemaVersion>2.0</SchemaVersion> | ||
<ProjectGuid>{2649FAFE-07BF-4F93-8120-BA9A69285ABB}</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> | ||
<PropertyGroup> | ||
<DebugType>None</DebugType> | ||
<Optimize>True</Optimize> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies"> | ||
<Visible>False</Visible> | ||
</CodeAnalysisDependentAssemblyPaths> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="$(MSBuildProjectName).cs" /> | ||
</ItemGroup> | ||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" /> | ||
<PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' "></PropertyGroup> | ||
</Project> |