Skip to content

Commit aec0684

Browse files
Fix test exclusion for Runtime_91209 (#92613)
Checking `AdvSimd.IsSupported` dynamically makes the test work for the `DOTNET_EnableHWIntrinsic=0` case.
1 parent 500d0ac commit aec0684

File tree

2 files changed

+24
-3
lines changed

2 files changed

+24
-3
lines changed

src/tests/JIT/Regression/JitBlue/Runtime_91209/Runtime_91209.cs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ private static Vector64<int> Problem1()
3333
public static int Test1()
3434
{
3535
Console.WriteLine("Test1");
36+
37+
if (!AdvSimd.IsSupported)
38+
{
39+
return 100;
40+
}
41+
3642
Vector64<int> r1 = Problem1();
3743
return (r1.GetElement(0) + r1.GetElement(1)) == 84 ? 100 : 101;
3844
}
@@ -56,6 +62,12 @@ private static Vector64<sbyte> Problem2()
5662
public static int Test2()
5763
{
5864
Console.WriteLine("Test2");
65+
66+
if (!AdvSimd.IsSupported)
67+
{
68+
return 100;
69+
}
70+
5971
Vector64<sbyte> r1 = Problem2();
6072
return (r1.GetElement(0) + r1.GetElement(1)) == 12 ? 100 : 101;
6173
}
@@ -80,6 +92,12 @@ private static Vector64<byte> Problem3()
8092
public static int Test3()
8193
{
8294
Console.WriteLine("Test3");
95+
96+
if (!AdvSimd.IsSupported)
97+
{
98+
return 100;
99+
}
100+
83101
Vector64<byte> r1 = Problem3();
84102
return r1.GetElement(2) == 7 ? 100 : 101;
85103
}
@@ -103,6 +121,12 @@ private static Vector64<byte> Problem4()
103121
public static int Test4()
104122
{
105123
Console.WriteLine("Test4");
124+
125+
if (!AdvSimd.IsSupported)
126+
{
127+
return 100;
128+
}
129+
106130
Vector64<byte> r1 = Problem4();
107131
return r1.GetElement(7) == 7 ? 100 : 101;
108132
}

src/tests/JIT/Regression/JitBlue/Runtime_91209/Runtime_91209.csproj

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<Optimize>True</Optimize>
4-
<!-- Needed for CLRTestTargetUnsupported -->
5-
<RequiresProcessIsolation>true</RequiresProcessIsolation>
6-
<CLRTestTargetUnsupported Condition="('$(TargetArchitecture)' != 'arm64') OR ('$(RuntimeFlavor)' != 'coreclr')">true</CLRTestTargetUnsupported>
74
</PropertyGroup>
85
<ItemGroup>
96
<Compile Include="$(MSBuildProjectName).cs" />

0 commit comments

Comments
 (0)