Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JIT: Bad result with vector argument #113488

Closed
jakobbotsch opened this issue Mar 13, 2025 · 1 comment · Fixed by #113496
Closed

JIT: Bad result with vector argument #113488

jakobbotsch opened this issue Mar 13, 2025 · 1 comment · Fixed by #113496
Assignees
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI in-pr There is an active PR which will close this issue when it is merged
Milestone

Comments

@jakobbotsch
Copy link
Member

// 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

@jakobbotsch jakobbotsch self-assigned this Mar 13, 2025
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Mar 13, 2025
@jakobbotsch jakobbotsch added this to the 10.0.0 milestone Mar 13, 2025
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI in-pr There is an active PR which will close this issue when it is merged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant