-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Release/5.0] Port [RyuJIT] Propagate gtFlags in Vector.Create to .NE…
…T 5.0 (#44979) PR in master: #43578 Propagate GTF_CALL if needed in GT_LIST. Use gtNewListNode. Ignore test for Mono Co-authored-by: Egor Bogatov <egorbo@gmail.com>
- Loading branch information
1 parent
90abcef
commit ea56d0c
Showing
5 changed files
with
96 additions
and
6 deletions.
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
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
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
74 changes: 74 additions & 0 deletions
74
src/tests/JIT/HardwareIntrinsics/General/Regression/GitHub_43569/GitHub_43569.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,74 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using System.Runtime.CompilerServices; | ||
using System.Runtime.Intrinsics; | ||
|
||
namespace GitHub_43569 | ||
{ | ||
class Program | ||
{ | ||
public static int Main() | ||
{ | ||
if ((int)Vector64_Create_short(100) != 100) | ||
return 1; | ||
if ((int)Vector128_Create_float(100) != 100) | ||
return 2; | ||
if ((int)Vector128_Create_byte(100) != 100) | ||
return 3; | ||
if ((int)Vector256_Create_float(100) != 100) | ||
return 4; | ||
if ((int)Vector256_Create_double(100) != 100) | ||
return 5; | ||
return 100; | ||
} | ||
|
||
[MethodImpl(MethodImplOptions.AggressiveInlining)] | ||
public static T Inline<T>(T t) => t; | ||
|
||
[MethodImpl(MethodImplOptions.NoInlining)] | ||
public static short Vector64_Create_short(short a) | ||
{ | ||
Vector64<short> x = default; | ||
for (int i = 0; i < 1; i++) | ||
x = Vector64.Create(1, 2, 3, Inline(a)); | ||
return x.GetElement(3); | ||
} | ||
|
||
[MethodImpl(MethodImplOptions.NoInlining)] | ||
public static float Vector128_Create_float(float a) | ||
{ | ||
Vector128<float> x = default; | ||
for (int i = 0; i < 1; i++) | ||
x = Vector128.Create(1, 2, 3, Inline(a)); | ||
return x.GetElement(3); | ||
} | ||
|
||
[MethodImpl(MethodImplOptions.NoInlining)] | ||
public static byte Vector128_Create_byte(byte a) | ||
{ | ||
Vector128<byte> x = default; | ||
for (int i = 0; i < 1; i++) | ||
x = Vector128.Create(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, Inline(a)); | ||
return x.GetElement(15); | ||
} | ||
|
||
[MethodImpl(MethodImplOptions.NoInlining)] | ||
public static float Vector256_Create_float(float a) | ||
{ | ||
Vector256<float> x = default; | ||
for (int i = 0; i < 1; i++) | ||
x = Vector256.Create(1, 2, 3, 4, 5, 6, 7, Inline(a)); | ||
return x.GetElement(7); | ||
} | ||
|
||
[MethodImpl(MethodImplOptions.NoInlining)] | ||
public static double Vector256_Create_double(double a) | ||
{ | ||
Vector256<double> x = default; | ||
for (int i = 0; i < 1; i++) | ||
x = Vector256.Create(1, 2, 3, Inline(a)); | ||
return x.GetElement(3); | ||
} | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
src/tests/JIT/HardwareIntrinsics/General/Regression/GitHub_43569/GitHub_43569.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,12 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<DebugType>Embedded</DebugType> | ||
<Optimize>True</Optimize> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Compile Include="GitHub_43569.cs" /> | ||
</ItemGroup> | ||
</Project> |