Skip to content

Arm64 SVE: Error when ConditionalSelect has all constant arguments #116847

@a74nh

Description

@a74nh
    static Vector<int> ConditionalSelect1CC()
    {
        return Sve.ConditionalSelect(
            Sve.CreateTrueMaskInt32(SveMaskPattern.VectorCount1),
            Vector.Create<int>(3),
            Vector.Create<int>(4)
        );
    }
Assert failure(PID 1207671 [0x00126d77], Thread: 1207671 [0x126d77]): Assertion failed 'OperIs(GT_CNS_VEC)' in 'ConditionalSelectConstants:ConditionalSelect1CC():System.Numerics.Vector`1[int]' during 'Morph - Global' (IL size 24; hash 0x36e039d8; FullOpts)

    File: /mnt/sdb/home/alahay01/dotnet/runtime_sve/src/coreclr/jit/gtstructs.h:64
    Image: /mnt/sdb/home/alahay01/dotnet/runtime_sve/artifacts/tests/coreclr/linux.arm64.Checked/Tests/Core_Root/corerun

This is because since #115566 the mask in arg is imported as a constant mask. This now triggers the constant folding in gtFoldExprHWIntrinsic().

Metadata

Metadata

Assignees

Labels

area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIin-prThere is an active PR which will close this issue when it is merged

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions