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: Wrong constant folding with -0.0f/-0.0d #105627

Closed
jakobbotsch opened this issue Jul 29, 2024 · 2 comments · Fixed by #105629
Closed

JIT: Wrong constant folding with -0.0f/-0.0d #105627

jakobbotsch opened this issue Jul 29, 2024 · 2 comments · Fixed by #105629
Assignees
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Milestone

Comments

@jakobbotsch
Copy link
Member

// Run on Arm64 Linux
// Seed: 10489942769529190437-vectort,vector64,vector128,armadvsimd,armadvsimdarm64,armaes,armarmbase,armarmbasearm64,armcrc32,armcrc32arm64,armdp,armrdm,armrdmarm64,armsha1,armsha256
// Reduced from 58.9 KiB to 0.4 KiB in 00:00:28
// Debug: Outputs [9223372036854775808, 9223372036854775808]
// Release: Outputs [0, 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_9;
    public static void Main()
    {
        var vr1 = Vector128.CreateScalar(0d);
        s_9 = AdvSimd.Arm64.Negate(vr1);
        System.Console.WriteLine(s_9.AsUInt64());
    }
}

(DOTNET_TieredCompilation=1 is not enough to repro the debug result, it needs DOTNET_JITMinOpts=1 in this case)

@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 Jul 29, 2024
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Jul 29, 2024
@jakobbotsch jakobbotsch added this to the 9.0.0 milestone Jul 29, 2024
@jakobbotsch jakobbotsch removed the untriaged New issue has not been triaged by the area owner label Jul 29, 2024
@jakobbotsch
Copy link
Member Author

cc @dotnet/jit-contrib

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants