Skip to content

Apply ConstantExpected attribute in runtime repo APIs as needed #63426

@buyaa-n

Description

@buyaa-n

With #62436 we added a new ConstantExpectedAttribute to express that only constant value is expected for a parameter. Now we need to apply that parameter to the APIs parameters needs it. This issue is for tracking the APIs needs this attribute

As far as I know, we need to add this to the byte count parameter for the following APIs:

public static Vector256<short> ShiftLeftLogical(Vector256<short> value, byte count) => ShiftLeftLogical(value, count);
/// <summary>
/// __m256i _mm256_slli_epi16 (__m256i a, int imm8)
/// VPSLLW ymm, ymm, imm8
/// </summary>
public static Vector256<ushort> ShiftLeftLogical(Vector256<ushort> value, byte count) => ShiftLeftLogical(value, count);
/// <summary>
/// __m256i _mm256_slli_epi32 (__m256i a, int imm8)
/// VPSLLD ymm, ymm, imm8
/// </summary>
public static Vector256<int> ShiftLeftLogical(Vector256<int> value, byte count) => ShiftLeftLogical(value, count);
/// <summary>
/// __m256i _mm256_slli_epi32 (__m256i a, int imm8)
/// VPSLLD ymm, ymm, imm8
/// </summary>
public static Vector256<uint> ShiftLeftLogical(Vector256<uint> value, byte count) => ShiftLeftLogical(value, count);
/// <summary>
/// __m256i _mm256_slli_epi64 (__m256i a, int imm8)
/// VPSLLQ ymm, ymm, imm8
/// </summary>
public static Vector256<long> ShiftLeftLogical(Vector256<long> value, byte count) => ShiftLeftLogical(value, count);
/// <summary>
/// __m256i _mm256_slli_epi64 (__m256i a, int imm8)
/// VPSLLQ ymm, ymm, imm8
/// </summary>
public static Vector256<ulong> ShiftLeftLogical(Vector256<ulong> value, byte count) => ShiftLeftLogical(value, count);

@GrabYourPitchforks @tannergooding please add the other APIs/parameters needs the attribute.

See @stephentoub's comment in #62436 (comment)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions