-
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.
Ensure we consistently broadcast the result of simd dot product (#106031
- Loading branch information
1 parent
53780c9
commit 42ababd
Showing
4 changed files
with
65 additions
and
15 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
50 changes: 50 additions & 0 deletions
50
src/tests/JIT/Regression/JitBlue/Runtime_99391/Runtime_99391.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,50 @@ | ||
// 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.Numerics; | ||
using Xunit; | ||
|
||
public class Runtime_99391 | ||
{ | ||
[Fact] | ||
public static void TestEntryPoint() | ||
{ | ||
Vector2 result2a = Vector2.Normalize(Value2); | ||
Assert.Equal(new Vector2(0, 1), result2a); | ||
|
||
Vector2 result2b = Vector2.Normalize(new Vector2(0, 2)); | ||
Assert.Equal(new Vector2(0, 1), result2b); | ||
|
||
Vector3 result3a = Vector3.Normalize(Value3); | ||
Assert.Equal(new Vector3(0, 0, 1), result3a); | ||
|
||
Vector3 result3b = Vector3.Normalize(new Vector3(0, 0, 2)); | ||
Assert.Equal(new Vector3(0, 0, 1), result3b); | ||
|
||
Vector4 result4a = Vector4.Normalize(Value4); | ||
Assert.Equal(new Vector4(0, 0, 0, 1), result4a); | ||
|
||
Vector4 result4b = Vector4.Normalize(new Vector4(0, 0, 0, 2)); | ||
Assert.Equal(new Vector4(0, 0, 0, 1), result4b); | ||
} | ||
|
||
private static Vector2 Value2 | ||
{ | ||
[MethodImpl(MethodImplOptions.NoInlining)] | ||
get => new Vector2(0, 2); | ||
} | ||
|
||
private static Vector3 Value3 | ||
{ | ||
[MethodImpl(MethodImplOptions.NoInlining)] | ||
get => new Vector3(0, 0, 2); | ||
} | ||
|
||
private static Vector4 Value4 | ||
{ | ||
[MethodImpl(MethodImplOptions.NoInlining)] | ||
get => new Vector4(0, 0, 0, 2); | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
src/tests/JIT/Regression/JitBlue/Runtime_99391/Runtime_99391.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,11 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<Optimize>True</Optimize> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Compile Include="$(MSBuildProjectName).cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<CLRTestEnvironmentVariable Include="DOTNET_TieredCompilation" Value="0" /> | ||
</ItemGroup> | ||
</Project> |