Skip to content

JIT SVE: Bad codegen with TestFirstTrue #106871

@jakobbotsch

Description

@jakobbotsch
// Generated by Fuzzlyn v2.3 on 2024-08-23 10:47:43
// Run on Arm64 Windows
// Seed: 6363239363759785984-vectort,vector64,vector128,armsve
// Reduced from 29.6 KiB to 0.8 KiB in 00:00:27
// Debug: Prints 0 line(s)
// Release: Prints 1 line(s)
using System;
using System.Numerics;
using System.Runtime.Intrinsics;
using System.Runtime.Intrinsics.Arm;

public class Program
{
    public static void Main()
    {
        var vr11 = (byte)1;
        var vr12 = Vector128.CreateScalar(vr11).AsVector();
        var vr13 = Vector.Create<double>(1);
        var vr14 = Vector.Create<double>(1);
        var vr15 = (byte)Sve.ConditionalExtractAfterLastActiveElement(vr13, 0, vr14);
        var vr16 = Vector128.CreateScalar(vr15).AsVector();
        var vr17 = Vector.Create<byte>(0);
        var vr18 = (byte)1;
        var vr19 = Vector128.CreateScalar(vr18).AsVector();
        var vr20 = Sve.MinAcross(vr19);
        var vr21 = Sve.ConditionalSelect(vr16, vr20, vr17);
        if (Sve.TestFirstTrue(vr12, vr21))
        {
            System.Console.WriteLine(0);
        }
    }
}

cc @dotnet/arm64-contrib @dotnet/jit-contrib

Metadata

Metadata

Labels

Priority:2Work that is important, but not critical for the releasearea-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIarm-sveWork related to arm64 SVE/SVE2 supportin-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