Skip to content

JIT: Bad result with multiplication and casts #124082

@jakobbotsch

Description

@jakobbotsch
// Generated by Fuzzlyn v3.3 on 2026-02-05 22:00:13
// Run on X64 Windows
// Seed: 3325744140221827777-vectort,vector128,vector256,x86aes,x86avx,x86avx2,x86avx512bw,x86avx512bwvl,x86avx512cd,x86avx512cdvl,x86avx512dq,x86avx512dqvl,x86avx512f,x86avx512fvl,x86avx512fx64,x86bmi1,x86bmi1x64,x86bmi2,x86bmi2x64,x86fma,x86lzcnt,x86lzcntx64,x86pclmulqdq,x86popcnt,x86popcntx64,x86sse,x86ssex64,x86sse2,x86sse2x64,x86sse3,x86sse41,x86sse41x64,x86sse42,x86sse42x64,x86ssse3,x86x86base
// Reduced from 64.4 KiB to 0.3 KiB in 00:01:42
// Debug: Outputs -1
// Release: Outputs 4294967295
public class Program
{
    public static sbyte s_4 = 1;
    public static byte[][] s_12 = new byte[][]
    {
        new byte[]
        {
            1
        }
    };
    public static void Main()
    {
        byte[] vr9 = s_12[0];
        long vr10 = (ushort)s_4 * (sbyte)(-s_4);
        System.Console.WriteLine(vr10);
    }
}

Bisected to #123233, cc @EgorBo

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