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.
Update the assert for BlendVariable (dotnet#92183)
* Update the assert for BlendVariable * Add test cases * Add Sse41.IsSupported check
1 parent
e235aef
commit b4be77b
Showing
3 changed files
with
59 additions
and
2 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
43 changes: 43 additions & 0 deletions
43
src/tests/JIT/Regression/JitBlue/Runtime_91798/Runtime_91798.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,43 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// | ||
// There was an issue with Sse41.BlendVariable where we might reuse XMM0 | ||
// for targetReg. | ||
|
||
using System; | ||
using System.Runtime.CompilerServices; | ||
using System.Runtime.Intrinsics; | ||
using System.Runtime.Intrinsics.X86; | ||
using Xunit; | ||
|
||
public class TestClass_91798 | ||
{ | ||
Vector128<uint> v128_uint_75 = Vector128.Create((uint)2, 1, 0, 1); | ||
|
||
[MethodImpl(MethodImplOptions.NoInlining)] | ||
public Vector128<uint> Method0() | ||
{ | ||
return Sse41.BlendVariable(v128_uint_75, Vector128<uint>.One, v128_uint_75); | ||
} | ||
|
||
[Fact] | ||
public static void TestEntryPoint() | ||
{ | ||
if (Sse41.IsSupported) | ||
{ | ||
TestClass_91798 obj = new TestClass_91798(); | ||
obj.Method0(); | ||
} | ||
} | ||
} | ||
/* | ||
Environment: | ||
set DOTNET_EnableSSE42=0 | ||
Assert failure(PID 8884 [0x000022b4], Thread: 14588 [0x38fc]): Assertion failed '(targetReg != REG_XMM0)' in 'TestClass_91798:Method0():System.Runtime.Intrinsics.Vector128`1[uint]:this' during 'Generate code' (IL size 23; hash 0x557a6266; FullOpts) | ||
File: D:\git\runtime2\src\coreclr\jit\emitxarch.cpp Line: 8612 | ||
Image: d:\git\runtime2\artifacts\tests\coreclr\windows.x64.Checked\tests\Core_Root\corerun.exe | ||
*/ | ||
|
9 changes: 9 additions & 0 deletions
9
src/tests/JIT/Regression/JitBlue/Runtime_91798/Runtime_91798.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,9 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<Optimize>True</Optimize> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Compile Include="$(MSBuildProjectName).cs" /> | ||
<CLRTestEnvironmentVariable Include="DOTNET_EnableSSE42" Value="0" /> | ||
</ItemGroup> | ||
</Project> |