Skip to content

[JIT] X64/ARM64 - Incorrect optimization prints 35514 instead of 28876 #85382

Description

@TIHan
// Generated by Fuzzlyn v1.5 on 2023-04-26 02:07:41
// Run on Arm64 MacOS
// Seed: 4341704563799292540
// Reduced from 104.8 KiB to 0.5 KiB in 00:00:34
// Debug: Outputs 28876
// Release: Outputs 35514
public class Program
{
    public static long s_15;
    public static sbyte s_17;
    public static ushort s_21 = 36659;
    public static void Main()
    {
        s_15 = ~1;
        bool vr1 = M40(0);
    }

    public static bool M40(ushort arg0)
    {
        for (int var0 = 0; var0 < 2; var0++)
        {
            arg0 = 65535;
            arg0 &= (ushort)(s_15++ >> s_17);
            arg0 %= s_21;
        }

        System.Console.WriteLine(arg0);
        return false;
    }
}

Reproduces on Windows ARM64 and X64.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions