Skip to content

JIT difference in debug/release output #126580

@dhartglassMSFT

Description

@dhartglassMSFT

SBC reduced from Antigen-generated code

Prints int_70=-1 on Debug configurations, prints int_70=-4194304 on Release.

The Method16 call is needed for the reproduction, if that's commented out then Dbg/Rel agree

using System.Numerics;
public class TestClass
{
    public struct S2 { }
    Vector<float> v_float_117 = Vector<float>.AllBitsSet;
    public void Method16(out S2 p_s2_567, Vector<float> p_v_float_568)
    {
            p_s2_567 = default;
    }
    public void Method0()
    {
            v_float_117 += Vector.Create(float.NaN);
            Method16(out _, Vector.Create(float.NaN));
            int int_70 = Vector.GetElement(Vector.AsVectorInt32(v_float_117), 0);
            Log("int_70", int_70);
    }
    public static int Main(string[] args) { new TestClass().Method0(); return 0; }
    public static void Log(string n, object v) { System.Console.WriteLine($"{n}={v}"); }
}

/*
Environment:
set DOTNET_TieredCompilation=0
*/

Metadata

Metadata

Labels

area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIuntriagedNew issue has not been triaged by the area owner

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions