-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Labels
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIin-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is merged
Milestone
Description
Hit by Antigen:
// Found by Antigen
// Reduced from 22.52 KB to 1.95 KB.
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;
public class TestClass
{
public struct S1
{
}
public struct S2
{
public byte byte_1;
}
static Vector64<float> s_v64_float_25 = Vector64.Create(1f);
static Vector128<long> s_v128_long_33 = Vector128<long>.AllBitsSet;
static S1 s_s1_51 = new S1();
static S2 s_s2_52 = new S2();
byte byte_54 = 82;
Vector64<byte> v64_byte_68 = Vector64.CreateScalar((byte)82);
Vector64<int> v64_int_72 = Vector64.Create(1, 1);
Vector64<double> v64_double_77 = Vector64.CreateScalar((double)82);
S2 s2_103 = new S2();
static int s_loopInvariant = 8;
private static List<string> toPrint = new List<string>();
public S2 Method3(S2 p_s2_147, Vector64<byte> p_v64_byte_148, S1 p_s1_149, ref S1 p_s1_150, double p_double_151, float p_float_152, ref byte p_byte_153)
{
unchecked
{
int __loopvar0 = s_loopInvariant;
while (true)
{
if (__loopvar0 == s_loopInvariant + 9)
break;
__loopvar0 += 3;
Vector64.Shuffle(s_v64_float_25 += Vector64.AsSingle(v64_double_77), AdvSimd.ShiftRightLogicalNarrowingLower(s_v128_long_33, s2_103.byte_1) & (v64_int_72 - v64_int_72)* 15*4);
}
return s_s2_52;
}
}
public void Method0()
{
unchecked
{
s_s2_52 = Method3(s2_103, v64_byte_68 -= v64_byte_68, s_s1_51, ref s_s1_51, 15-4, Vector64.Dot(Vector64<float>.AllBitsSet & s_v64_float_25, s_v64_float_25), ref byte_54);
return;
}
}
public static void Main(string[] args)
{
Console.WriteLine(Antigen());
}
public static int Antigen()
{
new TestClass().Method0();
return string.Join(Environment.NewLine, toPrint).GetHashCode();
}
}
/*
Environment:
export DOTNET_TieredPGO_InstrumentedTierAlwaysOptimized=1
export DOTNET_JitRandomOnStackReplacement=15
export DOTNET_HeapVerify=1
export DOTNET_TC_OnStackReplacement=1
export DOTNET_TC_PartialCompilation=1
export DOTNET_TC_QuickJitForLoops=1
export DOTNET_TieredCompilation=0
export DOTNET_TieredPGO=1
export DOTNET_EnableSSE2=0
export DOTNET_JitThrowOnAssertionFailure=1
export DOTNET_LegacyExceptionHandling=1
Release:
856641990
Debug:
Unhandled exception. System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
at System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalNarrowingLower(Vector128`1 value, Byte count)
at TestClass.Method3(S2 p_s2_147, Vector64`1 p_v64_byte_148, S1 p_s1_149, S1& p_s1_150, Double p_double_151, Single p_float_152, Byte& p_byte_153) in /Users/kunalpathak/git/repro/Program.cs:line 42
at TestClass.Method0() in /Users/kunalpathak/git/repro/Program.cs:line 51
at TestClass.Antigen() in /Users/kunalpathak/git/repro/Program.cs:line 61
at TestClass.Main(String[] args) in /Users/kunalpathak/git/repro/Program.cs:line 57
*/
cc @dotnet/jit-contrib
Metadata
Metadata
Assignees
Labels
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIin-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is merged