-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
61693ad
commit a9231ae
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
src/tests/JIT/Regression/JitBlue/Runtime_105721/Runtime_105721.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,32 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using System; | ||
using System.Runtime.CompilerServices; | ||
using System.Runtime.Intrinsics; | ||
using Xunit; | ||
|
||
public class Runtime_105721 | ||
{ | ||
[Fact] | ||
public static void TestEntryPoint() | ||
{ | ||
new Runtime_105721().Foo(); | ||
} | ||
|
||
private short s_21 = -1; | ||
[MethodImpl(MethodImplOptions.NoInlining)] | ||
private void Foo() | ||
{ | ||
Vector128<short> v1 = Vector128.CreateScalar<short>(s_21); | ||
Vector128<int> v2 = Vector128.CreateScalar<int>(s_21); | ||
Check(v1, v2); | ||
} | ||
|
||
[MethodImpl(MethodImplOptions.NoInlining)] | ||
private void Check(Vector128<short> v1, Vector128<int> v2) | ||
{ | ||
Assert.Equal(-1, v1[0]); | ||
Assert.Equal(-1, v2[0]); | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
src/tests/JIT/Regression/JitBlue/Runtime_105721/Runtime_105721.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,8 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<Optimize>True</Optimize> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Compile Include="$(MSBuildProjectName).cs" /> | ||
</ItemGroup> | ||
</Project> |