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: Potential bad codegen for bit extractions #105466

Closed
jakobbotsch opened this issue Jul 25, 2024 · 1 comment · Fixed by #105508
Closed

JIT: Potential bad codegen for bit extractions #105466

jakobbotsch opened this issue Jul 25, 2024 · 1 comment · Fixed by #105508
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

// Generated by Fuzzlyn v1.7 on 2024-07-25 11:19:02
// Run on X64 Windows
// Seed: 16543153111255778542-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 144.6 KiB to 0.7 KiB in 00:01:20
// Debug: Outputs 0
// Release: Outputs 1
using System;
using System.Runtime.CompilerServices;
using System.Numerics;
using System.Runtime.Intrinsics;
using System.Runtime.Intrinsics.X86;

public class Program
{
    public static ulong s_19;
    public static Vector128<long> s_26;
    public static Vector128<sbyte> s_28;
    public static void Main()
    {
        var vr11 = Vector128.Create<long>(1);
        var vr12 = Sse41.X64.Extract(s_26, (byte)Bmi2.X64.ParallelBitExtract(s_19, M27(1, vr11)));
        System.Console.WriteLine(vr12);
    }

    public static byte M27(sbyte arg3, Vector128<long> arg6)
    {
        var vr4 = Vector128.Create<sbyte>(arg3);
        var vr3 = Sse2.Subtract(vr4, s_28);
        return (byte)Sse2.MoveMask(vr3);
    }
}
@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 25, 2024
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Jul 25, 2024
Copy link
Contributor

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

@EgorBo EgorBo self-assigned this Jul 25, 2024
@jakobbotsch jakobbotsch removed the untriaged New issue has not been triaged by the area owner label Jul 25, 2024
@jakobbotsch jakobbotsch added this to the 9.0.0 milestone Jul 25, 2024
@jakobbotsch jakobbotsch changed the title JIT: Potentiel bad codegen for bit extractions JIT: Potential bad codegen for bit extractions Jul 25, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Aug 25, 2024
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