1
0
Fork 0
mirror of https://github.com/VSadov/Satori.git synced 2025-06-09 17:44:48 +09:00

JIT: Fixed assertion on IsUnusedValue when creating ConditionalSelect nodes around SVE methods (#105730)

* Fixed assertion on IsUnusedValue when creating ConditionalSelect nodes around SVE methods

* Added regression test

* Try/catch

* Make private

* Update Runtime_105484.cs
This commit is contained in:
Will Smith 2024-08-01 08:26:02 -07:00 committed by GitHub
parent c59543c5c0
commit ffacda56ac
Signed by: github
GPG key ID: B5690EEEBB952194
3 changed files with 68 additions and 0 deletions

View file

@ -1846,6 +1846,7 @@ GenTree* Lowering::LowerHWIntrinsic(GenTreeHWIntrinsic* node)
}
else
{
node->ClearUnusedValue();
condSelNode->SetUnusedValue();
}

View file

@ -0,0 +1,59 @@
// Generated by Fuzzlyn v2.2 on 2024-07-30 17:57:54
// Run on Arm64 Windows
// Seed: 1755918021774833910-vectort,vector64,vector128,armsve
// Reduced from 111.7 KiB to 1.0 KiB in 00:00:56
// Hits JIT assert in Release:
// Assertion failed '!IsUnusedValue()' in 'Program:Main(Fuzzlyn.ExecutionServer.IRuntime)' during 'Lowering nodeinfo' (IL size 108; hash 0xade6b36b; FullOpts)
//
// File: C:\dev\dotnet\runtime\src\coreclr\jit\gentree.cpp Line: 18154
//
using System;
using System.Runtime.CompilerServices;
using System.Numerics;
using System.Runtime.Intrinsics;
using System.Runtime.Intrinsics.Arm;
using Xunit;
public class Runtime_105484
{
private static byte[] s_1;
private static byte[,, ] s_2;
private static Vector<uint> s_5;
[MethodImpl(MethodImplOptions.NoInlining)]
private static void M()
{
for (int vr7 = 0; vr7 < 1; vr7++)
{
var vr8 = Vector128.CreateScalar(1U).AsVector();
s_5 = Sve.AndAcross(vr8);
try
{
double vr9 = s_1[0];
}
finally
{
var vr10 = (byte)1;
var vr11 = Vector128.CreateScalar(vr10).AsVector();
var vr12 = s_2[0, 0, 0];
var vr13 = Vector.Create<byte>(0);
var vr14 = Vector.Create<byte>(0);
var vr15 = Sve.CreateMaskForFirstActiveElement(vr13, vr14);
s_1[0] = Sve.ConditionalExtractLastActiveElement(vr11, vr12, vr15);
}
}
}
[Fact]
public static void TestEntryPoint()
{
if (Sve.IsSupported)
{
try
{
M();
}
catch {}
}
}
}

View file

@ -0,0 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Optimize>True</Optimize>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(MSBuildProjectName).cs" />
</ItemGroup>
</Project>