-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Apply ConstantExpected attribute in runtime repo APIs as needed #63426
Copy link
Copy link
Open
Labels
Milestone
Description
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:
runtime/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Avx2.cs
Lines 2137 to 2162 in 4427c56
| 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)
Reactions are currently unavailable