Skip to content

JIT: Missing unsigned check for recent x < 0 optimization #83653

@jakobbotsch

Description

@jakobbotsch
// Generated by Fuzzlyn v1.5 on 2023-03-19 17:44:38
// Run on Arm64 Linux
// Seed: 516098027771570682
// Reduced from 15.1 KiB to 0.3 KiB in 00:00:19
// Debug: Outputs False
// Release: Outputs True
public class C0
{
    public uint F1;
    public C0(uint f1)
    {
        F1 = f1;
    }
}

public class Program
{
    public static void Main()
    {
        var vr1 = new C0(4294967295U);
        bool vr3 = !(vr1.F1 > -1);
        System.Console.WriteLine(vr3);
    }
}

cc @TIHan, caused by #83176. It looks like the optimization in codegen is also missing check for IsUnsigned().

Metadata

Metadata

Assignees

Labels

area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions