dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.22k stars 4.72k forks source link

JIT: Bad codegen with `AdvSimd.Insert` #106079

Closed jakobbotsch closed 2 months ago

jakobbotsch commented 2 months ago
// Generated by Fuzzlyn v2.2 on 2024-08-06 15:11:52
// Run on Arm64 MacOS
// Seed: 289142602786847481-vectort,vector64,vector128,armadvsimd,armadvsimdarm64,armaes,armarmbase,armarmbasearm64,armcrc32,armcrc32arm64,armdp,armrdm,armrdmarm64,armsha1,armsha256
// Reduced from 87.5 KiB to 0.4 KiB in 00:00:36
// Debug: Outputs <4607182418800017408, 13871573557235963454>
// Release: Outputs <4607182418800017408, 0>
using System;
using System.Runtime.CompilerServices;
using System.Numerics;
using System.Runtime.Intrinsics;
using System.Runtime.Intrinsics.Arm;

public class Program
{
    public static Vector128<double> s_38 = Vector128.Create(0, -567.3319449449843d);
    public static void Main()
    {
        double vr4 = 1;
        s_38 = AdvSimd.Insert(s_38, 0, vr4);
        System.Console.WriteLine(s_38.AsUInt64());
    }
}

cc @dotnet/jit-contrib

dotnet-policy-service[bot] commented 2 months ago

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

JulieLeeMSFT commented 2 months ago

@tannergooding, can you please take a look?

tannergooding commented 2 months ago

Looking.