Skip to content

JIT: Bad result with vector argument #113488

@jakobbotsch

Description

@jakobbotsch
// Generated by Fuzzlyn v2.5 on 2025-03-13 04:54:06
// Run on X64 Linux
// Seed: 15128240988293741626-vectort,vector128,vector256,x86aes,x86avx,x86avx2,x86bmi1,x86bmi1x64,x86bmi2,x86bmi2x64,x86fma,x86lzcnt,x86lzcntx64,x86pclmulqdq,x86popcnt,x86popcntx64,x86sse,x86ssex64,x86sse2,x86sse2x64,x86sse3,x86sse41,x86sse41x64,x86sse42,x86sse42x64,x86ssse3,x86x86base
// Reduced from 188.7 KiB to 0.8 KiB in 00:01:09
// Debug: Outputs 0
// Release: Outputs 1
using System;
using System.Numerics;
using System.Runtime.Intrinsics;
using System.Runtime.Intrinsics.X86;

public struct S0
{
    public uint F0;
    public ushort M7()
    {
        this.F0 = 1;
        Program.s_rt.WriteLine(this.F0);
        return 0;
    }
}

public class Program
{
    public static IRuntime s_rt;
    public static void Main()
    {
        s_rt = new Runtime();
        S0 vr0 = default(S0);
        M4(vr0, Vector256.Create<ushort>(vr0.M7()));
    }

    public static void M4(S0 arg0, Vector256<ushort> arg1)
    {
        s_rt.WriteLine(arg0.F0);
    }
}

public interface IRuntime
{
    void WriteLine<T>(T value);
}

public class Runtime : IRuntime
{
    public void WriteLine<T>(T value) => System.Console.WriteLine(value);
}

Bisected to #112612

cc @dotnet/jit-contrib

Metadata

Metadata

Assignees

Labels

area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIin-prThere is an active PR which will close this issue when it is merged

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions