Skip to content

Commit

Permalink
Fix test exclusion for Runtime_91209 (dotnet#92613)
Browse files Browse the repository at this point in the history
Checking `AdvSimd.IsSupported` dynamically makes the test work for
the `DOTNET_EnableHWIntrinsic=0` case.
  • Loading branch information
BruceForstall authored Sep 26, 2023
1 parent 500d0ac commit aec0684
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
24 changes: 24 additions & 0 deletions src/tests/JIT/Regression/JitBlue/Runtime_91209/Runtime_91209.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ private static Vector64<int> Problem1()
public static int Test1()
{
Console.WriteLine("Test1");

if (!AdvSimd.IsSupported)
{
return 100;
}

Vector64<int> r1 = Problem1();
return (r1.GetElement(0) + r1.GetElement(1)) == 84 ? 100 : 101;
}
Expand All @@ -56,6 +62,12 @@ private static Vector64<sbyte> Problem2()
public static int Test2()
{
Console.WriteLine("Test2");

if (!AdvSimd.IsSupported)
{
return 100;
}

Vector64<sbyte> r1 = Problem2();
return (r1.GetElement(0) + r1.GetElement(1)) == 12 ? 100 : 101;
}
Expand All @@ -80,6 +92,12 @@ private static Vector64<byte> Problem3()
public static int Test3()
{
Console.WriteLine("Test3");

if (!AdvSimd.IsSupported)
{
return 100;
}

Vector64<byte> r1 = Problem3();
return r1.GetElement(2) == 7 ? 100 : 101;
}
Expand All @@ -103,6 +121,12 @@ private static Vector64<byte> Problem4()
public static int Test4()
{
Console.WriteLine("Test4");

if (!AdvSimd.IsSupported)
{
return 100;
}

Vector64<byte> r1 = Problem4();
return r1.GetElement(7) == 7 ? 100 : 101;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Optimize>True</Optimize>
<!-- Needed for CLRTestTargetUnsupported -->
<RequiresProcessIsolation>true</RequiresProcessIsolation>
<CLRTestTargetUnsupported Condition="('$(TargetArchitecture)' != 'arm64') OR ('$(RuntimeFlavor)' != 'coreclr')">true</CLRTestTargetUnsupported>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(MSBuildProjectName).cs" />
Expand Down

0 comments on commit aec0684

Please sign in to comment.