summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCarol Eidt <carol.eidt@microsoft.com>2020-02-13 14:27:22 -0800
committerGitHub <noreply@github.com>2020-02-13 14:27:22 -0800
commit3800df91364fac77a85a512a9988c71302726e65 (patch)
tree7d8c777850ccb73190117ae443ae44f36d82066c /tests
parent75d2c46571a5e05494d29468f4a37198abc06ace (diff)
downloadcoreclr-3800df91364fac77a85a512a9988c71302726e65.tar.gz
coreclr-3800df91364fac77a85a512a9988c71302726e65.tar.bz2
coreclr-3800df91364fac77a85a512a9988c71302726e65.zip
Port PR #258 to 3.1 (#27984)
* Port PR #258 to 3.1 * Fix test proj file
Diffstat (limited to 'tests')
-rw-r--r--tests/src/Regressions/coreclr/GitHub_27937/Test27937.csproj31
-rw-r--r--tests/src/Regressions/coreclr/GitHub_27937/test27937.cs39
2 files changed, 70 insertions, 0 deletions
diff --git a/tests/src/Regressions/coreclr/GitHub_27937/Test27937.csproj b/tests/src/Regressions/coreclr/GitHub_27937/Test27937.csproj
new file mode 100644
index 0000000000..d120acc6d7
--- /dev/null
+++ b/tests/src/Regressions/coreclr/GitHub_27937/Test27937.csproj
@@ -0,0 +1,31 @@
+<?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>{CBD0D777-3583-49CC-8538-DD84447F6522}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>1</CLRTestPriority>
+ <DebugType>None</DebugType>
+ <Optimize>True</Optimize>
+ </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>
+ <ItemGroup>
+ <!-- Add Compile Object Here -->
+ <Compile Include="test27937.cs" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+</Project>
diff --git a/tests/src/Regressions/coreclr/GitHub_27937/test27937.cs b/tests/src/Regressions/coreclr/GitHub_27937/test27937.cs
new file mode 100644
index 0000000000..7056ed8577
--- /dev/null
+++ b/tests/src/Regressions/coreclr/GitHub_27937/test27937.cs
@@ -0,0 +1,39 @@
+// 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.Runtime.Intrinsics;
+
+class Test27937
+{
+ static unsafe void calc(float* fa, float* fb)
+ {
+ float* pb = fb;
+ float* eb = pb + 16;
+
+ do
+ {
+ float* pa = fa;
+ float* ea = pa + 16;
+ var va = Vector128<float>.Zero;
+
+ do
+ {
+ *pa = va.ToScalar();
+
+ pa += Vector128<float>.Count;
+ pb += Vector128<float>.Count;
+ } while (pa < ea);
+
+ } while (pb < eb);
+ }
+
+ static unsafe int Main()
+ {
+ float* a = stackalloc float[16];
+ float* b = stackalloc float[16];
+
+ calc(a, b);
+
+ return 100;
+ }
+}