-
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.
Fix optimization of Vector512 And + Not to AndNot (#108775)
* Fix optimization of Vector512 And + Not to AndNot Fixes #108613 * Fix test
- Loading branch information
1 parent
4f69316
commit 7b67ab3
Showing
3 changed files
with
40 additions
and
1 deletion.
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
31 changes: 31 additions & 0 deletions
31
src/tests/JIT/Regression/JitBlue/Runtime_108613/Runtime_108613.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,31 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
// Reduced test case from Antigen. | ||
// | ||
// Failure: | ||
// Assertion failed 'false && "found use of a node that is not in the LIR sequence"' | ||
|
||
using System; | ||
using System.Runtime.Intrinsics; | ||
using Xunit; | ||
|
||
public class Runtime_108613 | ||
{ | ||
Vector512<uint> v512_uint_104 = Vector512.Create((uint)2, 3, 3, 57, 57, 57, 5, 2, 0, 2, 57, 57, 57, 2, 5, 2); | ||
public int Method0() | ||
{ | ||
Vector512<uint> x = Vector512.AndNot(Vector512.Equals(v512_uint_104, v512_uint_104), Vector512.Equals(v512_uint_104, v512_uint_104)); | ||
return (int)x.GetElement(2); | ||
} | ||
|
||
[Fact] | ||
public static void TestEntryPoint() | ||
{ | ||
if (Vector512.IsHardwareAccelerated) | ||
{ | ||
Runtime_108613 t = new Runtime_108613(); | ||
Assert.Equal(0, t.Method0()); | ||
} | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
src/tests/JIT/Regression/JitBlue/Runtime_108613/Runtime_108613.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> |