Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobbotsch committed Aug 2, 2024
1 parent 61693ad commit a9231ae
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
32 changes: 32 additions & 0 deletions src/tests/JIT/Regression/JitBlue/Runtime_105721/Runtime_105721.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// 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.Runtime.Intrinsics;
using Xunit;

public class Runtime_105721
{
[Fact]
public static void TestEntryPoint()
{
new Runtime_105721().Foo();
}

private short s_21 = -1;
[MethodImpl(MethodImplOptions.NoInlining)]
private void Foo()
{
Vector128<short> v1 = Vector128.CreateScalar<short>(s_21);
Vector128<int> v2 = Vector128.CreateScalar<int>(s_21);
Check(v1, v2);
}

[MethodImpl(MethodImplOptions.NoInlining)]
private void Check(Vector128<short> v1, Vector128<int> v2)
{
Assert.Equal(-1, v1[0]);
Assert.Equal(-1, v2[0]);
}
}
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>

0 comments on commit a9231ae

Please sign in to comment.