Skip to content

JIT: Bad codegen with compare + cast #129516

Closed

Description

@jakobbotsch
// Generated by Fuzzlyn v3.3 on 2026-06-14 15:57:03
// Run on X64 Windows
// Seed: 4812586231256454990-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.7 KiB to 0.2 KiB in 00:01:11
// Debug: Outputs 0
// Release: Outputs -1
public class Program
{
    public static sbyte s_2 = -1;
    public static void Main()
    {
        if ((127 < (ushort)s_2))
        {
            var vr1 = s_2++;
        }

        System.Console.WriteLine(s_2);
    }
}

Bisected to 3b91ef7 (cc @tannergooding), looks like @EgorBo is fixing it in #129354 so will assign it to him

Activity

  1. added
    untriaged
    on Jun 17, 2026
  2. added
    area-CodeGen-coreclr
    on Jun 17, 2026
  3. removed
    untriaged
    on Jun 17, 2026
  4. added this to the 11.0.0 milestone on Jun 17, 2026
  5. dotnet-policy-service commented on Jun 17, 2026

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
    See info in area-owners.md if you want to be subscribed.

  6. locked and limited conversation to collaborators on Jul 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area-CodeGen-coreclr

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions