-
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.
Arm64: Use TYP_SIMD8 for AddAcross (#108727)
* Use TYP_SIMD8 for AddAcross intrinsics * add test cases * Mark non interesting method private * Remove method params * wrap test code in try-catch
- Loading branch information
1 parent
64b9ece
commit 6fa2f17
Showing
4 changed files
with
69 additions
and
3 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
58 changes: 58 additions & 0 deletions
58
src/tests/JIT/Regression/JitBlue/Runtime_108612/Runtime_108612.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,58 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
// Found by Antigen | ||
// Reduced from 18.05 KB to 1.2 KB. | ||
// JIT assert failed: | ||
// Assertion failed 'm_store->TypeGet() == m_src->TypeGet()' in 'TestClass:Method0():this' during 'Assertion prop' (IL size 91; hash 0x46e9aa75; FullOpts) | ||
// | ||
// File: /Users/runner/work/1/s/src/coreclr/jit/morphblock.cpp Line: 665 | ||
|
||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Runtime.CompilerServices; | ||
using System.Runtime.Intrinsics; | ||
using System.Runtime.Intrinsics.Arm; | ||
using System.Runtime.Intrinsics.X86; | ||
using System.Numerics; | ||
using Xunit; | ||
|
||
public class Runtime_108612 | ||
{ | ||
static Vector128<byte> s_v128_byte_27 = Vector128.CreateScalar((byte)0); | ||
static Vector128<int> s_v128_int_31 = Vector128<int>.Zero; | ||
static Vector128<uint> s_v128_uint_32 = Vector128.CreateScalar((uint)5); | ||
Vector64<byte> v64_byte_67 = Vector64.CreateScalar((byte)5); | ||
Vector128<int> v128_int_81 = Vector128.Create(-1, 6, 2, 1); | ||
private static List<string> toPrint = new List<string>(); | ||
private void Method0() | ||
{ | ||
unchecked | ||
{ | ||
v128_int_81 = AdvSimd.NegateSaturate(s_v128_int_31 *= 15|4); | ||
s_v128_uint_32 = AdvSimd.ShiftRightLogicalRounded(s_v128_uint_32, Vector128.Sum(s_v128_byte_27 | s_v128_byte_27)); | ||
v64_byte_67 = AdvSimd.Arm64.AddAcross(s_v128_byte_27 | s_v128_byte_27); | ||
return; | ||
} | ||
} | ||
|
||
[Fact] | ||
public static void TestEntryPoint() | ||
{ | ||
if (AdvSimd.IsSupported) | ||
{ | ||
Antigen(); | ||
} | ||
} | ||
|
||
private static int Antigen() | ||
{ | ||
try | ||
{ | ||
new Runtime_108612().Method0(); | ||
} | ||
catch (Exception e) { } | ||
return string.Join(Environment.NewLine, toPrint).GetHashCode(); | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
src/tests/JIT/Regression/JitBlue/Runtime_108612/Runtime_108612.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> |