From 592346117ca70e579ccf8eca6e95862112f1f4cc Mon Sep 17 00:00:00 2001 From: "Aman Khalid (from Dev Box)" Date: Mon, 24 Jun 2024 17:36:22 -0400 Subject: [PATCH 01/11] Wip --- src/coreclr/jit/hwintrinsiccodegenarm64.cpp | 5 + src/coreclr/jit/hwintrinsiclistarm64sve.h | 1 + .../Arm/Sve.PlatformNotSupported.cs | 328 ++++++++++++++++++ .../src/System/Runtime/Intrinsics/Arm/Sve.cs | 328 ++++++++++++++++++ .../ref/System.Runtime.Intrinsics.cs | 33 ++ .../GenerateHWIntrinsicTests_Arm.cs | 25 ++ .../HardwareIntrinsics/Arm/Shared/Helpers.cs | 28 ++ 7 files changed, 748 insertions(+) diff --git a/src/coreclr/jit/hwintrinsiccodegenarm64.cpp b/src/coreclr/jit/hwintrinsiccodegenarm64.cpp index 561ffb818b04b0..85a3e49bcfdec5 100644 --- a/src/coreclr/jit/hwintrinsiccodegenarm64.cpp +++ b/src/coreclr/jit/hwintrinsiccodegenarm64.cpp @@ -2112,6 +2112,11 @@ void CodeGen::genHWIntrinsic(GenTreeHWIntrinsic* node) break; } + case NI_Sve_ShiftLeftLogical: + // case NI_Sve_ShiftRightLogical: + GetEmitter()->emitInsSve_R_R_R(ins, EA_SCALABLE, targetReg, op1Reg, op2Reg, opt); + break; + default: unreached(); } diff --git a/src/coreclr/jit/hwintrinsiclistarm64sve.h b/src/coreclr/jit/hwintrinsiclistarm64sve.h index e9e04a8a8fb32b..0e44a456d6176c 100644 --- a/src/coreclr/jit/hwintrinsiclistarm64sve.h +++ b/src/coreclr/jit/hwintrinsiclistarm64sve.h @@ -193,6 +193,7 @@ HARDWARE_INTRINSIC(Sve, SaturatingIncrementBy32BitElementCount, HARDWARE_INTRINSIC(Sve, SaturatingIncrementBy64BitElementCount, -1, 3, true, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sve_sqincd, INS_sve_uqincd, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Scalable|HW_Flag_HasImmediateOperand|HW_Flag_HasEnumOperand|HW_Flag_SpecialCodeGen|HW_Flag_HasScalarInputVariant|HW_Flag_SpecialImport|HW_Flag_HasRMWSemantics) HARDWARE_INTRINSIC(Sve, SaturatingIncrementBy8BitElementCount, 0, 3, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sve_sqincb, INS_sve_uqincb, INS_sve_sqincb, INS_sve_uqincb, INS_invalid, INS_invalid}, HW_Category_Scalar, HW_Flag_Scalable|HW_Flag_HasImmediateOperand|HW_Flag_HasEnumOperand|HW_Flag_SpecialCodeGen|HW_Flag_SpecialImport|HW_Flag_HasRMWSemantics) HARDWARE_INTRINSIC(Sve, SaturatingIncrementByActiveElementCount, -1, 2, true, {INS_invalid, INS_sve_sqincp, INS_sve_sqincp, INS_sve_sqincp, INS_sve_sqincp, INS_sve_sqincp, INS_sve_sqincp, INS_sve_sqincp, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Scalable|HW_Flag_SpecialCodeGen|HW_Flag_SpecialImport|HW_Flag_BaseTypeFromSecondArg|HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(Sve, ShiftLeftLogical, -1, -1, false, {INS_sve_lsl, INS_sve_lsl, INS_sve_lsl, INS_sve_lsl, INS_sve_lsl, INS_sve_lsl, INS_sve_lsl, INS_sve_lsl, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Scalable|HW_Flag_BaseTypeFromFirstArg|HW_Flag_SpecialCodeGen|HW_Flag_OptionalEmbeddedMaskedOperation|HW_Flag_LowMaskedOperation) HARDWARE_INTRINSIC(Sve, SignExtend16, -1, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sve_sxth, INS_invalid, INS_sve_sxth, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Scalable|HW_Flag_EmbeddedMaskedOperation|HW_Flag_LowMaskedOperation) HARDWARE_INTRINSIC(Sve, SignExtend32, -1, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sve_sxtw, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Scalable|HW_Flag_EmbeddedMaskedOperation|HW_Flag_LowMaskedOperation) HARDWARE_INTRINSIC(Sve, SignExtend8, -1, -1, false, {INS_invalid, INS_invalid, INS_sve_sxtb, INS_invalid, INS_sve_sxtb, INS_invalid, INS_sve_sxtb, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Scalable|HW_Flag_EmbeddedMaskedOperation|HW_Flag_LowMaskedOperation) diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve.PlatformNotSupported.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve.PlatformNotSupported.cs index 3d97bcdfc3e98a..a9c7e11ce2eebd 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve.PlatformNotSupported.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve.PlatformNotSupported.cs @@ -5394,6 +5394,334 @@ internal Arm64() { } public static unsafe Vector SaturatingIncrementByActiveElementCount(Vector value, Vector from) { throw new PlatformNotSupportedException(); } + /// Logical shift left + + /// + /// svuint8_t svlsl[_u8]_m(svbool_t pg, svuint8_t op1, svuint8_t op2) + /// LSL Ztied1.B, Pg/M, Ztied1.B, Zop2.B + /// svuint8_t svlsl[_u8]_x(svbool_t pg, svuint8_t op1, svuint8_t op2) + /// LSL Ztied1.B, Pg/M, Ztied1.B, Zop2.B + /// LSLR Ztied2.B, Pg/M, Ztied2.B, Zop1.B + /// svuint8_t svlsl[_u8]_z(svbool_t pg, svuint8_t op1, svuint8_t op2) + /// + public static unsafe Vector ShiftLeftLogical(Vector left, Vector right) { throw new PlatformNotSupportedException(); } + + /// + /// svuint8_t svlsl_wide[_u8]_m(svbool_t pg, svuint8_t op1, svuint64_t op2) + /// LSL Ztied1.B, Pg/M, Ztied1.B, Zop2.D + /// svuint8_t svlsl_wide[_u8]_x(svbool_t pg, svuint8_t op1, svuint64_t op2) + /// LSL Ztied1.B, Pg/M, Ztied1.B, Zop2.D + /// LSL Zresult.B, Zop1.B, Zop2.D + /// svuint8_t svlsl_wide[_u8]_z(svbool_t pg, svuint8_t op1, svuint64_t op2) + /// + public static unsafe Vector ShiftLeftLogical(Vector left, Vector right) { throw new PlatformNotSupportedException(); } + + /// + /// svint16_t svlsl[_s16]_m(svbool_t pg, svint16_t op1, svuint16_t op2) + /// LSL Ztied1.H, Pg/M, Ztied1.H, Zop2.H + /// svint16_t svlsl[_s16]_x(svbool_t pg, svint16_t op1, svuint16_t op2) + /// LSL Ztied1.H, Pg/M, Ztied1.H, Zop2.H + /// LSLR Ztied2.H, Pg/M, Ztied2.H, Zop1.H + /// svint16_t svlsl[_s16]_z(svbool_t pg, svint16_t op1, svuint16_t op2) + /// + public static unsafe Vector ShiftLeftLogical(Vector left, Vector right) { throw new PlatformNotSupportedException(); } + + /// + /// svint16_t svlsl_wide[_s16]_m(svbool_t pg, svint16_t op1, svuint64_t op2) + /// LSL Ztied1.H, Pg/M, Ztied1.H, Zop2.D + /// svint16_t svlsl_wide[_s16]_x(svbool_t pg, svint16_t op1, svuint64_t op2) + /// LSL Ztied1.H, Pg/M, Ztied1.H, Zop2.D + /// LSL Zresult.H, Zop1.H, Zop2.D + /// svint16_t svlsl_wide[_s16]_z(svbool_t pg, svint16_t op1, svuint64_t op2) + /// + public static unsafe Vector ShiftLeftLogical(Vector left, Vector right) { throw new PlatformNotSupportedException(); } + + /// + /// svint32_t svlsl[_s32]_m(svbool_t pg, svint32_t op1, svuint32_t op2) + /// LSL Ztied1.S, Pg/M, Ztied1.S, Zop2.S + /// svint32_t svlsl[_s32]_x(svbool_t pg, svint32_t op1, svuint32_t op2) + /// LSL Ztied1.S, Pg/M, Ztied1.S, Zop2.S + /// LSLR Ztied2.S, Pg/M, Ztied2.S, Zop1.S + /// svint32_t svlsl[_s32]_z(svbool_t pg, svint32_t op1, svuint32_t op2) + /// + public static unsafe Vector ShiftLeftLogical(Vector left, Vector right) { throw new PlatformNotSupportedException(); } + + /// + /// svint32_t svlsl_wide[_s32]_m(svbool_t pg, svint32_t op1, svuint64_t op2) + /// LSL Ztied1.S, Pg/M, Ztied1.S, Zop2.D + /// svint32_t svlsl_wide[_s32]_x(svbool_t pg, svint32_t op1, svuint64_t op2) + /// LSL Ztied1.S, Pg/M, Ztied1.S, Zop2.D + /// LSL Zresult.S, Zop1.S, Zop2.D + /// svint32_t svlsl_wide[_s32]_z(svbool_t pg, svint32_t op1, svuint64_t op2) + /// + public static unsafe Vector ShiftLeftLogical(Vector left, Vector right) { throw new PlatformNotSupportedException(); } + + /// + /// svint64_t svlsl[_s64]_m(svbool_t pg, svint64_t op1, svuint64_t op2) + /// LSL Ztied1.D, Pg/M, Ztied1.D, Zop2.D + /// svint64_t svlsl[_s64]_x(svbool_t pg, svint64_t op1, svuint64_t op2) + /// LSL Ztied1.D, Pg/M, Ztied1.D, Zop2.D + /// LSLR Ztied2.D, Pg/M, Ztied2.D, Zop1.D + /// svint64_t svlsl[_s64]_z(svbool_t pg, svint64_t op1, svuint64_t op2) + /// + public static unsafe Vector ShiftLeftLogical(Vector left, Vector right) { throw new PlatformNotSupportedException(); } + + /// + /// svint8_t svlsl[_s8]_m(svbool_t pg, svint8_t op1, svuint8_t op2) + /// LSL Ztied1.B, Pg/M, Ztied1.B, Zop2.B + /// svint8_t svlsl[_s8]_x(svbool_t pg, svint8_t op1, svuint8_t op2) + /// LSL Ztied1.B, Pg/M, Ztied1.B, Zop2.B + /// LSLR Ztied2.B, Pg/M, Ztied2.B, Zop1.B + /// svint8_t svlsl[_s8]_z(svbool_t pg, svint8_t op1, svuint8_t op2) + /// + public static unsafe Vector ShiftLeftLogical(Vector left, Vector right) { throw new PlatformNotSupportedException(); } + + /// + /// svint8_t svlsl_wide[_s8]_m(svbool_t pg, svint8_t op1, svuint64_t op2) + /// LSL Ztied1.B, Pg/M, Ztied1.B, Zop2.D + /// svint8_t svlsl_wide[_s8]_x(svbool_t pg, svint8_t op1, svuint64_t op2) + /// LSL Ztied1.B, Pg/M, Ztied1.B, Zop2.D + /// LSL Zresult.B, Zop1.B, Zop2.D + /// svint8_t svlsl_wide[_s8]_z(svbool_t pg, svint8_t op1, svuint64_t op2) + /// + public static unsafe Vector ShiftLeftLogical(Vector left, Vector right) { throw new PlatformNotSupportedException(); } + + /// + /// svuint16_t svlsl[_u16]_m(svbool_t pg, svuint16_t op1, svuint16_t op2) + /// LSL Ztied1.H, Pg/M, Ztied1.H, Zop2.H + /// svuint16_t svlsl[_u16]_x(svbool_t pg, svuint16_t op1, svuint16_t op2) + /// LSL Ztied1.H, Pg/M, Ztied1.H, Zop2.H + /// LSLR Ztied2.H, Pg/M, Ztied2.H, Zop1.H + /// svuint16_t svlsl[_u16]_z(svbool_t pg, svuint16_t op1, svuint16_t op2) + /// + public static unsafe Vector ShiftLeftLogical(Vector left, Vector right) { throw new PlatformNotSupportedException(); } + + /// + /// svuint16_t svlsl_wide[_u16]_m(svbool_t pg, svuint16_t op1, svuint64_t op2) + /// LSL Ztied1.H, Pg/M, Ztied1.H, Zop2.D + /// svuint16_t svlsl_wide[_u16]_x(svbool_t pg, svuint16_t op1, svuint64_t op2) + /// LSL Ztied1.H, Pg/M, Ztied1.H, Zop2.D + /// LSL Zresult.H, Zop1.H, Zop2.D + /// svuint16_t svlsl_wide[_u16]_z(svbool_t pg, svuint16_t op1, svuint64_t op2) + /// + public static unsafe Vector ShiftLeftLogical(Vector left, Vector right) { throw new PlatformNotSupportedException(); } + + /// + /// svuint32_t svlsl[_u32]_m(svbool_t pg, svuint32_t op1, svuint32_t op2) + /// LSL Ztied1.S, Pg/M, Ztied1.S, Zop2.S + /// svuint32_t svlsl[_u32]_x(svbool_t pg, svuint32_t op1, svuint32_t op2) + /// LSL Ztied1.S, Pg/M, Ztied1.S, Zop2.S + /// LSLR Ztied2.S, Pg/M, Ztied2.S, Zop1.S + /// svuint32_t svlsl[_u32]_z(svbool_t pg, svuint32_t op1, svuint32_t op2) + /// + public static unsafe Vector ShiftLeftLogical(Vector left, Vector right) { throw new PlatformNotSupportedException(); } + + /// + /// svuint32_t svlsl_wide[_u32]_m(svbool_t pg, svuint32_t op1, svuint64_t op2) + /// LSL Ztied1.S, Pg/M, Ztied1.S, Zop2.D + /// svuint32_t svlsl_wide[_u32]_x(svbool_t pg, svuint32_t op1, svuint64_t op2) + /// LSL Ztied1.S, Pg/M, Ztied1.S, Zop2.D + /// LSL Zresult.S, Zop1.S, Zop2.D + /// svuint32_t svlsl_wide[_u32]_z(svbool_t pg, svuint32_t op1, svuint64_t op2) + /// + public static unsafe Vector ShiftLeftLogical(Vector left, Vector right) { throw new PlatformNotSupportedException(); } + + /// + /// svuint64_t svlsl[_u64]_m(svbool_t pg, svuint64_t op1, svuint64_t op2) + /// LSL Ztied1.D, Pg/M, Ztied1.D, Zop2.D + /// svuint64_t svlsl[_u64]_x(svbool_t pg, svuint64_t op1, svuint64_t op2) + /// LSL Ztied1.D, Pg/M, Ztied1.D, Zop2.D + /// LSLR Ztied2.D, Pg/M, Ztied2.D, Zop1.D + /// svuint64_t svlsl[_u64]_z(svbool_t pg, svuint64_t op1, svuint64_t op2) + /// + public static unsafe Vector ShiftLeftLogical(Vector left, Vector right) { throw new PlatformNotSupportedException(); } + + + /// Arithmetic shift right + + /// + /// svint16_t svasr[_s16]_m(svbool_t pg, svint16_t op1, svuint16_t op2) + /// ASR Ztied1.H, Pg/M, Ztied1.H, Zop2.H + /// svint16_t svasr[_s16]_x(svbool_t pg, svint16_t op1, svuint16_t op2) + /// ASR Ztied1.H, Pg/M, Ztied1.H, Zop2.H + /// ASRR Ztied2.H, Pg/M, Ztied2.H, Zop1.H + /// svint16_t svasr[_s16]_z(svbool_t pg, svint16_t op1, svuint16_t op2) + /// + public static unsafe Vector ShiftRightArithmetic(Vector left, Vector right) { throw new PlatformNotSupportedException(); } + + /// + /// svint16_t svasr_wide[_s16]_m(svbool_t pg, svint16_t op1, svuint64_t op2) + /// ASR Ztied1.H, Pg/M, Ztied1.H, Zop2.D + /// svint16_t svasr_wide[_s16]_x(svbool_t pg, svint16_t op1, svuint64_t op2) + /// ASR Ztied1.H, Pg/M, Ztied1.H, Zop2.D + /// ASR Zresult.H, Zop1.H, Zop2.D + /// svint16_t svasr_wide[_s16]_z(svbool_t pg, svint16_t op1, svuint64_t op2) + /// + public static unsafe Vector ShiftRightArithmetic(Vector left, Vector right) { throw new PlatformNotSupportedException(); } + + /// + /// svint32_t svasr[_s32]_m(svbool_t pg, svint32_t op1, svuint32_t op2) + /// ASR Ztied1.S, Pg/M, Ztied1.S, Zop2.S + /// svint32_t svasr[_s32]_x(svbool_t pg, svint32_t op1, svuint32_t op2) + /// ASR Ztied1.S, Pg/M, Ztied1.S, Zop2.S + /// ASRR Ztied2.S, Pg/M, Ztied2.S, Zop1.S + /// svint32_t svasr[_s32]_z(svbool_t pg, svint32_t op1, svuint32_t op2) + /// + public static unsafe Vector ShiftRightArithmetic(Vector left, Vector right) { throw new PlatformNotSupportedException(); } + + /// + /// svint32_t svasr_wide[_s32]_m(svbool_t pg, svint32_t op1, svuint64_t op2) + /// ASR Ztied1.S, Pg/M, Ztied1.S, Zop2.D + /// svint32_t svasr_wide[_s32]_x(svbool_t pg, svint32_t op1, svuint64_t op2) + /// ASR Ztied1.S, Pg/M, Ztied1.S, Zop2.D + /// ASR Zresult.S, Zop1.S, Zop2.D + /// svint32_t svasr_wide[_s32]_z(svbool_t pg, svint32_t op1, svuint64_t op2) + /// + public static unsafe Vector ShiftRightArithmetic(Vector left, Vector right) { throw new PlatformNotSupportedException(); } + + /// + /// svint64_t svasr[_s64]_m(svbool_t pg, svint64_t op1, svuint64_t op2) + /// ASR Ztied1.D, Pg/M, Ztied1.D, Zop2.D + /// svint64_t svasr[_s64]_x(svbool_t pg, svint64_t op1, svuint64_t op2) + /// ASR Ztied1.D, Pg/M, Ztied1.D, Zop2.D + /// ASRR Ztied2.D, Pg/M, Ztied2.D, Zop1.D + /// svint64_t svasr[_s64]_z(svbool_t pg, svint64_t op1, svuint64_t op2) + /// + public static unsafe Vector ShiftRightArithmetic(Vector left, Vector right) { throw new PlatformNotSupportedException(); } + + /// + /// svint8_t svasr[_s8]_m(svbool_t pg, svint8_t op1, svuint8_t op2) + /// ASR Ztied1.B, Pg/M, Ztied1.B, Zop2.B + /// svint8_t svasr[_s8]_x(svbool_t pg, svint8_t op1, svuint8_t op2) + /// ASR Ztied1.B, Pg/M, Ztied1.B, Zop2.B + /// ASRR Ztied2.B, Pg/M, Ztied2.B, Zop1.B + /// svint8_t svasr[_s8]_z(svbool_t pg, svint8_t op1, svuint8_t op2) + /// + public static unsafe Vector ShiftRightArithmetic(Vector left, Vector right) { throw new PlatformNotSupportedException(); } + + /// + /// svint8_t svasr_wide[_s8]_m(svbool_t pg, svint8_t op1, svuint64_t op2) + /// ASR Ztied1.B, Pg/M, Ztied1.B, Zop2.D + /// svint8_t svasr_wide[_s8]_x(svbool_t pg, svint8_t op1, svuint64_t op2) + /// ASR Ztied1.B, Pg/M, Ztied1.B, Zop2.D + /// ASR Zresult.B, Zop1.B, Zop2.D + /// svint8_t svasr_wide[_s8]_z(svbool_t pg, svint8_t op1, svuint64_t op2) + /// + public static unsafe Vector ShiftRightArithmetic(Vector left, Vector right) { throw new PlatformNotSupportedException(); } + + + /// Arithmetic shift right for divide by immediate + + /// + /// svint16_t svasrd[_n_s16]_m(svbool_t pg, svint16_t op1, uint64_t imm2) + /// ASRD Ztied1.H, Pg/M, Ztied1.H, #imm2 + /// svint16_t svasrd[_n_s16]_x(svbool_t pg, svint16_t op1, uint64_t imm2) + /// ASRD Ztied1.H, Pg/M, Ztied1.H, #imm2 + /// svint16_t svasrd[_n_s16]_z(svbool_t pg, svint16_t op1, uint64_t imm2) + /// + public static unsafe Vector ShiftRightArithmeticForDivide(Vector value, [ConstantExpected] byte control) { throw new PlatformNotSupportedException(); } + + /// + /// svint32_t svasrd[_n_s32]_m(svbool_t pg, svint32_t op1, uint64_t imm2) + /// ASRD Ztied1.S, Pg/M, Ztied1.S, #imm2 + /// svint32_t svasrd[_n_s32]_x(svbool_t pg, svint32_t op1, uint64_t imm2) + /// ASRD Ztied1.S, Pg/M, Ztied1.S, #imm2 + /// svint32_t svasrd[_n_s32]_z(svbool_t pg, svint32_t op1, uint64_t imm2) + /// + public static unsafe Vector ShiftRightArithmeticForDivide(Vector value, [ConstantExpected] byte control) { throw new PlatformNotSupportedException(); } + + /// + /// svint64_t svasrd[_n_s64]_m(svbool_t pg, svint64_t op1, uint64_t imm2) + /// ASRD Ztied1.D, Pg/M, Ztied1.D, #imm2 + /// svint64_t svasrd[_n_s64]_x(svbool_t pg, svint64_t op1, uint64_t imm2) + /// ASRD Ztied1.D, Pg/M, Ztied1.D, #imm2 + /// svint64_t svasrd[_n_s64]_z(svbool_t pg, svint64_t op1, uint64_t imm2) + /// + public static unsafe Vector ShiftRightArithmeticForDivide(Vector value, [ConstantExpected] byte control) { throw new PlatformNotSupportedException(); } + + /// + /// svint8_t svasrd[_n_s8]_m(svbool_t pg, svint8_t op1, uint64_t imm2) + /// ASRD Ztied1.B, Pg/M, Ztied1.B, #imm2 + /// svint8_t svasrd[_n_s8]_x(svbool_t pg, svint8_t op1, uint64_t imm2) + /// ASRD Ztied1.B, Pg/M, Ztied1.B, #imm2 + /// svint8_t svasrd[_n_s8]_z(svbool_t pg, svint8_t op1, uint64_t imm2) + /// + public static unsafe Vector ShiftRightArithmeticForDivide(Vector value, [ConstantExpected] byte control) { throw new PlatformNotSupportedException(); } + + + /// Logical shift right + + /// + /// svuint8_t svlsr[_u8]_m(svbool_t pg, svuint8_t op1, svuint8_t op2) + /// LSR Ztied1.B, Pg/M, Ztied1.B, Zop2.B + /// svuint8_t svlsr[_u8]_x(svbool_t pg, svuint8_t op1, svuint8_t op2) + /// LSR Ztied1.B, Pg/M, Ztied1.B, Zop2.B + /// LSRR Ztied2.B, Pg/M, Ztied2.B, Zop1.B + /// svuint8_t svlsr[_u8]_z(svbool_t pg, svuint8_t op1, svuint8_t op2) + /// + public static unsafe Vector ShiftRightLogical(Vector left, Vector right) { throw new PlatformNotSupportedException(); } + + /// + /// svuint8_t svlsr_wide[_u8]_m(svbool_t pg, svuint8_t op1, svuint64_t op2) + /// LSR Ztied1.B, Pg/M, Ztied1.B, Zop2.D + /// svuint8_t svlsr_wide[_u8]_x(svbool_t pg, svuint8_t op1, svuint64_t op2) + /// LSR Ztied1.B, Pg/M, Ztied1.B, Zop2.D + /// LSR Zresult.B, Zop1.B, Zop2.D + /// svuint8_t svlsr_wide[_u8]_z(svbool_t pg, svuint8_t op1, svuint64_t op2) + /// + public static unsafe Vector ShiftRightLogical(Vector left, Vector right) { throw new PlatformNotSupportedException(); } + + /// + /// svuint16_t svlsr[_u16]_m(svbool_t pg, svuint16_t op1, svuint16_t op2) + /// LSR Ztied1.H, Pg/M, Ztied1.H, Zop2.H + /// svuint16_t svlsr[_u16]_x(svbool_t pg, svuint16_t op1, svuint16_t op2) + /// LSR Ztied1.H, Pg/M, Ztied1.H, Zop2.H + /// LSRR Ztied2.H, Pg/M, Ztied2.H, Zop1.H + /// svuint16_t svlsr[_u16]_z(svbool_t pg, svuint16_t op1, svuint16_t op2) + /// + public static unsafe Vector ShiftRightLogical(Vector left, Vector right) { throw new PlatformNotSupportedException(); } + + /// + /// svuint16_t svlsr_wide[_u16]_m(svbool_t pg, svuint16_t op1, svuint64_t op2) + /// LSR Ztied1.H, Pg/M, Ztied1.H, Zop2.D + /// svuint16_t svlsr_wide[_u16]_x(svbool_t pg, svuint16_t op1, svuint64_t op2) + /// LSR Ztied1.H, Pg/M, Ztied1.H, Zop2.D + /// LSR Zresult.H, Zop1.H, Zop2.D + /// svuint16_t svlsr_wide[_u16]_z(svbool_t pg, svuint16_t op1, svuint64_t op2) + /// + public static unsafe Vector ShiftRightLogical(Vector left, Vector right) { throw new PlatformNotSupportedException(); } + + /// + /// svuint32_t svlsr[_u32]_m(svbool_t pg, svuint32_t op1, svuint32_t op2) + /// LSR Ztied1.S, Pg/M, Ztied1.S, Zop2.S + /// svuint32_t svlsr[_u32]_x(svbool_t pg, svuint32_t op1, svuint32_t op2) + /// LSR Ztied1.S, Pg/M, Ztied1.S, Zop2.S + /// LSRR Ztied2.S, Pg/M, Ztied2.S, Zop1.S + /// svuint32_t svlsr[_u32]_z(svbool_t pg, svuint32_t op1, svuint32_t op2) + /// + public static unsafe Vector ShiftRightLogical(Vector left, Vector right) { throw new PlatformNotSupportedException(); } + + /// + /// svuint32_t svlsr_wide[_u32]_m(svbool_t pg, svuint32_t op1, svuint64_t op2) + /// LSR Ztied1.S, Pg/M, Ztied1.S, Zop2.D + /// svuint32_t svlsr_wide[_u32]_x(svbool_t pg, svuint32_t op1, svuint64_t op2) + /// LSR Ztied1.S, Pg/M, Ztied1.S, Zop2.D + /// LSR Zresult.S, Zop1.S, Zop2.D + /// svuint32_t svlsr_wide[_u32]_z(svbool_t pg, svuint32_t op1, svuint64_t op2) + /// + public static unsafe Vector ShiftRightLogical(Vector left, Vector right) { throw new PlatformNotSupportedException(); } + + /// + /// svuint64_t svlsr[_u64]_m(svbool_t pg, svuint64_t op1, svuint64_t op2) + /// LSR Ztied1.D, Pg/M, Ztied1.D, Zop2.D + /// svuint64_t svlsr[_u64]_x(svbool_t pg, svuint64_t op1, svuint64_t op2) + /// LSR Ztied1.D, Pg/M, Ztied1.D, Zop2.D + /// LSRR Ztied2.D, Pg/M, Ztied2.D, Zop1.D + /// svuint64_t svlsr[_u64]_z(svbool_t pg, svuint64_t op1, svuint64_t op2) + /// + public static unsafe Vector ShiftRightLogical(Vector left, Vector right) { throw new PlatformNotSupportedException(); } + + /// SignExtend16 : Sign-extend the low 16 bits /// diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve.cs index 464866d25da9cd..b032a771d4b677 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve.cs @@ -5437,6 +5437,334 @@ internal Arm64() { } public static unsafe Vector SaturatingIncrementByActiveElementCount(Vector value, Vector from) => SaturatingIncrementByActiveElementCount(value, from); + /// Logical shift left + + /// + /// svuint8_t svlsl[_u8]_m(svbool_t pg, svuint8_t op1, svuint8_t op2) + /// LSL Ztied1.B, Pg/M, Ztied1.B, Zop2.B + /// svuint8_t svlsl[_u8]_x(svbool_t pg, svuint8_t op1, svuint8_t op2) + /// LSL Ztied1.B, Pg/M, Ztied1.B, Zop2.B + /// LSLR Ztied2.B, Pg/M, Ztied2.B, Zop1.B + /// svuint8_t svlsl[_u8]_z(svbool_t pg, svuint8_t op1, svuint8_t op2) + /// + public static unsafe Vector ShiftLeftLogical(Vector left, Vector right) => ShiftLeftLogical(left, right); + + /// + /// svuint8_t svlsl_wide[_u8]_m(svbool_t pg, svuint8_t op1, svuint64_t op2) + /// LSL Ztied1.B, Pg/M, Ztied1.B, Zop2.D + /// svuint8_t svlsl_wide[_u8]_x(svbool_t pg, svuint8_t op1, svuint64_t op2) + /// LSL Ztied1.B, Pg/M, Ztied1.B, Zop2.D + /// LSL Zresult.B, Zop1.B, Zop2.D + /// svuint8_t svlsl_wide[_u8]_z(svbool_t pg, svuint8_t op1, svuint64_t op2) + /// + public static unsafe Vector ShiftLeftLogical(Vector left, Vector right) => ShiftLeftLogical(left, right); + + /// + /// svint16_t svlsl[_s16]_m(svbool_t pg, svint16_t op1, svuint16_t op2) + /// LSL Ztied1.H, Pg/M, Ztied1.H, Zop2.H + /// svint16_t svlsl[_s16]_x(svbool_t pg, svint16_t op1, svuint16_t op2) + /// LSL Ztied1.H, Pg/M, Ztied1.H, Zop2.H + /// LSLR Ztied2.H, Pg/M, Ztied2.H, Zop1.H + /// svint16_t svlsl[_s16]_z(svbool_t pg, svint16_t op1, svuint16_t op2) + /// + public static unsafe Vector ShiftLeftLogical(Vector left, Vector right) => ShiftLeftLogical(left, right); + + /// + /// svint16_t svlsl_wide[_s16]_m(svbool_t pg, svint16_t op1, svuint64_t op2) + /// LSL Ztied1.H, Pg/M, Ztied1.H, Zop2.D + /// svint16_t svlsl_wide[_s16]_x(svbool_t pg, svint16_t op1, svuint64_t op2) + /// LSL Ztied1.H, Pg/M, Ztied1.H, Zop2.D + /// LSL Zresult.H, Zop1.H, Zop2.D + /// svint16_t svlsl_wide[_s16]_z(svbool_t pg, svint16_t op1, svuint64_t op2) + /// + public static unsafe Vector ShiftLeftLogical(Vector left, Vector right) => ShiftLeftLogical(left, right); + + /// + /// svint32_t svlsl[_s32]_m(svbool_t pg, svint32_t op1, svuint32_t op2) + /// LSL Ztied1.S, Pg/M, Ztied1.S, Zop2.S + /// svint32_t svlsl[_s32]_x(svbool_t pg, svint32_t op1, svuint32_t op2) + /// LSL Ztied1.S, Pg/M, Ztied1.S, Zop2.S + /// LSLR Ztied2.S, Pg/M, Ztied2.S, Zop1.S + /// svint32_t svlsl[_s32]_z(svbool_t pg, svint32_t op1, svuint32_t op2) + /// + public static unsafe Vector ShiftLeftLogical(Vector left, Vector right) => ShiftLeftLogical(left, right); + + /// + /// svint32_t svlsl_wide[_s32]_m(svbool_t pg, svint32_t op1, svuint64_t op2) + /// LSL Ztied1.S, Pg/M, Ztied1.S, Zop2.D + /// svint32_t svlsl_wide[_s32]_x(svbool_t pg, svint32_t op1, svuint64_t op2) + /// LSL Ztied1.S, Pg/M, Ztied1.S, Zop2.D + /// LSL Zresult.S, Zop1.S, Zop2.D + /// svint32_t svlsl_wide[_s32]_z(svbool_t pg, svint32_t op1, svuint64_t op2) + /// + public static unsafe Vector ShiftLeftLogical(Vector left, Vector right) => ShiftLeftLogical(left, right); + + /// + /// svint64_t svlsl[_s64]_m(svbool_t pg, svint64_t op1, svuint64_t op2) + /// LSL Ztied1.D, Pg/M, Ztied1.D, Zop2.D + /// svint64_t svlsl[_s64]_x(svbool_t pg, svint64_t op1, svuint64_t op2) + /// LSL Ztied1.D, Pg/M, Ztied1.D, Zop2.D + /// LSLR Ztied2.D, Pg/M, Ztied2.D, Zop1.D + /// svint64_t svlsl[_s64]_z(svbool_t pg, svint64_t op1, svuint64_t op2) + /// + public static unsafe Vector ShiftLeftLogical(Vector left, Vector right) => ShiftLeftLogical(left, right); + + /// + /// svint8_t svlsl[_s8]_m(svbool_t pg, svint8_t op1, svuint8_t op2) + /// LSL Ztied1.B, Pg/M, Ztied1.B, Zop2.B + /// svint8_t svlsl[_s8]_x(svbool_t pg, svint8_t op1, svuint8_t op2) + /// LSL Ztied1.B, Pg/M, Ztied1.B, Zop2.B + /// LSLR Ztied2.B, Pg/M, Ztied2.B, Zop1.B + /// svint8_t svlsl[_s8]_z(svbool_t pg, svint8_t op1, svuint8_t op2) + /// + public static unsafe Vector ShiftLeftLogical(Vector left, Vector right) => ShiftLeftLogical(left, right); + + /// + /// svint8_t svlsl_wide[_s8]_m(svbool_t pg, svint8_t op1, svuint64_t op2) + /// LSL Ztied1.B, Pg/M, Ztied1.B, Zop2.D + /// svint8_t svlsl_wide[_s8]_x(svbool_t pg, svint8_t op1, svuint64_t op2) + /// LSL Ztied1.B, Pg/M, Ztied1.B, Zop2.D + /// LSL Zresult.B, Zop1.B, Zop2.D + /// svint8_t svlsl_wide[_s8]_z(svbool_t pg, svint8_t op1, svuint64_t op2) + /// + public static unsafe Vector ShiftLeftLogical(Vector left, Vector right) => ShiftLeftLogical(left, right); + + /// + /// svuint16_t svlsl[_u16]_m(svbool_t pg, svuint16_t op1, svuint16_t op2) + /// LSL Ztied1.H, Pg/M, Ztied1.H, Zop2.H + /// svuint16_t svlsl[_u16]_x(svbool_t pg, svuint16_t op1, svuint16_t op2) + /// LSL Ztied1.H, Pg/M, Ztied1.H, Zop2.H + /// LSLR Ztied2.H, Pg/M, Ztied2.H, Zop1.H + /// svuint16_t svlsl[_u16]_z(svbool_t pg, svuint16_t op1, svuint16_t op2) + /// + public static unsafe Vector ShiftLeftLogical(Vector left, Vector right) => ShiftLeftLogical(left, right); + + /// + /// svuint16_t svlsl_wide[_u16]_m(svbool_t pg, svuint16_t op1, svuint64_t op2) + /// LSL Ztied1.H, Pg/M, Ztied1.H, Zop2.D + /// svuint16_t svlsl_wide[_u16]_x(svbool_t pg, svuint16_t op1, svuint64_t op2) + /// LSL Ztied1.H, Pg/M, Ztied1.H, Zop2.D + /// LSL Zresult.H, Zop1.H, Zop2.D + /// svuint16_t svlsl_wide[_u16]_z(svbool_t pg, svuint16_t op1, svuint64_t op2) + /// + public static unsafe Vector ShiftLeftLogical(Vector left, Vector right) => ShiftLeftLogical(left, right); + + /// + /// svuint32_t svlsl[_u32]_m(svbool_t pg, svuint32_t op1, svuint32_t op2) + /// LSL Ztied1.S, Pg/M, Ztied1.S, Zop2.S + /// svuint32_t svlsl[_u32]_x(svbool_t pg, svuint32_t op1, svuint32_t op2) + /// LSL Ztied1.S, Pg/M, Ztied1.S, Zop2.S + /// LSLR Ztied2.S, Pg/M, Ztied2.S, Zop1.S + /// svuint32_t svlsl[_u32]_z(svbool_t pg, svuint32_t op1, svuint32_t op2) + /// + public static unsafe Vector ShiftLeftLogical(Vector left, Vector right) => ShiftLeftLogical(left, right); + + /// + /// svuint32_t svlsl_wide[_u32]_m(svbool_t pg, svuint32_t op1, svuint64_t op2) + /// LSL Ztied1.S, Pg/M, Ztied1.S, Zop2.D + /// svuint32_t svlsl_wide[_u32]_x(svbool_t pg, svuint32_t op1, svuint64_t op2) + /// LSL Ztied1.S, Pg/M, Ztied1.S, Zop2.D + /// LSL Zresult.S, Zop1.S, Zop2.D + /// svuint32_t svlsl_wide[_u32]_z(svbool_t pg, svuint32_t op1, svuint64_t op2) + /// + public static unsafe Vector ShiftLeftLogical(Vector left, Vector right) => ShiftLeftLogical(left, right); + + /// + /// svuint64_t svlsl[_u64]_m(svbool_t pg, svuint64_t op1, svuint64_t op2) + /// LSL Ztied1.D, Pg/M, Ztied1.D, Zop2.D + /// svuint64_t svlsl[_u64]_x(svbool_t pg, svuint64_t op1, svuint64_t op2) + /// LSL Ztied1.D, Pg/M, Ztied1.D, Zop2.D + /// LSLR Ztied2.D, Pg/M, Ztied2.D, Zop1.D + /// svuint64_t svlsl[_u64]_z(svbool_t pg, svuint64_t op1, svuint64_t op2) + /// + public static unsafe Vector ShiftLeftLogical(Vector left, Vector right) => ShiftLeftLogical(left, right); + + + /// Arithmetic shift right + + /// + /// svint16_t svasr[_s16]_m(svbool_t pg, svint16_t op1, svuint16_t op2) + /// ASR Ztied1.H, Pg/M, Ztied1.H, Zop2.H + /// svint16_t svasr[_s16]_x(svbool_t pg, svint16_t op1, svuint16_t op2) + /// ASR Ztied1.H, Pg/M, Ztied1.H, Zop2.H + /// ASRR Ztied2.H, Pg/M, Ztied2.H, Zop1.H + /// svint16_t svasr[_s16]_z(svbool_t pg, svint16_t op1, svuint16_t op2) + /// + public static unsafe Vector ShiftRightArithmetic(Vector left, Vector right) => ShiftRightArithmetic(left, right); + + /// + /// svint16_t svasr_wide[_s16]_m(svbool_t pg, svint16_t op1, svuint64_t op2) + /// ASR Ztied1.H, Pg/M, Ztied1.H, Zop2.D + /// svint16_t svasr_wide[_s16]_x(svbool_t pg, svint16_t op1, svuint64_t op2) + /// ASR Ztied1.H, Pg/M, Ztied1.H, Zop2.D + /// ASR Zresult.H, Zop1.H, Zop2.D + /// svint16_t svasr_wide[_s16]_z(svbool_t pg, svint16_t op1, svuint64_t op2) + /// + public static unsafe Vector ShiftRightArithmetic(Vector left, Vector right) => ShiftRightArithmetic(left, right); + + /// + /// svint32_t svasr[_s32]_m(svbool_t pg, svint32_t op1, svuint32_t op2) + /// ASR Ztied1.S, Pg/M, Ztied1.S, Zop2.S + /// svint32_t svasr[_s32]_x(svbool_t pg, svint32_t op1, svuint32_t op2) + /// ASR Ztied1.S, Pg/M, Ztied1.S, Zop2.S + /// ASRR Ztied2.S, Pg/M, Ztied2.S, Zop1.S + /// svint32_t svasr[_s32]_z(svbool_t pg, svint32_t op1, svuint32_t op2) + /// + public static unsafe Vector ShiftRightArithmetic(Vector left, Vector right) => ShiftRightArithmetic(left, right); + + /// + /// svint32_t svasr_wide[_s32]_m(svbool_t pg, svint32_t op1, svuint64_t op2) + /// ASR Ztied1.S, Pg/M, Ztied1.S, Zop2.D + /// svint32_t svasr_wide[_s32]_x(svbool_t pg, svint32_t op1, svuint64_t op2) + /// ASR Ztied1.S, Pg/M, Ztied1.S, Zop2.D + /// ASR Zresult.S, Zop1.S, Zop2.D + /// svint32_t svasr_wide[_s32]_z(svbool_t pg, svint32_t op1, svuint64_t op2) + /// + public static unsafe Vector ShiftRightArithmetic(Vector left, Vector right) => ShiftRightArithmetic(left, right); + + /// + /// svint64_t svasr[_s64]_m(svbool_t pg, svint64_t op1, svuint64_t op2) + /// ASR Ztied1.D, Pg/M, Ztied1.D, Zop2.D + /// svint64_t svasr[_s64]_x(svbool_t pg, svint64_t op1, svuint64_t op2) + /// ASR Ztied1.D, Pg/M, Ztied1.D, Zop2.D + /// ASRR Ztied2.D, Pg/M, Ztied2.D, Zop1.D + /// svint64_t svasr[_s64]_z(svbool_t pg, svint64_t op1, svuint64_t op2) + /// + public static unsafe Vector ShiftRightArithmetic(Vector left, Vector right) => ShiftRightArithmetic(left, right); + + /// + /// svint8_t svasr[_s8]_m(svbool_t pg, svint8_t op1, svuint8_t op2) + /// ASR Ztied1.B, Pg/M, Ztied1.B, Zop2.B + /// svint8_t svasr[_s8]_x(svbool_t pg, svint8_t op1, svuint8_t op2) + /// ASR Ztied1.B, Pg/M, Ztied1.B, Zop2.B + /// ASRR Ztied2.B, Pg/M, Ztied2.B, Zop1.B + /// svint8_t svasr[_s8]_z(svbool_t pg, svint8_t op1, svuint8_t op2) + /// + public static unsafe Vector ShiftRightArithmetic(Vector left, Vector right) => ShiftRightArithmetic(left, right); + + /// + /// svint8_t svasr_wide[_s8]_m(svbool_t pg, svint8_t op1, svuint64_t op2) + /// ASR Ztied1.B, Pg/M, Ztied1.B, Zop2.D + /// svint8_t svasr_wide[_s8]_x(svbool_t pg, svint8_t op1, svuint64_t op2) + /// ASR Ztied1.B, Pg/M, Ztied1.B, Zop2.D + /// ASR Zresult.B, Zop1.B, Zop2.D + /// svint8_t svasr_wide[_s8]_z(svbool_t pg, svint8_t op1, svuint64_t op2) + /// + public static unsafe Vector ShiftRightArithmetic(Vector left, Vector right) => ShiftRightArithmetic(left, right); + + + /// Arithmetic shift right for divide by immediate + + /// + /// svint16_t svasrd[_n_s16]_m(svbool_t pg, svint16_t op1, uint64_t imm2) + /// ASRD Ztied1.H, Pg/M, Ztied1.H, #imm2 + /// svint16_t svasrd[_n_s16]_x(svbool_t pg, svint16_t op1, uint64_t imm2) + /// ASRD Ztied1.H, Pg/M, Ztied1.H, #imm2 + /// svint16_t svasrd[_n_s16]_z(svbool_t pg, svint16_t op1, uint64_t imm2) + /// + public static unsafe Vector ShiftRightArithmeticForDivide(Vector value, [ConstantExpected] byte control) => ShiftRightArithmeticForDivide(value, control); + + /// + /// svint32_t svasrd[_n_s32]_m(svbool_t pg, svint32_t op1, uint64_t imm2) + /// ASRD Ztied1.S, Pg/M, Ztied1.S, #imm2 + /// svint32_t svasrd[_n_s32]_x(svbool_t pg, svint32_t op1, uint64_t imm2) + /// ASRD Ztied1.S, Pg/M, Ztied1.S, #imm2 + /// svint32_t svasrd[_n_s32]_z(svbool_t pg, svint32_t op1, uint64_t imm2) + /// + public static unsafe Vector ShiftRightArithmeticForDivide(Vector value, [ConstantExpected] byte control) => ShiftRightArithmeticForDivide(value, control); + + /// + /// svint64_t svasrd[_n_s64]_m(svbool_t pg, svint64_t op1, uint64_t imm2) + /// ASRD Ztied1.D, Pg/M, Ztied1.D, #imm2 + /// svint64_t svasrd[_n_s64]_x(svbool_t pg, svint64_t op1, uint64_t imm2) + /// ASRD Ztied1.D, Pg/M, Ztied1.D, #imm2 + /// svint64_t svasrd[_n_s64]_z(svbool_t pg, svint64_t op1, uint64_t imm2) + /// + public static unsafe Vector ShiftRightArithmeticForDivide(Vector value, [ConstantExpected] byte control) => ShiftRightArithmeticForDivide(value, control); + + /// + /// svint8_t svasrd[_n_s8]_m(svbool_t pg, svint8_t op1, uint64_t imm2) + /// ASRD Ztied1.B, Pg/M, Ztied1.B, #imm2 + /// svint8_t svasrd[_n_s8]_x(svbool_t pg, svint8_t op1, uint64_t imm2) + /// ASRD Ztied1.B, Pg/M, Ztied1.B, #imm2 + /// svint8_t svasrd[_n_s8]_z(svbool_t pg, svint8_t op1, uint64_t imm2) + /// + public static unsafe Vector ShiftRightArithmeticForDivide(Vector value, [ConstantExpected] byte control) => ShiftRightArithmeticForDivide(value, control); + + + /// Logical shift right + + /// + /// svuint8_t svlsr[_u8]_m(svbool_t pg, svuint8_t op1, svuint8_t op2) + /// LSR Ztied1.B, Pg/M, Ztied1.B, Zop2.B + /// svuint8_t svlsr[_u8]_x(svbool_t pg, svuint8_t op1, svuint8_t op2) + /// LSR Ztied1.B, Pg/M, Ztied1.B, Zop2.B + /// LSRR Ztied2.B, Pg/M, Ztied2.B, Zop1.B + /// svuint8_t svlsr[_u8]_z(svbool_t pg, svuint8_t op1, svuint8_t op2) + /// + public static unsafe Vector ShiftRightLogical(Vector left, Vector right) => ShiftRightLogical(left, right); + + /// + /// svuint8_t svlsr_wide[_u8]_m(svbool_t pg, svuint8_t op1, svuint64_t op2) + /// LSR Ztied1.B, Pg/M, Ztied1.B, Zop2.D + /// svuint8_t svlsr_wide[_u8]_x(svbool_t pg, svuint8_t op1, svuint64_t op2) + /// LSR Ztied1.B, Pg/M, Ztied1.B, Zop2.D + /// LSR Zresult.B, Zop1.B, Zop2.D + /// svuint8_t svlsr_wide[_u8]_z(svbool_t pg, svuint8_t op1, svuint64_t op2) + /// + public static unsafe Vector ShiftRightLogical(Vector left, Vector right) => ShiftRightLogical(left, right); + + /// + /// svuint16_t svlsr[_u16]_m(svbool_t pg, svuint16_t op1, svuint16_t op2) + /// LSR Ztied1.H, Pg/M, Ztied1.H, Zop2.H + /// svuint16_t svlsr[_u16]_x(svbool_t pg, svuint16_t op1, svuint16_t op2) + /// LSR Ztied1.H, Pg/M, Ztied1.H, Zop2.H + /// LSRR Ztied2.H, Pg/M, Ztied2.H, Zop1.H + /// svuint16_t svlsr[_u16]_z(svbool_t pg, svuint16_t op1, svuint16_t op2) + /// + public static unsafe Vector ShiftRightLogical(Vector left, Vector right) => ShiftRightLogical(left, right); + + /// + /// svuint16_t svlsr_wide[_u16]_m(svbool_t pg, svuint16_t op1, svuint64_t op2) + /// LSR Ztied1.H, Pg/M, Ztied1.H, Zop2.D + /// svuint16_t svlsr_wide[_u16]_x(svbool_t pg, svuint16_t op1, svuint64_t op2) + /// LSR Ztied1.H, Pg/M, Ztied1.H, Zop2.D + /// LSR Zresult.H, Zop1.H, Zop2.D + /// svuint16_t svlsr_wide[_u16]_z(svbool_t pg, svuint16_t op1, svuint64_t op2) + /// + public static unsafe Vector ShiftRightLogical(Vector left, Vector right) => ShiftRightLogical(left, right); + + /// + /// svuint32_t svlsr[_u32]_m(svbool_t pg, svuint32_t op1, svuint32_t op2) + /// LSR Ztied1.S, Pg/M, Ztied1.S, Zop2.S + /// svuint32_t svlsr[_u32]_x(svbool_t pg, svuint32_t op1, svuint32_t op2) + /// LSR Ztied1.S, Pg/M, Ztied1.S, Zop2.S + /// LSRR Ztied2.S, Pg/M, Ztied2.S, Zop1.S + /// svuint32_t svlsr[_u32]_z(svbool_t pg, svuint32_t op1, svuint32_t op2) + /// + public static unsafe Vector ShiftRightLogical(Vector left, Vector right) => ShiftRightLogical(left, right); + + /// + /// svuint32_t svlsr_wide[_u32]_m(svbool_t pg, svuint32_t op1, svuint64_t op2) + /// LSR Ztied1.S, Pg/M, Ztied1.S, Zop2.D + /// svuint32_t svlsr_wide[_u32]_x(svbool_t pg, svuint32_t op1, svuint64_t op2) + /// LSR Ztied1.S, Pg/M, Ztied1.S, Zop2.D + /// LSR Zresult.S, Zop1.S, Zop2.D + /// svuint32_t svlsr_wide[_u32]_z(svbool_t pg, svuint32_t op1, svuint64_t op2) + /// + public static unsafe Vector ShiftRightLogical(Vector left, Vector right) => ShiftRightLogical(left, right); + + /// + /// svuint64_t svlsr[_u64]_m(svbool_t pg, svuint64_t op1, svuint64_t op2) + /// LSR Ztied1.D, Pg/M, Ztied1.D, Zop2.D + /// svuint64_t svlsr[_u64]_x(svbool_t pg, svuint64_t op1, svuint64_t op2) + /// LSR Ztied1.D, Pg/M, Ztied1.D, Zop2.D + /// LSRR Ztied2.D, Pg/M, Ztied2.D, Zop1.D + /// svuint64_t svlsr[_u64]_z(svbool_t pg, svuint64_t op1, svuint64_t op2) + /// + public static unsafe Vector ShiftRightLogical(Vector left, Vector right) => ShiftRightLogical(left, right); + + /// SignExtend16 : Sign-extend the low 16 bits /// diff --git a/src/libraries/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.cs b/src/libraries/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.cs index 471cb1b19b7e50..27647439c61209 100644 --- a/src/libraries/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.cs +++ b/src/libraries/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.cs @@ -4972,6 +4972,39 @@ internal Arm64() { } public static ulong SaturatingIncrementByActiveElementCount(ulong value, System.Numerics.Vector from) { throw null; } public static System.Numerics.Vector SaturatingIncrementByActiveElementCount(System.Numerics.Vector value, System.Numerics.Vector from) { throw null; } + public static System.Numerics.Vector ShiftLeftLogical(System.Numerics.Vector left, System.Numerics.Vector right) { throw null; } + public static System.Numerics.Vector ShiftLeftLogical(System.Numerics.Vector left, System.Numerics.Vector right) { throw null; } + public static System.Numerics.Vector ShiftLeftLogical(System.Numerics.Vector left, System.Numerics.Vector right) { throw null; } + public static System.Numerics.Vector ShiftLeftLogical(System.Numerics.Vector left, System.Numerics.Vector right) { throw null; } + public static System.Numerics.Vector ShiftLeftLogical(System.Numerics.Vector left, System.Numerics.Vector right) { throw null; } + public static System.Numerics.Vector ShiftLeftLogical(System.Numerics.Vector left, System.Numerics.Vector right) { throw null; } + public static System.Numerics.Vector ShiftLeftLogical(System.Numerics.Vector left, System.Numerics.Vector right) { throw null; } + public static System.Numerics.Vector ShiftLeftLogical(System.Numerics.Vector left, System.Numerics.Vector right) { throw null; } + public static System.Numerics.Vector ShiftLeftLogical(System.Numerics.Vector left, System.Numerics.Vector right) { throw null; } + public static System.Numerics.Vector ShiftLeftLogical(System.Numerics.Vector left, System.Numerics.Vector right) { throw null; } + public static System.Numerics.Vector ShiftLeftLogical(System.Numerics.Vector left, System.Numerics.Vector right) { throw null; } + public static System.Numerics.Vector ShiftLeftLogical(System.Numerics.Vector left, System.Numerics.Vector right) { throw null; } + public static System.Numerics.Vector ShiftLeftLogical(System.Numerics.Vector left, System.Numerics.Vector right) { throw null; } + public static System.Numerics.Vector ShiftLeftLogical(System.Numerics.Vector left, System.Numerics.Vector right) { throw null; } + public static System.Numerics.Vector ShiftRightArithmetic(System.Numerics.Vector left, System.Numerics.Vector right) { throw null; } + public static System.Numerics.Vector ShiftRightArithmetic(System.Numerics.Vector left, System.Numerics.Vector right) { throw null; } + public static System.Numerics.Vector ShiftRightArithmetic(System.Numerics.Vector left, System.Numerics.Vector right) { throw null; } + public static System.Numerics.Vector ShiftRightArithmetic(System.Numerics.Vector left, System.Numerics.Vector right) { throw null; } + public static System.Numerics.Vector ShiftRightArithmetic(System.Numerics.Vector left, System.Numerics.Vector right) { throw null; } + public static System.Numerics.Vector ShiftRightArithmetic(System.Numerics.Vector left, System.Numerics.Vector right) { throw null; } + public static System.Numerics.Vector ShiftRightArithmetic(System.Numerics.Vector left, System.Numerics.Vector right) { throw null; } + public static System.Numerics.Vector ShiftRightArithmeticForDivide(System.Numerics.Vector value, [ConstantExpected] byte control) { throw null; } + public static System.Numerics.Vector ShiftRightArithmeticForDivide(System.Numerics.Vector value, [ConstantExpected] byte control) { throw null; } + public static System.Numerics.Vector ShiftRightArithmeticForDivide(System.Numerics.Vector value, [ConstantExpected] byte control) { throw null; } + public static System.Numerics.Vector ShiftRightArithmeticForDivide(System.Numerics.Vector value, [ConstantExpected] byte control) { throw null; } + public static System.Numerics.Vector ShiftRightLogical(System.Numerics.Vector left, System.Numerics.Vector right) { throw null; } + public static System.Numerics.Vector ShiftRightLogical(System.Numerics.Vector left, System.Numerics.Vector right) { throw null; } + public static System.Numerics.Vector ShiftRightLogical(System.Numerics.Vector left, System.Numerics.Vector right) { throw null; } + public static System.Numerics.Vector ShiftRightLogical(System.Numerics.Vector left, System.Numerics.Vector right) { throw null; } + public static System.Numerics.Vector ShiftRightLogical(System.Numerics.Vector left, System.Numerics.Vector right) { throw null; } + public static System.Numerics.Vector ShiftRightLogical(System.Numerics.Vector left, System.Numerics.Vector right) { throw null; } + public static System.Numerics.Vector ShiftRightLogical(System.Numerics.Vector left, System.Numerics.Vector right) { throw null; } + public static System.Numerics.Vector SignExtend16(System.Numerics.Vector value) { throw null; } public static System.Numerics.Vector SignExtend16(System.Numerics.Vector value) { throw null; } public static System.Numerics.Vector SignExtend32(System.Numerics.Vector value) { throw null; } diff --git a/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs b/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs index 09a7b3966cf8d7..c872fea6722a34 100644 --- a/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs +++ b/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs @@ -3727,6 +3727,31 @@ + // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_sbyte_byte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.LeftShift(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.LeftShift(left[i], right[i])"}), + // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_short_ushort", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.LeftShift(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.LeftShift(left[i], right[i])"}), + // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_int_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.LeftShift(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.LeftShift(left[i], right[i])"}), + // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_long_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.LeftShift(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.LeftShift(left[i], right[i])"}), + // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_byte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.LeftShift(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.LeftShift(left[i], right[i])"}), + // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_ushort", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.LeftShift(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.LeftShift(left[i], right[i])"}), + // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.LeftShift(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.LeftShift(left[i], right[i])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.LeftShift(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.LeftShift(left[i], right[i])"}), + // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_sbyte_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.LeftShift(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.LeftShift(left[i], right[i])"}), + // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_short_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.LeftShift(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.LeftShift(left[i], right[i])"}), + // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_int_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.LeftShift(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.LeftShift(left[i], right[i])"}), + // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_byte_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.LeftShift(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.LeftShift(left[i], right[i])"}), + // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_ushort_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.LeftShift(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.LeftShift(left[i], right[i])"}), + // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_uint_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.LeftShift(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.LeftShift(left[i], right[i])"}), + + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_byte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.RightShift(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.RightShift(left[i], right[i])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_ushort", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.RightShift(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.RightShift(left[i], right[i])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.RightShift(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.RightShift(left[i], right[i])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.RightShift(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.RightShift(left[i], right[i])"}), + // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_byte_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.RightShift(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.RightShift(left[i], right[i])"}), + // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_ushort_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.RightShift(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.RightShift(left[i], right[i])"}), + // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_uint_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.RightShift(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.RightShift(left[i], right[i])"}), + + + ("SveSimpleVecOpTest.template", new Dictionary { ["TestName"] = "Sve_SignExtend16_int", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "SignExtend16", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "result[i] != Helpers.SignExtend(firstOp[i], 16, false)", ["GetIterResult"] = "Helpers.SignExtend(leftOp[i], 16, false)"}), ("SveSimpleVecOpTest.template", new Dictionary { ["TestName"] = "Sve_SignExtend16_long", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "SignExtend16", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "result[i] != Helpers.SignExtend(firstOp[i], 16, false)", ["GetIterResult"] = "Helpers.SignExtend(leftOp[i], 16, false)"}), ("SveSimpleVecOpTest.template", new Dictionary { ["TestName"] = "Sve_SignExtend32_long", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "SignExtend32", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "result[i] != Helpers.SignExtend(firstOp[i], 32, false)", ["GetIterResult"] = "Helpers.SignExtend(leftOp[i], 32, false)"}), diff --git a/src/tests/JIT/HardwareIntrinsics/Arm/Shared/Helpers.cs b/src/tests/JIT/HardwareIntrinsics/Arm/Shared/Helpers.cs index 771eb6f8ebfd69..0b7ca7921bea55 100644 --- a/src/tests/JIT/HardwareIntrinsics/Arm/Shared/Helpers.cs +++ b/src/tests/JIT/HardwareIntrinsics/Arm/Shared/Helpers.cs @@ -3673,6 +3673,8 @@ private static short SignedShift(short op1, short op2, bool rounding = false, bo public static ushort ShiftLeftLogical(ushort op1, byte op2) => UnsignedShift(op1, (short)op2); + public static ushort ShiftLeftLogical(ushort op1, ushort op2) => UnsignedShift(op1, (short)op2); + public static short ShiftLeftLogicalSaturate(short op1, byte op2) => SignedShift(op1, (short)op2, saturating: true); public static ushort ShiftLeftLogicalSaturate(ushort op1, byte op2) => UnsignedShift(op1, (short)op2, saturating: true); @@ -3941,6 +3943,8 @@ private static int SignedShift(int op1, int op2, bool rounding = false, bool sat public static uint ShiftLeftLogical(uint op1, byte op2) => UnsignedShift(op1, (int)op2); + public static uint ShiftLeftLogical(uint op1, uint op2) => UnsignedShift(op1, (int)op2); + public static int ShiftLeftLogicalSaturate(int op1, byte op2) => SignedShift(op1, (int)op2, saturating: true); public static uint ShiftLeftLogicalSaturate(uint op1, byte op2) => UnsignedShift(op1, (int)op2, saturating: true); @@ -4209,6 +4213,8 @@ private static long SignedShift(long op1, long op2, bool rounding = false, bool public static ulong ShiftLeftLogical(ulong op1, byte op2) => UnsignedShift(op1, (long)op2); + public static ulong ShiftLeftLogical(ulong op1, ulong op2) => UnsignedShift(op1, (long)op2); + public static long ShiftLeftLogicalSaturate(long op1, byte op2) => SignedShift(op1, (long)op2, saturating: true); public static ulong ShiftLeftLogicalSaturate(ulong op1, byte op2) => UnsignedShift(op1, (long)op2, saturating: true); @@ -4643,6 +4649,28 @@ private static (ulong val, bool ovf) ShiftOvf(ulong value, int shift) return (result, ovf); } + public static ulong LeftShift(ulong value, ulong shift) + { + for (ulong i = 0; (value != 0) && (i < shift); i++) + { + value <<= 1; + } + + return value; + } + + public static T1 RightShift(T1 value, T2 shift) where T1 : INumber where T2 : INumber + { + T1 two = T1.One + T1.One; + + for (T2 i = T2.Zero; (value != T1.Zero) && (i < shift); i++) + { + value /= two; + } + + return value; + } + public static float AbsoluteDifference(float op1, float op2) => MathF.Abs(op1 - op2); public static float FusedMultiplyAdd(float op1, float op2, float op3) => MathF.FusedMultiplyAdd(op2, op3, op1); From 00078c9425689bd5bd42d1988c496aa6f9ac6247 Mon Sep 17 00:00:00 2001 From: "Aman Khalid (from Dev Box)" Date: Wed, 26 Jun 2024 20:06:02 -0400 Subject: [PATCH 02/11] Working for same-operand types --- src/coreclr/jit/hwintrinsiccodegenarm64.cpp | 7 +-- src/coreclr/jit/hwintrinsiclistarm64sve.h | 3 +- .../GenerateHWIntrinsicTests_Arm.cs | 38 ++++++++-------- .../HardwareIntrinsics/Arm/Shared/Helpers.cs | 44 +++++++++---------- 4 files changed, 44 insertions(+), 48 deletions(-) diff --git a/src/coreclr/jit/hwintrinsiccodegenarm64.cpp b/src/coreclr/jit/hwintrinsiccodegenarm64.cpp index 474016bd8e8f79..e1833a271a90fa 100644 --- a/src/coreclr/jit/hwintrinsiccodegenarm64.cpp +++ b/src/coreclr/jit/hwintrinsiccodegenarm64.cpp @@ -2168,15 +2168,10 @@ void CodeGen::genHWIntrinsic(GenTreeHWIntrinsic* node) /* canSkip */ true); } - GetEmitter()->emitIns_R_R(ins, emitSize, targetReg, op2Reg, opt); + GetEmitter()->emitInsSve_R_R(ins, emitSize, targetReg, op2Reg, opt); break; } - case NI_Sve_ShiftLeftLogical: - // case NI_Sve_ShiftRightLogical: - GetEmitter()->emitInsSve_R_R_R(ins, EA_SCALABLE, targetReg, op1Reg, op2Reg, opt); - break; - default: unreached(); } diff --git a/src/coreclr/jit/hwintrinsiclistarm64sve.h b/src/coreclr/jit/hwintrinsiclistarm64sve.h index aa2a0e103a5de7..6f481fd57cb169 100644 --- a/src/coreclr/jit/hwintrinsiclistarm64sve.h +++ b/src/coreclr/jit/hwintrinsiclistarm64sve.h @@ -194,7 +194,8 @@ HARDWARE_INTRINSIC(Sve, SaturatingIncrementBy64BitElementCount, HARDWARE_INTRINSIC(Sve, SaturatingIncrementBy8BitElementCount, 0, 3, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sve_sqincb, INS_sve_uqincb, INS_sve_sqincb, INS_sve_uqincb, INS_invalid, INS_invalid}, HW_Category_Scalar, HW_Flag_Scalable|HW_Flag_HasImmediateOperand|HW_Flag_HasEnumOperand|HW_Flag_SpecialCodeGen|HW_Flag_SpecialImport|HW_Flag_HasRMWSemantics) HARDWARE_INTRINSIC(Sve, SaturatingIncrementByActiveElementCount, -1, 2, true, {INS_invalid, INS_sve_sqincp, INS_sve_sqincp, INS_sve_sqincp, INS_sve_sqincp, INS_sve_sqincp, INS_sve_sqincp, INS_sve_sqincp, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Scalable|HW_Flag_SpecialCodeGen|HW_Flag_SpecialImport|HW_Flag_BaseTypeFromSecondArg|HW_Flag_HasRMWSemantics) HARDWARE_INTRINSIC(Sve, Scale, -1, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sve_fscale, INS_sve_fscale}, HW_Category_SIMD, HW_Flag_Scalable|HW_Flag_BaseTypeFromFirstArg|HW_Flag_EmbeddedMaskedOperation|HW_Flag_LowMaskedOperation|HW_Flag_HasRMWSemantics) -HARDWARE_INTRINSIC(Sve, ShiftLeftLogical, -1, -1, false, {INS_sve_lsl, INS_sve_lsl, INS_sve_lsl, INS_sve_lsl, INS_sve_lsl, INS_sve_lsl, INS_sve_lsl, INS_sve_lsl, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Scalable|HW_Flag_BaseTypeFromFirstArg|HW_Flag_SpecialCodeGen|HW_Flag_OptionalEmbeddedMaskedOperation|HW_Flag_LowMaskedOperation) +HARDWARE_INTRINSIC(Sve, ShiftLeftLogical, -1, -1, false, {INS_sve_lsl, INS_sve_lsl, INS_sve_lsl, INS_sve_lsl, INS_sve_lsl, INS_sve_lsl, INS_sve_lsl, INS_sve_lsl, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Scalable|HW_Flag_BaseTypeFromFirstArg|HW_Flag_EmbeddedMaskedOperation|HW_Flag_LowMaskedOperation|HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(Sve, ShiftRightLogical, -1, -1, false, {INS_invalid, INS_sve_lsr, INS_invalid, INS_sve_lsr, INS_invalid, INS_sve_lsr, INS_invalid, INS_sve_lsr, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Scalable|HW_Flag_BaseTypeFromFirstArg|HW_Flag_EmbeddedMaskedOperation|HW_Flag_LowMaskedOperation|HW_Flag_HasRMWSemantics) HARDWARE_INTRINSIC(Sve, SignExtend16, -1, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sve_sxth, INS_invalid, INS_sve_sxth, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Scalable|HW_Flag_EmbeddedMaskedOperation|HW_Flag_LowMaskedOperation) HARDWARE_INTRINSIC(Sve, SignExtend32, -1, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sve_sxtw, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Scalable|HW_Flag_EmbeddedMaskedOperation|HW_Flag_LowMaskedOperation) HARDWARE_INTRINSIC(Sve, SignExtend8, -1, -1, false, {INS_invalid, INS_invalid, INS_sve_sxtb, INS_invalid, INS_sve_sxtb, INS_invalid, INS_sve_sxtb, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Scalable|HW_Flag_EmbeddedMaskedOperation|HW_Flag_LowMaskedOperation) diff --git a/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs b/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs index 7e2a0580ab73ae..5d49a5e09941c4 100644 --- a/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs +++ b/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs @@ -3740,25 +3740,25 @@ ("SveVecPairBinOpTest.template", new Dictionary { ["TestName"] = "Sve_Scale_float_int", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "Scale", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateEntry"] = "result[i] != Helpers.Scale(left[i], right[i])"}), ("SveVecPairBinOpTest.template", new Dictionary { ["TestName"] = "Sve_Scale_double_long", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "Scale", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateEntry"] = "result[i] != Helpers.Scale(left[i], right[i])"}), - // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_sbyte_byte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.LeftShift(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.LeftShift(left[i], right[i])"}), - // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_short_ushort", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.LeftShift(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.LeftShift(left[i], right[i])"}), - // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_int_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.LeftShift(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.LeftShift(left[i], right[i])"}), - // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_long_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.LeftShift(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.LeftShift(left[i], right[i])"}), - // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_byte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.LeftShift(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.LeftShift(left[i], right[i])"}), - // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_ushort", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.LeftShift(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.LeftShift(left[i], right[i])"}), - // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.LeftShift(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.LeftShift(left[i], right[i])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.LeftShift(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.LeftShift(left[i], right[i])"}), - // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_sbyte_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.LeftShift(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.LeftShift(left[i], right[i])"}), - // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_short_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.LeftShift(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.LeftShift(left[i], right[i])"}), - // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_int_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.LeftShift(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.LeftShift(left[i], right[i])"}), - // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_byte_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.LeftShift(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.LeftShift(left[i], right[i])"}), - // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_ushort_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.LeftShift(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.LeftShift(left[i], right[i])"}), - // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_uint_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.LeftShift(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.LeftShift(left[i], right[i])"}), - - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_byte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.RightShift(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.RightShift(left[i], right[i])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_ushort", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.RightShift(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.RightShift(left[i], right[i])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.RightShift(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.RightShift(left[i], right[i])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.RightShift(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.RightShift(left[i], right[i])"}), + // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_sbyte_byte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.ShiftLeft(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftLeft(left[i], (ulong)right[i])"}), + // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_short_ushort", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.ShiftLeft(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftLeft(left[i], (ulong)right[i])"}), + // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_int_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.ShiftLeft(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftLeft(left[i], (ulong)right[i])"}), + // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_long_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftLeft(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftLeft(left[i], (ulong)right[i])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_byte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.ShiftLeft(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftLeft(left[i], (ulong)right[i])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_ushort", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.ShiftLeft(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftLeft(left[i], (ulong)right[i])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.ShiftLeft(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftLeft(left[i], (ulong)right[i])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftLeft(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftLeft(left[i], right[i])"}), + // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_sbyte_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.LeftShift(left[i], (int)Math.Clamp(right[i], 0, int.MaxValue)) != result[i]", ["GetIterResult"] = "Helpers.LeftShift(left[i], (int)Math.Clamp(right[i], 0, int.MaxValue))"}), + // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_short_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.LeftShift(left[i], (int)Math.Clamp(right[i], 0, int.MaxValue)) != result[i]", ["GetIterResult"] = "Helpers.LeftShift(left[i], (int)Math.Clamp(right[i], 0, int.MaxValue))"}), + // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_int_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.LeftShift(left[i], (int)Math.Clamp(right[i], 0, int.MaxValue)) != result[i]", ["GetIterResult"] = "Helpers.LeftShift(left[i], (int)Math.Clamp(right[i], 0, int.MaxValue))"}), + // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_byte_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.LeftShift(left[i], (int)Math.Clamp(right[i], 0, int.MaxValue)) != result[i]", ["GetIterResult"] = "Helpers.LeftShift(left[i], (int)Math.Clamp(right[i], 0, int.MaxValue))"}), + // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_ushort_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.LeftShift(left[i], (int)Math.Clamp(right[i], 0, int.MaxValue)) != result[i]", ["GetIterResult"] = "Helpers.LeftShift(left[i], (int)Math.Clamp(right[i], 0, int.MaxValue))"}), + // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_uint_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.LeftShift(left[i], (int)Math.Clamp(right[i], 0, int.MaxValue)) != result[i]", ["GetIterResult"] = "Helpers.LeftShift(left[i], (int)Math.Clamp(right[i], 0, int.MaxValue))"}), + + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_byte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_ushort", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], right[i])"}), // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_byte_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.RightShift(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.RightShift(left[i], right[i])"}), // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_ushort_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.RightShift(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.RightShift(left[i], right[i])"}), // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_uint_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.RightShift(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.RightShift(left[i], right[i])"}), diff --git a/src/tests/JIT/HardwareIntrinsics/Arm/Shared/Helpers.cs b/src/tests/JIT/HardwareIntrinsics/Arm/Shared/Helpers.cs index 0b0e425def8edb..0ed39cd0546ba9 100644 --- a/src/tests/JIT/HardwareIntrinsics/Arm/Shared/Helpers.cs +++ b/src/tests/JIT/HardwareIntrinsics/Arm/Shared/Helpers.cs @@ -1943,6 +1943,28 @@ private static int HighNarrowing(long op1, bool round) public static long MultiplyWideningUpperAndSubtract(long[] op1, int[] op2, int[] op3, int i) => MultiplyWideningAndSubtract(op1[i], op2[i + op2.Length / 2], op3[i + op3.Length / 2]); + public static T ShiftLeft(T op1, ulong op2) where T : INumber + { + T two = T.One + T.One; + for (ulong i = 0; (op1 != T.Zero) && (i < op2); i++) + { + op1 *= two; + } + + return op1; + } + + public static T ShiftRight(T op1, ulong op2) where T : INumber + { + T two = T.One + T.One; + for (ulong i = 0; (op1 != T.Zero) && (i < op2); i++) + { + op1 /= two; + } + + return op1; + } + public static T SignExtend(T n, int numBits, bool zeroExtend) where T : struct, IComparable, IConvertible { // Get the underlying integer value @@ -4664,28 +4686,6 @@ private static (ulong val, bool ovf) ShiftOvf(ulong value, int shift) return (result, ovf); } - public static ulong LeftShift(ulong value, ulong shift) - { - for (ulong i = 0; (value != 0) && (i < shift); i++) - { - value <<= 1; - } - - return value; - } - - public static T1 RightShift(T1 value, T2 shift) where T1 : INumber where T2 : INumber - { - T1 two = T1.One + T1.One; - - for (T2 i = T2.Zero; (value != T1.Zero) && (i < shift); i++) - { - value /= two; - } - - return value; - } - public static float AbsoluteDifference(float op1, float op2) => MathF.Abs(op1 - op2); public static float FusedMultiplyAdd(float op1, float op2, float op3) => MathF.FusedMultiplyAdd(op2, op3, op1); From 84f68f393fa61eefe1a3a7b252a7a9d76f48259b Mon Sep 17 00:00:00 2001 From: "Aman Khalid (from Dev Box)" Date: Thu, 27 Jun 2024 12:50:38 -0400 Subject: [PATCH 03/11] Add ShiftleftLogical, ShiftRightLogical --- src/coreclr/jit/hwintrinsic.cpp | 6 +++ src/coreclr/jit/hwintrinsiccodegenarm64.cpp | 32 +++++++++++--- src/coreclr/jit/hwintrinsiclistarm64sve.h | 1 + .../GenerateHWIntrinsicTests_Arm.cs | 44 +++++++++---------- .../Shared/_SveBinaryOpTestTemplate.template | 27 +++++++++--- 5 files changed, 77 insertions(+), 33 deletions(-) diff --git a/src/coreclr/jit/hwintrinsic.cpp b/src/coreclr/jit/hwintrinsic.cpp index 0b963d23e39a57..5fe8ec51edc1b0 100644 --- a/src/coreclr/jit/hwintrinsic.cpp +++ b/src/coreclr/jit/hwintrinsic.cpp @@ -1800,6 +1800,12 @@ GenTree* Compiler::impHWIntrinsic(NamedIntrinsic intrinsic, retNode->AsHWIntrinsic()->SetAuxiliaryJitType(sigReader.op1JitType); break; + case NI_Sve_ShiftLeftLogical: + case NI_Sve_ShiftRightArithmetic: + case NI_Sve_ShiftRightLogical: + retNode->AsHWIntrinsic()->SetAuxiliaryJitType(getBaseJitTypeOfSIMDType(sigReader.op2ClsHnd)); + break; + default: break; } diff --git a/src/coreclr/jit/hwintrinsiccodegenarm64.cpp b/src/coreclr/jit/hwintrinsiccodegenarm64.cpp index e1833a271a90fa..0584bd84070203 100644 --- a/src/coreclr/jit/hwintrinsiccodegenarm64.cpp +++ b/src/coreclr/jit/hwintrinsiccodegenarm64.cpp @@ -558,6 +558,28 @@ void CodeGen::genHWIntrinsic(GenTreeHWIntrinsic* node) { assert(instrIsRMW); + insScalableOpts sopt; + + switch (intrinEmbMask.id) + { + case NI_Sve_ShiftLeftLogical: + case NI_Sve_ShiftRightArithmetic: + case NI_Sve_ShiftRightLogical: + { + const emitAttr op2Size = emitTypeSize(op2->AsHWIntrinsic()->GetAuxiliaryType()); + if (op2Size != emitTypeSize(intrinEmbMask.baseType)) + { + assert(emitter::optGetSveInsOpt(op2Size) == INS_OPTS_SCALABLE_D); + sopt = INS_SCALABLE_OPTS_WIDE; + break; + } + } + + default: + sopt = INS_SCALABLE_OPTS_NONE; + break; + } + if (intrin.op3->IsVectorZero()) { // If `falseReg` is zero, then move the first operand of `intrinEmbMask` in the @@ -568,7 +590,7 @@ void CodeGen::genHWIntrinsic(GenTreeHWIntrinsic* node) // Finally, perform the actual "predicated" operation so that `targetReg` is the first operand // and `embMaskOp2Reg` is the second operand. - GetEmitter()->emitIns_R_R_R(insEmbMask, emitSize, targetReg, maskReg, embMaskOp2Reg, opt); + GetEmitter()->emitIns_R_R_R(insEmbMask, emitSize, targetReg, maskReg, embMaskOp2Reg, opt, sopt); } else if (targetReg != falseReg) { @@ -583,7 +605,7 @@ void CodeGen::genHWIntrinsic(GenTreeHWIntrinsic* node) // If the embedded instruction supports optional mask operation, use the "unpredicated" // version of the instruction, followed by "sel" to select the active lanes. GetEmitter()->emitIns_R_R_R(insEmbMask, emitSize, targetReg, embMaskOp1Reg, - embMaskOp2Reg, opt); + embMaskOp2Reg, opt, sopt); } else { @@ -598,7 +620,7 @@ void CodeGen::genHWIntrinsic(GenTreeHWIntrinsic* node) GetEmitter()->emitIns_R_R(INS_sve_movprfx, EA_SCALABLE, targetReg, embMaskOp1Reg); GetEmitter()->emitIns_R_R_R(insEmbMask, emitSize, targetReg, maskReg, embMaskOp2Reg, - opt); + opt, sopt); } GetEmitter()->emitIns_R_R_R_R(INS_sve_sel, emitSize, targetReg, maskReg, targetReg, @@ -615,13 +637,13 @@ void CodeGen::genHWIntrinsic(GenTreeHWIntrinsic* node) // Finally, perform the actual "predicated" operation so that `targetReg` is the first operand // and `embMaskOp2Reg` is the second operand. - GetEmitter()->emitIns_R_R_R(insEmbMask, emitSize, targetReg, maskReg, embMaskOp2Reg, opt); + GetEmitter()->emitIns_R_R_R(insEmbMask, emitSize, targetReg, maskReg, embMaskOp2Reg, opt, sopt); } else { // Just perform the actual "predicated" operation so that `targetReg` is the first operand // and `embMaskOp2Reg` is the second operand. - GetEmitter()->emitIns_R_R_R(insEmbMask, emitSize, targetReg, maskReg, embMaskOp2Reg, opt); + GetEmitter()->emitIns_R_R_R(insEmbMask, emitSize, targetReg, maskReg, embMaskOp2Reg, opt, sopt); } break; diff --git a/src/coreclr/jit/hwintrinsiclistarm64sve.h b/src/coreclr/jit/hwintrinsiclistarm64sve.h index 6f481fd57cb169..4230bdb75b53f3 100644 --- a/src/coreclr/jit/hwintrinsiclistarm64sve.h +++ b/src/coreclr/jit/hwintrinsiclistarm64sve.h @@ -195,6 +195,7 @@ HARDWARE_INTRINSIC(Sve, SaturatingIncrementBy8BitElementCount, HARDWARE_INTRINSIC(Sve, SaturatingIncrementByActiveElementCount, -1, 2, true, {INS_invalid, INS_sve_sqincp, INS_sve_sqincp, INS_sve_sqincp, INS_sve_sqincp, INS_sve_sqincp, INS_sve_sqincp, INS_sve_sqincp, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Scalable|HW_Flag_SpecialCodeGen|HW_Flag_SpecialImport|HW_Flag_BaseTypeFromSecondArg|HW_Flag_HasRMWSemantics) HARDWARE_INTRINSIC(Sve, Scale, -1, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sve_fscale, INS_sve_fscale}, HW_Category_SIMD, HW_Flag_Scalable|HW_Flag_BaseTypeFromFirstArg|HW_Flag_EmbeddedMaskedOperation|HW_Flag_LowMaskedOperation|HW_Flag_HasRMWSemantics) HARDWARE_INTRINSIC(Sve, ShiftLeftLogical, -1, -1, false, {INS_sve_lsl, INS_sve_lsl, INS_sve_lsl, INS_sve_lsl, INS_sve_lsl, INS_sve_lsl, INS_sve_lsl, INS_sve_lsl, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Scalable|HW_Flag_BaseTypeFromFirstArg|HW_Flag_EmbeddedMaskedOperation|HW_Flag_LowMaskedOperation|HW_Flag_HasRMWSemantics) +HARDWARE_INTRINSIC(Sve, ShiftRightArithmetic, -1, -1, false, {INS_sve_asr, INS_invalid, INS_sve_asr, INS_invalid, INS_sve_asr, INS_invalid, INS_sve_asr, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Scalable|HW_Flag_BaseTypeFromFirstArg|HW_Flag_EmbeddedMaskedOperation|HW_Flag_LowMaskedOperation|HW_Flag_HasRMWSemantics) HARDWARE_INTRINSIC(Sve, ShiftRightLogical, -1, -1, false, {INS_invalid, INS_sve_lsr, INS_invalid, INS_sve_lsr, INS_invalid, INS_sve_lsr, INS_invalid, INS_sve_lsr, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Scalable|HW_Flag_BaseTypeFromFirstArg|HW_Flag_EmbeddedMaskedOperation|HW_Flag_LowMaskedOperation|HW_Flag_HasRMWSemantics) HARDWARE_INTRINSIC(Sve, SignExtend16, -1, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sve_sxth, INS_invalid, INS_sve_sxth, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Scalable|HW_Flag_EmbeddedMaskedOperation|HW_Flag_LowMaskedOperation) HARDWARE_INTRINSIC(Sve, SignExtend32, -1, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sve_sxtw, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Scalable|HW_Flag_EmbeddedMaskedOperation|HW_Flag_LowMaskedOperation) diff --git a/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs b/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs index 5d49a5e09941c4..a6cdab8d5439c2 100644 --- a/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs +++ b/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs @@ -3740,28 +3740,28 @@ ("SveVecPairBinOpTest.template", new Dictionary { ["TestName"] = "Sve_Scale_float_int", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "Scale", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateEntry"] = "result[i] != Helpers.Scale(left[i], right[i])"}), ("SveVecPairBinOpTest.template", new Dictionary { ["TestName"] = "Sve_Scale_double_long", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "Scale", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateEntry"] = "result[i] != Helpers.Scale(left[i], right[i])"}), - // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_sbyte_byte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.ShiftLeft(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftLeft(left[i], (ulong)right[i])"}), - // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_short_ushort", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.ShiftLeft(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftLeft(left[i], (ulong)right[i])"}), - // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_int_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.ShiftLeft(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftLeft(left[i], (ulong)right[i])"}), - // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_long_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftLeft(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftLeft(left[i], (ulong)right[i])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_byte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.ShiftLeft(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftLeft(left[i], (ulong)right[i])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_ushort", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.ShiftLeft(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftLeft(left[i], (ulong)right[i])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.ShiftLeft(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftLeft(left[i], (ulong)right[i])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftLeft(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftLeft(left[i], right[i])"}), - // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_sbyte_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.LeftShift(left[i], (int)Math.Clamp(right[i], 0, int.MaxValue)) != result[i]", ["GetIterResult"] = "Helpers.LeftShift(left[i], (int)Math.Clamp(right[i], 0, int.MaxValue))"}), - // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_short_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.LeftShift(left[i], (int)Math.Clamp(right[i], 0, int.MaxValue)) != result[i]", ["GetIterResult"] = "Helpers.LeftShift(left[i], (int)Math.Clamp(right[i], 0, int.MaxValue))"}), - // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_int_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.LeftShift(left[i], (int)Math.Clamp(right[i], 0, int.MaxValue)) != result[i]", ["GetIterResult"] = "Helpers.LeftShift(left[i], (int)Math.Clamp(right[i], 0, int.MaxValue))"}), - // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_byte_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.LeftShift(left[i], (int)Math.Clamp(right[i], 0, int.MaxValue)) != result[i]", ["GetIterResult"] = "Helpers.LeftShift(left[i], (int)Math.Clamp(right[i], 0, int.MaxValue))"}), - // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_ushort_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.LeftShift(left[i], (int)Math.Clamp(right[i], 0, int.MaxValue)) != result[i]", ["GetIterResult"] = "Helpers.LeftShift(left[i], (int)Math.Clamp(right[i], 0, int.MaxValue))"}), - // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_uint_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.LeftShift(left[i], (int)Math.Clamp(right[i], 0, int.MaxValue)) != result[i]", ["GetIterResult"] = "Helpers.LeftShift(left[i], (int)Math.Clamp(right[i], 0, int.MaxValue))"}), - - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_byte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_ushort", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], right[i])"}), - // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_byte_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.RightShift(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.RightShift(left[i], right[i])"}), - // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_ushort_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.RightShift(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.RightShift(left[i], right[i])"}), - // ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_uint_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.RightShift(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.RightShift(left[i], right[i])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_sbyte_byte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "(sbyte)Helpers.ShiftLeft((byte)left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "(sbyte)Helpers.ShiftLeft((byte)left[i], (ulong)right[i])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_short_ushort", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "(short)Helpers.ShiftLeft((ushort)left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "(short)Helpers.ShiftLeft((ushort)left[i], (ulong)right[i])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_int_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "(int)Helpers.ShiftLeft((uint)left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "(int)Helpers.ShiftLeft((uint)left[i], (ulong)right[i])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_long_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "(long)Helpers.ShiftLeft((ulong)left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "(long)Helpers.ShiftLeft((ulong)left[i], (ulong)right[i])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_byte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.ShiftLeft(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftLeft(left[i], (ulong)right[i])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_ushort", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.ShiftLeft(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftLeft(left[i], (ulong)right[i])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.ShiftLeft(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftLeft(left[i], (ulong)right[i])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftLeft(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftLeft(left[i], right[i])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_sbyte_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "(sbyte)Helpers.ShiftLeft((byte)left[i], right[(i * sizeof(byte)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "(sbyte)Helpers.ShiftLeft((byte)left[i], right[(i * sizeof(byte)) / sizeof(ulong)])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_short_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "(short)Helpers.ShiftLeft((ushort)left[i], right[(i * sizeof(ushort)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "(short)Helpers.ShiftLeft((ushort)left[i], right[(i * sizeof(ushort)) / sizeof(ulong)])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_int_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "(int)Helpers.ShiftLeft((uint)left[i], right[(i * sizeof(uint)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "(int)Helpers.ShiftLeft((uint)left[i], right[(i * sizeof(uint)) / sizeof(ulong)])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_byte_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftLeft(left[i], right[(i * sizeof(byte)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftLeft(left[i], right[(i * sizeof(byte)) / sizeof(ulong)])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_ushort_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftLeft(left[i], right[(i * sizeof(ushort)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftLeft(left[i], right[(i * sizeof(ushort)) / sizeof(ulong)])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_uint_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftLeft(left[i], right[(i * sizeof(uint)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftLeft(left[i], right[(i * sizeof(uint)) / sizeof(ulong)])"}), + + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_byte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_ushort", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], right[i])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_byte_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(byte)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(byte)) / sizeof(ulong)])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_ushort_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(ushort)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(ushort)) / sizeof(ulong)])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_uint_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(uint)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(uint)) / sizeof(ulong)])"}), ("SveSimpleVecOpTest.template", new Dictionary { ["TestName"] = "Sve_SignExtend16_int", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "SignExtend16", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "result[i] != Helpers.SignExtend(firstOp[i], 16, false)", ["GetIterResult"] = "Helpers.SignExtend(leftOp[i], 16, false)"}), ("SveSimpleVecOpTest.template", new Dictionary { ["TestName"] = "Sve_SignExtend16_long", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "SignExtend16", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "result[i] != Helpers.SignExtend(firstOp[i], 16, false)", ["GetIterResult"] = "Helpers.SignExtend(leftOp[i], 16, false)"}), diff --git a/src/tests/JIT/HardwareIntrinsics/Arm/Shared/_SveBinaryOpTestTemplate.template b/src/tests/JIT/HardwareIntrinsics/Arm/Shared/_SveBinaryOpTestTemplate.template index 0a10283036e836..ab2f5672eb1980 100644 --- a/src/tests/JIT/HardwareIntrinsics/Arm/Shared/_SveBinaryOpTestTemplate.template +++ b/src/tests/JIT/HardwareIntrinsics/Arm/Shared/_SveBinaryOpTestTemplate.template @@ -8,6 +8,16 @@ * directions listed in the file. * ******************************************************************************/ +// By defining the first operand type as a symbol, we can conditionally compile +// scenarios depending on if the operand types are the same, +// avoiding the need for a new template. +// If the types are the same, the #undef will remove the symbol. +// If they aren't the same, the #undef won't do anything, +// and the first operand type symbol will remain defined. +// We can then conditionally compile on the condition #if !{Op1VectorType}{Op1BaseType}, etc. +#define {Op1VectorType}{Op1BaseType} +#undef {Op2VectorType}{Op2BaseType} + using System; using System.Linq; using System.Numerics; @@ -169,9 +179,9 @@ namespace JIT.HardwareIntrinsics.Arm private static {Op2BaseType}[] _data2 = new {Op2BaseType}[Op2ElementCount]; private {Op1VectorType}<{Op1BaseType}> _mask; + private {Op1VectorType}<{Op1BaseType}> _falseFld; private {Op1VectorType}<{Op1BaseType}> _fld1; private {Op2VectorType}<{Op2BaseType}> _fld2; - private {Op2VectorType}<{Op2BaseType}> _falseFld; private DataTable _dataTable; @@ -182,10 +192,11 @@ namespace JIT.HardwareIntrinsics.Arm for (var i = 0; i < Op1ElementCount; i++) { _maskData[i] = ({Op1BaseType})({NextValueOp1} % 2); } Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref _mask), ref Unsafe.As<{Op1BaseType}, byte>(ref _maskData[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref _falseFld), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref _fld1), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = {NextValueOp2}; } Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2VectorType}<{Op2BaseType}>, byte>(ref _fld2), ref Unsafe.As<{Op2BaseType}, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2VectorType}<{Op2BaseType}>, byte>(ref _falseFld), ref Unsafe.As<{Op2BaseType}, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = {NextValueOp2}; } @@ -211,6 +222,7 @@ namespace JIT.HardwareIntrinsics.Arm public void RunBasicScenario_Load() { +#if !{Op1VectorType}{Op1BaseType} TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); {Op1VectorType}<{Op1BaseType}> loadMask = Sve.CreateTrueMask{RetBaseType}(SveMaskPattern.All); @@ -222,6 +234,7 @@ namespace JIT.HardwareIntrinsics.Arm Unsafe.Write(_dataTable.outArrayPtr, result); ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); +#endif } public void RunReflectionScenario_UnsafeRead() @@ -293,6 +306,7 @@ namespace JIT.HardwareIntrinsics.Arm public void ConditionalSelect_Op2() { +#if !{Op1VectorType}{Op1BaseType} TestLibrary.TestFramework.BeginScenario("ConditionalSelect_Op2_mask"); ConditionalSelectScenario(_mask, _fld1, _fld2, _fld2); @@ -301,6 +315,7 @@ namespace JIT.HardwareIntrinsics.Arm TestLibrary.TestFramework.BeginScenario("ConditionalSelect_Op2_all"); ConditionalSelectScenario({Op1VectorType}<{Op1BaseType}>.AllBitsSet, _fld1, _fld2, _fld2); +#endif } public void ConditionalSelect_FalseOp() @@ -328,7 +343,7 @@ namespace JIT.HardwareIntrinsics.Arm } [method: MethodImpl(MethodImplOptions.AggressiveInlining)] - private void ConditionalSelectScenario({Op1VectorType}<{Op1BaseType}> mask, {Op1VectorType}<{Op1BaseType}> op1, {Op1VectorType}<{Op1BaseType}> op2, {Op1VectorType}<{Op1BaseType}> falseOp) + private void ConditionalSelectScenario({Op1VectorType}<{Op1BaseType}> mask, {Op1VectorType}<{Op1BaseType}> op1, {Op2VectorType}<{Op2BaseType}> op2, {Op1VectorType}<{Op1BaseType}> falseOp) { var result = Sve.ConditionalSelect(mask, {Isa}.{Method}(op1, op2), falseOp); @@ -357,17 +372,17 @@ namespace JIT.HardwareIntrinsics.Arm } } - private void ValidateConditionalSelectResult({Op1VectorType}<{Op1BaseType}> maskOp, {Op1VectorType}<{Op1BaseType}> leftOp, {Op1VectorType}<{Op1BaseType}> rightOp, {Op1VectorType}<{Op1BaseType}> falseOp, void* output, [CallerMemberName] string method = "") + private void ValidateConditionalSelectResult({Op1VectorType}<{Op1BaseType}> maskOp, {Op1VectorType}<{Op1BaseType}> leftOp, {Op2VectorType}<{Op2BaseType}> rightOp, {Op1VectorType}<{Op1BaseType}> falseOp, void* output, [CallerMemberName] string method = "") { {Op1BaseType}[] mask = new {Op1BaseType}[Op1ElementCount]; {Op1BaseType}[] left = new {Op1BaseType}[Op1ElementCount]; - {Op1BaseType}[] right = new {Op1BaseType}[Op1ElementCount]; + {Op2BaseType}[] right = new {Op2BaseType}[Op2ElementCount]; {Op1BaseType}[] falseVal = new {Op1BaseType}[Op1ElementCount]; {RetBaseType}[] result = new {RetBaseType}[RetElementCount]; Unsafe.WriteUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref mask[0]), maskOp); Unsafe.WriteUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref left[0]), leftOp); - Unsafe.WriteUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref right[0]), rightOp); + Unsafe.WriteUnaligned(ref Unsafe.As<{Op2BaseType}, byte>(ref right[0]), rightOp); Unsafe.WriteUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref falseVal[0]), falseOp); Unsafe.CopyBlockUnaligned(ref Unsafe.As<{RetBaseType}, byte>(ref result[0]), ref Unsafe.AsRef(output), (uint)Unsafe.SizeOf<{RetVectorType}<{RetBaseType}>>()); From 53d8baf5197af6400c17c55f4ac00fdd5d588ea9 Mon Sep 17 00:00:00 2001 From: "Aman Khalid (from Dev Box)" Date: Thu, 27 Jun 2024 12:53:31 -0400 Subject: [PATCH 04/11] Style --- .../GenerateHWIntrinsicTests_Arm.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs b/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs index a6cdab8d5439c2..9d5ef9ae184891 100644 --- a/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs +++ b/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs @@ -3755,13 +3755,13 @@ ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_ushort_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftLeft(left[i], right[(i * sizeof(ushort)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftLeft(left[i], right[(i * sizeof(ushort)) / sizeof(ulong)])"}), ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_uint_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftLeft(left[i], right[(i * sizeof(uint)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftLeft(left[i], right[(i * sizeof(uint)) / sizeof(ulong)])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_byte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_ushort", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], right[i])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_byte_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(byte)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(byte)) / sizeof(ulong)])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_ushort_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(ushort)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(ushort)) / sizeof(ulong)])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_uint_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(uint)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(uint)) / sizeof(ulong)])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_byte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_ushort", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], right[i])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_byte_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(byte)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(byte)) / sizeof(ulong)])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_ushort_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(ushort)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(ushort)) / sizeof(ulong)])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_uint_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(uint)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(uint)) / sizeof(ulong)])"}), ("SveSimpleVecOpTest.template", new Dictionary { ["TestName"] = "Sve_SignExtend16_int", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "SignExtend16", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "result[i] != Helpers.SignExtend(firstOp[i], 16, false)", ["GetIterResult"] = "Helpers.SignExtend(leftOp[i], 16, false)"}), ("SveSimpleVecOpTest.template", new Dictionary { ["TestName"] = "Sve_SignExtend16_long", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "SignExtend16", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "result[i] != Helpers.SignExtend(firstOp[i], 16, false)", ["GetIterResult"] = "Helpers.SignExtend(leftOp[i], 16, false)"}), From 6183309678f99b3c40d9663e9748b4a7e8492efb Mon Sep 17 00:00:00 2001 From: "Aman Khalid (from Dev Box)" Date: Thu, 27 Jun 2024 15:18:02 -0400 Subject: [PATCH 05/11] Add ShiftRightArithmetic --- .../GenerateHWIntrinsicTests_Arm.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs b/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs index 9d5ef9ae184891..de2703b9494793 100644 --- a/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs +++ b/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs @@ -3755,6 +3755,14 @@ ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_ushort_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftLeft(left[i], right[(i * sizeof(ushort)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftLeft(left[i], right[(i * sizeof(ushort)) / sizeof(ulong)])"}), ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_uint_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftLeft(left[i], right[(i * sizeof(uint)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftLeft(left[i], right[(i * sizeof(uint)) / sizeof(ulong)])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightArithmetic_sbyte_byte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightArithmetic_short_ushort", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightArithmetic_int_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightArithmetic_long_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], right[i])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightArithmetic_sbyte_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(sbyte)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(sbyte)) / sizeof(ulong)])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightArithmetic_short_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(short)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(short)) / sizeof(ulong)])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightArithmetic_int_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(int)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(int)) / sizeof(ulong)])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_byte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i])"}), ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_ushort", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i])"}), ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i])"}), From ff37d83f36d740b5a3ed8394562a67011de96236 Mon Sep 17 00:00:00 2001 From: "Aman Khalid (from Dev Box)" Date: Thu, 27 Jun 2024 15:25:46 -0400 Subject: [PATCH 06/11] Remove ShiftRightArithmeticForDivide --- .../Arm/Sve.PlatformNotSupported.cs | 39 ------------------- .../src/System/Runtime/Intrinsics/Arm/Sve.cs | 39 ------------------- .../ref/System.Runtime.Intrinsics.cs | 4 -- 3 files changed, 82 deletions(-) diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve.PlatformNotSupported.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve.PlatformNotSupported.cs index 5f67e19cd0b52a..c537bacb98df8e 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve.PlatformNotSupported.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve.PlatformNotSupported.cs @@ -5693,45 +5693,6 @@ internal Arm64() { } public static unsafe Vector ShiftRightArithmetic(Vector left, Vector right) { throw new PlatformNotSupportedException(); } - /// Arithmetic shift right for divide by immediate - - /// - /// svint16_t svasrd[_n_s16]_m(svbool_t pg, svint16_t op1, uint64_t imm2) - /// ASRD Ztied1.H, Pg/M, Ztied1.H, #imm2 - /// svint16_t svasrd[_n_s16]_x(svbool_t pg, svint16_t op1, uint64_t imm2) - /// ASRD Ztied1.H, Pg/M, Ztied1.H, #imm2 - /// svint16_t svasrd[_n_s16]_z(svbool_t pg, svint16_t op1, uint64_t imm2) - /// - public static unsafe Vector ShiftRightArithmeticForDivide(Vector value, [ConstantExpected] byte control) { throw new PlatformNotSupportedException(); } - - /// - /// svint32_t svasrd[_n_s32]_m(svbool_t pg, svint32_t op1, uint64_t imm2) - /// ASRD Ztied1.S, Pg/M, Ztied1.S, #imm2 - /// svint32_t svasrd[_n_s32]_x(svbool_t pg, svint32_t op1, uint64_t imm2) - /// ASRD Ztied1.S, Pg/M, Ztied1.S, #imm2 - /// svint32_t svasrd[_n_s32]_z(svbool_t pg, svint32_t op1, uint64_t imm2) - /// - public static unsafe Vector ShiftRightArithmeticForDivide(Vector value, [ConstantExpected] byte control) { throw new PlatformNotSupportedException(); } - - /// - /// svint64_t svasrd[_n_s64]_m(svbool_t pg, svint64_t op1, uint64_t imm2) - /// ASRD Ztied1.D, Pg/M, Ztied1.D, #imm2 - /// svint64_t svasrd[_n_s64]_x(svbool_t pg, svint64_t op1, uint64_t imm2) - /// ASRD Ztied1.D, Pg/M, Ztied1.D, #imm2 - /// svint64_t svasrd[_n_s64]_z(svbool_t pg, svint64_t op1, uint64_t imm2) - /// - public static unsafe Vector ShiftRightArithmeticForDivide(Vector value, [ConstantExpected] byte control) { throw new PlatformNotSupportedException(); } - - /// - /// svint8_t svasrd[_n_s8]_m(svbool_t pg, svint8_t op1, uint64_t imm2) - /// ASRD Ztied1.B, Pg/M, Ztied1.B, #imm2 - /// svint8_t svasrd[_n_s8]_x(svbool_t pg, svint8_t op1, uint64_t imm2) - /// ASRD Ztied1.B, Pg/M, Ztied1.B, #imm2 - /// svint8_t svasrd[_n_s8]_z(svbool_t pg, svint8_t op1, uint64_t imm2) - /// - public static unsafe Vector ShiftRightArithmeticForDivide(Vector value, [ConstantExpected] byte control) { throw new PlatformNotSupportedException(); } - - /// Logical shift right /// diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve.cs index b40486abcdaffe..90d47edac344dd 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve.cs @@ -5736,45 +5736,6 @@ internal Arm64() { } public static unsafe Vector ShiftRightArithmetic(Vector left, Vector right) => ShiftRightArithmetic(left, right); - /// Arithmetic shift right for divide by immediate - - /// - /// svint16_t svasrd[_n_s16]_m(svbool_t pg, svint16_t op1, uint64_t imm2) - /// ASRD Ztied1.H, Pg/M, Ztied1.H, #imm2 - /// svint16_t svasrd[_n_s16]_x(svbool_t pg, svint16_t op1, uint64_t imm2) - /// ASRD Ztied1.H, Pg/M, Ztied1.H, #imm2 - /// svint16_t svasrd[_n_s16]_z(svbool_t pg, svint16_t op1, uint64_t imm2) - /// - public static unsafe Vector ShiftRightArithmeticForDivide(Vector value, [ConstantExpected] byte control) => ShiftRightArithmeticForDivide(value, control); - - /// - /// svint32_t svasrd[_n_s32]_m(svbool_t pg, svint32_t op1, uint64_t imm2) - /// ASRD Ztied1.S, Pg/M, Ztied1.S, #imm2 - /// svint32_t svasrd[_n_s32]_x(svbool_t pg, svint32_t op1, uint64_t imm2) - /// ASRD Ztied1.S, Pg/M, Ztied1.S, #imm2 - /// svint32_t svasrd[_n_s32]_z(svbool_t pg, svint32_t op1, uint64_t imm2) - /// - public static unsafe Vector ShiftRightArithmeticForDivide(Vector value, [ConstantExpected] byte control) => ShiftRightArithmeticForDivide(value, control); - - /// - /// svint64_t svasrd[_n_s64]_m(svbool_t pg, svint64_t op1, uint64_t imm2) - /// ASRD Ztied1.D, Pg/M, Ztied1.D, #imm2 - /// svint64_t svasrd[_n_s64]_x(svbool_t pg, svint64_t op1, uint64_t imm2) - /// ASRD Ztied1.D, Pg/M, Ztied1.D, #imm2 - /// svint64_t svasrd[_n_s64]_z(svbool_t pg, svint64_t op1, uint64_t imm2) - /// - public static unsafe Vector ShiftRightArithmeticForDivide(Vector value, [ConstantExpected] byte control) => ShiftRightArithmeticForDivide(value, control); - - /// - /// svint8_t svasrd[_n_s8]_m(svbool_t pg, svint8_t op1, uint64_t imm2) - /// ASRD Ztied1.B, Pg/M, Ztied1.B, #imm2 - /// svint8_t svasrd[_n_s8]_x(svbool_t pg, svint8_t op1, uint64_t imm2) - /// ASRD Ztied1.B, Pg/M, Ztied1.B, #imm2 - /// svint8_t svasrd[_n_s8]_z(svbool_t pg, svint8_t op1, uint64_t imm2) - /// - public static unsafe Vector ShiftRightArithmeticForDivide(Vector value, [ConstantExpected] byte control) => ShiftRightArithmeticForDivide(value, control); - - /// Logical shift right /// diff --git a/src/libraries/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.cs b/src/libraries/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.cs index ee5df6eba6af62..c2df822cbf0d3d 100644 --- a/src/libraries/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.cs +++ b/src/libraries/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.cs @@ -5007,10 +5007,6 @@ internal Arm64() { } public static System.Numerics.Vector ShiftRightArithmetic(System.Numerics.Vector left, System.Numerics.Vector right) { throw null; } public static System.Numerics.Vector ShiftRightArithmetic(System.Numerics.Vector left, System.Numerics.Vector right) { throw null; } public static System.Numerics.Vector ShiftRightArithmetic(System.Numerics.Vector left, System.Numerics.Vector right) { throw null; } - public static System.Numerics.Vector ShiftRightArithmeticForDivide(System.Numerics.Vector value, [ConstantExpected] byte control) { throw null; } - public static System.Numerics.Vector ShiftRightArithmeticForDivide(System.Numerics.Vector value, [ConstantExpected] byte control) { throw null; } - public static System.Numerics.Vector ShiftRightArithmeticForDivide(System.Numerics.Vector value, [ConstantExpected] byte control) { throw null; } - public static System.Numerics.Vector ShiftRightArithmeticForDivide(System.Numerics.Vector value, [ConstantExpected] byte control) { throw null; } public static System.Numerics.Vector ShiftRightLogical(System.Numerics.Vector left, System.Numerics.Vector right) { throw null; } public static System.Numerics.Vector ShiftRightLogical(System.Numerics.Vector left, System.Numerics.Vector right) { throw null; } public static System.Numerics.Vector ShiftRightLogical(System.Numerics.Vector left, System.Numerics.Vector right) { throw null; } From 382c8d3bac786b2b36b2439b7dba8a2468938817 Mon Sep 17 00:00:00 2001 From: "Aman Khalid (from Dev Box)" Date: Thu, 27 Jun 2024 16:02:43 -0400 Subject: [PATCH 07/11] Add fallthrough annotation --- src/coreclr/jit/hwintrinsiccodegenarm64.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/coreclr/jit/hwintrinsiccodegenarm64.cpp b/src/coreclr/jit/hwintrinsiccodegenarm64.cpp index 0584bd84070203..6d782ef8754afb 100644 --- a/src/coreclr/jit/hwintrinsiccodegenarm64.cpp +++ b/src/coreclr/jit/hwintrinsiccodegenarm64.cpp @@ -573,6 +573,8 @@ void CodeGen::genHWIntrinsic(GenTreeHWIntrinsic* node) sopt = INS_SCALABLE_OPTS_WIDE; break; } + + FALLTHROUGH; } default: From af1461e486d200dccf591893b6fd7d9fed43de2e Mon Sep 17 00:00:00 2001 From: "Aman Khalid (from Dev Box)" Date: Thu, 27 Jun 2024 17:58:00 -0400 Subject: [PATCH 08/11] Align test templates --- .../GenerateHWIntrinsicTests_Arm.cs | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs b/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs index de2703b9494793..aa74e4f3eafb0b 100644 --- a/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs +++ b/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs @@ -3755,21 +3755,21 @@ ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_ushort_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftLeft(left[i], right[(i * sizeof(ushort)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftLeft(left[i], right[(i * sizeof(ushort)) / sizeof(ulong)])"}), ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_uint_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftLeft(left[i], right[(i * sizeof(uint)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftLeft(left[i], right[(i * sizeof(uint)) / sizeof(ulong)])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightArithmetic_sbyte_byte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightArithmetic_short_ushort", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightArithmetic_int_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightArithmetic_long_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], right[i])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightArithmetic_sbyte_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(sbyte)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(sbyte)) / sizeof(ulong)])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightArithmetic_short_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(short)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(short)) / sizeof(ulong)])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightArithmetic_int_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(int)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(int)) / sizeof(ulong)])"}), - - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_byte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_ushort", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], right[i])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_byte_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(byte)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(byte)) / sizeof(ulong)])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_ushort_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(ushort)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(ushort)) / sizeof(ulong)])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_uint_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(uint)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(uint)) / sizeof(ulong)])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightArithmetic_sbyte_byte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightArithmetic_short_ushort", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightArithmetic_int_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightArithmetic_long_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], right[i])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightArithmetic_sbyte_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(sbyte)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(sbyte)) / sizeof(ulong)])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightArithmetic_short_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(short)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(short)) / sizeof(ulong)])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightArithmetic_int_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(int)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(int)) / sizeof(ulong)])"}), + + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_byte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_ushort", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], right[i])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_byte_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(byte)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(byte)) / sizeof(ulong)])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_ushort_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(ushort)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(ushort)) / sizeof(ulong)])"}), + ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_uint_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(uint)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(uint)) / sizeof(ulong)])"}), ("SveSimpleVecOpTest.template", new Dictionary { ["TestName"] = "Sve_SignExtend16_int", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "SignExtend16", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "result[i] != Helpers.SignExtend(firstOp[i], 16, false)", ["GetIterResult"] = "Helpers.SignExtend(leftOp[i], 16, false)"}), ("SveSimpleVecOpTest.template", new Dictionary { ["TestName"] = "Sve_SignExtend16_long", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "SignExtend16", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "result[i] != Helpers.SignExtend(firstOp[i], 16, false)", ["GetIterResult"] = "Helpers.SignExtend(leftOp[i], 16, false)"}), From 843dcde2bf6e0dfea488e809a9f908e2e30392aa Mon Sep 17 00:00:00 2001 From: "Aman Khalid (from Dev Box)" Date: Fri, 28 Jun 2024 09:46:48 -0400 Subject: [PATCH 09/11] Update doc comments --- .../Intrinsics/Arm/Sve.PlatformNotSupported.cs | 16 ---------------- .../src/System/Runtime/Intrinsics/Arm/Sve.cs | 16 ---------------- 2 files changed, 32 deletions(-) diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve.PlatformNotSupported.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve.PlatformNotSupported.cs index c537bacb98df8e..f7c9960b7765a6 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve.PlatformNotSupported.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve.PlatformNotSupported.cs @@ -5484,7 +5484,6 @@ internal Arm64() { } /// LSL Ztied1.B, Pg/M, Ztied1.B, Zop2.B /// svuint8_t svlsl[_u8]_x(svbool_t pg, svuint8_t op1, svuint8_t op2) /// LSL Ztied1.B, Pg/M, Ztied1.B, Zop2.B - /// LSLR Ztied2.B, Pg/M, Ztied2.B, Zop1.B /// svuint8_t svlsl[_u8]_z(svbool_t pg, svuint8_t op1, svuint8_t op2) /// public static unsafe Vector ShiftLeftLogical(Vector left, Vector right) { throw new PlatformNotSupportedException(); } @@ -5504,7 +5503,6 @@ internal Arm64() { } /// LSL Ztied1.H, Pg/M, Ztied1.H, Zop2.H /// svint16_t svlsl[_s16]_x(svbool_t pg, svint16_t op1, svuint16_t op2) /// LSL Ztied1.H, Pg/M, Ztied1.H, Zop2.H - /// LSLR Ztied2.H, Pg/M, Ztied2.H, Zop1.H /// svint16_t svlsl[_s16]_z(svbool_t pg, svint16_t op1, svuint16_t op2) /// public static unsafe Vector ShiftLeftLogical(Vector left, Vector right) { throw new PlatformNotSupportedException(); } @@ -5524,7 +5522,6 @@ internal Arm64() { } /// LSL Ztied1.S, Pg/M, Ztied1.S, Zop2.S /// svint32_t svlsl[_s32]_x(svbool_t pg, svint32_t op1, svuint32_t op2) /// LSL Ztied1.S, Pg/M, Ztied1.S, Zop2.S - /// LSLR Ztied2.S, Pg/M, Ztied2.S, Zop1.S /// svint32_t svlsl[_s32]_z(svbool_t pg, svint32_t op1, svuint32_t op2) /// public static unsafe Vector ShiftLeftLogical(Vector left, Vector right) { throw new PlatformNotSupportedException(); } @@ -5544,7 +5541,6 @@ internal Arm64() { } /// LSL Ztied1.D, Pg/M, Ztied1.D, Zop2.D /// svint64_t svlsl[_s64]_x(svbool_t pg, svint64_t op1, svuint64_t op2) /// LSL Ztied1.D, Pg/M, Ztied1.D, Zop2.D - /// LSLR Ztied2.D, Pg/M, Ztied2.D, Zop1.D /// svint64_t svlsl[_s64]_z(svbool_t pg, svint64_t op1, svuint64_t op2) /// public static unsafe Vector ShiftLeftLogical(Vector left, Vector right) { throw new PlatformNotSupportedException(); } @@ -5554,7 +5550,6 @@ internal Arm64() { } /// LSL Ztied1.B, Pg/M, Ztied1.B, Zop2.B /// svint8_t svlsl[_s8]_x(svbool_t pg, svint8_t op1, svuint8_t op2) /// LSL Ztied1.B, Pg/M, Ztied1.B, Zop2.B - /// LSLR Ztied2.B, Pg/M, Ztied2.B, Zop1.B /// svint8_t svlsl[_s8]_z(svbool_t pg, svint8_t op1, svuint8_t op2) /// public static unsafe Vector ShiftLeftLogical(Vector left, Vector right) { throw new PlatformNotSupportedException(); } @@ -5574,7 +5569,6 @@ internal Arm64() { } /// LSL Ztied1.H, Pg/M, Ztied1.H, Zop2.H /// svuint16_t svlsl[_u16]_x(svbool_t pg, svuint16_t op1, svuint16_t op2) /// LSL Ztied1.H, Pg/M, Ztied1.H, Zop2.H - /// LSLR Ztied2.H, Pg/M, Ztied2.H, Zop1.H /// svuint16_t svlsl[_u16]_z(svbool_t pg, svuint16_t op1, svuint16_t op2) /// public static unsafe Vector ShiftLeftLogical(Vector left, Vector right) { throw new PlatformNotSupportedException(); } @@ -5594,7 +5588,6 @@ internal Arm64() { } /// LSL Ztied1.S, Pg/M, Ztied1.S, Zop2.S /// svuint32_t svlsl[_u32]_x(svbool_t pg, svuint32_t op1, svuint32_t op2) /// LSL Ztied1.S, Pg/M, Ztied1.S, Zop2.S - /// LSLR Ztied2.S, Pg/M, Ztied2.S, Zop1.S /// svuint32_t svlsl[_u32]_z(svbool_t pg, svuint32_t op1, svuint32_t op2) /// public static unsafe Vector ShiftLeftLogical(Vector left, Vector right) { throw new PlatformNotSupportedException(); } @@ -5614,7 +5607,6 @@ internal Arm64() { } /// LSL Ztied1.D, Pg/M, Ztied1.D, Zop2.D /// svuint64_t svlsl[_u64]_x(svbool_t pg, svuint64_t op1, svuint64_t op2) /// LSL Ztied1.D, Pg/M, Ztied1.D, Zop2.D - /// LSLR Ztied2.D, Pg/M, Ztied2.D, Zop1.D /// svuint64_t svlsl[_u64]_z(svbool_t pg, svuint64_t op1, svuint64_t op2) /// public static unsafe Vector ShiftLeftLogical(Vector left, Vector right) { throw new PlatformNotSupportedException(); } @@ -5627,7 +5619,6 @@ internal Arm64() { } /// ASR Ztied1.H, Pg/M, Ztied1.H, Zop2.H /// svint16_t svasr[_s16]_x(svbool_t pg, svint16_t op1, svuint16_t op2) /// ASR Ztied1.H, Pg/M, Ztied1.H, Zop2.H - /// ASRR Ztied2.H, Pg/M, Ztied2.H, Zop1.H /// svint16_t svasr[_s16]_z(svbool_t pg, svint16_t op1, svuint16_t op2) /// public static unsafe Vector ShiftRightArithmetic(Vector left, Vector right) { throw new PlatformNotSupportedException(); } @@ -5647,7 +5638,6 @@ internal Arm64() { } /// ASR Ztied1.S, Pg/M, Ztied1.S, Zop2.S /// svint32_t svasr[_s32]_x(svbool_t pg, svint32_t op1, svuint32_t op2) /// ASR Ztied1.S, Pg/M, Ztied1.S, Zop2.S - /// ASRR Ztied2.S, Pg/M, Ztied2.S, Zop1.S /// svint32_t svasr[_s32]_z(svbool_t pg, svint32_t op1, svuint32_t op2) /// public static unsafe Vector ShiftRightArithmetic(Vector left, Vector right) { throw new PlatformNotSupportedException(); } @@ -5667,7 +5657,6 @@ internal Arm64() { } /// ASR Ztied1.D, Pg/M, Ztied1.D, Zop2.D /// svint64_t svasr[_s64]_x(svbool_t pg, svint64_t op1, svuint64_t op2) /// ASR Ztied1.D, Pg/M, Ztied1.D, Zop2.D - /// ASRR Ztied2.D, Pg/M, Ztied2.D, Zop1.D /// svint64_t svasr[_s64]_z(svbool_t pg, svint64_t op1, svuint64_t op2) /// public static unsafe Vector ShiftRightArithmetic(Vector left, Vector right) { throw new PlatformNotSupportedException(); } @@ -5677,7 +5666,6 @@ internal Arm64() { } /// ASR Ztied1.B, Pg/M, Ztied1.B, Zop2.B /// svint8_t svasr[_s8]_x(svbool_t pg, svint8_t op1, svuint8_t op2) /// ASR Ztied1.B, Pg/M, Ztied1.B, Zop2.B - /// ASRR Ztied2.B, Pg/M, Ztied2.B, Zop1.B /// svint8_t svasr[_s8]_z(svbool_t pg, svint8_t op1, svuint8_t op2) /// public static unsafe Vector ShiftRightArithmetic(Vector left, Vector right) { throw new PlatformNotSupportedException(); } @@ -5700,7 +5688,6 @@ internal Arm64() { } /// LSR Ztied1.B, Pg/M, Ztied1.B, Zop2.B /// svuint8_t svlsr[_u8]_x(svbool_t pg, svuint8_t op1, svuint8_t op2) /// LSR Ztied1.B, Pg/M, Ztied1.B, Zop2.B - /// LSRR Ztied2.B, Pg/M, Ztied2.B, Zop1.B /// svuint8_t svlsr[_u8]_z(svbool_t pg, svuint8_t op1, svuint8_t op2) /// public static unsafe Vector ShiftRightLogical(Vector left, Vector right) { throw new PlatformNotSupportedException(); } @@ -5720,7 +5707,6 @@ internal Arm64() { } /// LSR Ztied1.H, Pg/M, Ztied1.H, Zop2.H /// svuint16_t svlsr[_u16]_x(svbool_t pg, svuint16_t op1, svuint16_t op2) /// LSR Ztied1.H, Pg/M, Ztied1.H, Zop2.H - /// LSRR Ztied2.H, Pg/M, Ztied2.H, Zop1.H /// svuint16_t svlsr[_u16]_z(svbool_t pg, svuint16_t op1, svuint16_t op2) /// public static unsafe Vector ShiftRightLogical(Vector left, Vector right) { throw new PlatformNotSupportedException(); } @@ -5740,7 +5726,6 @@ internal Arm64() { } /// LSR Ztied1.S, Pg/M, Ztied1.S, Zop2.S /// svuint32_t svlsr[_u32]_x(svbool_t pg, svuint32_t op1, svuint32_t op2) /// LSR Ztied1.S, Pg/M, Ztied1.S, Zop2.S - /// LSRR Ztied2.S, Pg/M, Ztied2.S, Zop1.S /// svuint32_t svlsr[_u32]_z(svbool_t pg, svuint32_t op1, svuint32_t op2) /// public static unsafe Vector ShiftRightLogical(Vector left, Vector right) { throw new PlatformNotSupportedException(); } @@ -5760,7 +5745,6 @@ internal Arm64() { } /// LSR Ztied1.D, Pg/M, Ztied1.D, Zop2.D /// svuint64_t svlsr[_u64]_x(svbool_t pg, svuint64_t op1, svuint64_t op2) /// LSR Ztied1.D, Pg/M, Ztied1.D, Zop2.D - /// LSRR Ztied2.D, Pg/M, Ztied2.D, Zop1.D /// svuint64_t svlsr[_u64]_z(svbool_t pg, svuint64_t op1, svuint64_t op2) /// public static unsafe Vector ShiftRightLogical(Vector left, Vector right) { throw new PlatformNotSupportedException(); } diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve.cs index 90d47edac344dd..c3da20eea5788a 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve.cs @@ -5527,7 +5527,6 @@ internal Arm64() { } /// LSL Ztied1.B, Pg/M, Ztied1.B, Zop2.B /// svuint8_t svlsl[_u8]_x(svbool_t pg, svuint8_t op1, svuint8_t op2) /// LSL Ztied1.B, Pg/M, Ztied1.B, Zop2.B - /// LSLR Ztied2.B, Pg/M, Ztied2.B, Zop1.B /// svuint8_t svlsl[_u8]_z(svbool_t pg, svuint8_t op1, svuint8_t op2) /// public static unsafe Vector ShiftLeftLogical(Vector left, Vector right) => ShiftLeftLogical(left, right); @@ -5547,7 +5546,6 @@ internal Arm64() { } /// LSL Ztied1.H, Pg/M, Ztied1.H, Zop2.H /// svint16_t svlsl[_s16]_x(svbool_t pg, svint16_t op1, svuint16_t op2) /// LSL Ztied1.H, Pg/M, Ztied1.H, Zop2.H - /// LSLR Ztied2.H, Pg/M, Ztied2.H, Zop1.H /// svint16_t svlsl[_s16]_z(svbool_t pg, svint16_t op1, svuint16_t op2) /// public static unsafe Vector ShiftLeftLogical(Vector left, Vector right) => ShiftLeftLogical(left, right); @@ -5567,7 +5565,6 @@ internal Arm64() { } /// LSL Ztied1.S, Pg/M, Ztied1.S, Zop2.S /// svint32_t svlsl[_s32]_x(svbool_t pg, svint32_t op1, svuint32_t op2) /// LSL Ztied1.S, Pg/M, Ztied1.S, Zop2.S - /// LSLR Ztied2.S, Pg/M, Ztied2.S, Zop1.S /// svint32_t svlsl[_s32]_z(svbool_t pg, svint32_t op1, svuint32_t op2) /// public static unsafe Vector ShiftLeftLogical(Vector left, Vector right) => ShiftLeftLogical(left, right); @@ -5587,7 +5584,6 @@ internal Arm64() { } /// LSL Ztied1.D, Pg/M, Ztied1.D, Zop2.D /// svint64_t svlsl[_s64]_x(svbool_t pg, svint64_t op1, svuint64_t op2) /// LSL Ztied1.D, Pg/M, Ztied1.D, Zop2.D - /// LSLR Ztied2.D, Pg/M, Ztied2.D, Zop1.D /// svint64_t svlsl[_s64]_z(svbool_t pg, svint64_t op1, svuint64_t op2) /// public static unsafe Vector ShiftLeftLogical(Vector left, Vector right) => ShiftLeftLogical(left, right); @@ -5597,7 +5593,6 @@ internal Arm64() { } /// LSL Ztied1.B, Pg/M, Ztied1.B, Zop2.B /// svint8_t svlsl[_s8]_x(svbool_t pg, svint8_t op1, svuint8_t op2) /// LSL Ztied1.B, Pg/M, Ztied1.B, Zop2.B - /// LSLR Ztied2.B, Pg/M, Ztied2.B, Zop1.B /// svint8_t svlsl[_s8]_z(svbool_t pg, svint8_t op1, svuint8_t op2) /// public static unsafe Vector ShiftLeftLogical(Vector left, Vector right) => ShiftLeftLogical(left, right); @@ -5617,7 +5612,6 @@ internal Arm64() { } /// LSL Ztied1.H, Pg/M, Ztied1.H, Zop2.H /// svuint16_t svlsl[_u16]_x(svbool_t pg, svuint16_t op1, svuint16_t op2) /// LSL Ztied1.H, Pg/M, Ztied1.H, Zop2.H - /// LSLR Ztied2.H, Pg/M, Ztied2.H, Zop1.H /// svuint16_t svlsl[_u16]_z(svbool_t pg, svuint16_t op1, svuint16_t op2) /// public static unsafe Vector ShiftLeftLogical(Vector left, Vector right) => ShiftLeftLogical(left, right); @@ -5637,7 +5631,6 @@ internal Arm64() { } /// LSL Ztied1.S, Pg/M, Ztied1.S, Zop2.S /// svuint32_t svlsl[_u32]_x(svbool_t pg, svuint32_t op1, svuint32_t op2) /// LSL Ztied1.S, Pg/M, Ztied1.S, Zop2.S - /// LSLR Ztied2.S, Pg/M, Ztied2.S, Zop1.S /// svuint32_t svlsl[_u32]_z(svbool_t pg, svuint32_t op1, svuint32_t op2) /// public static unsafe Vector ShiftLeftLogical(Vector left, Vector right) => ShiftLeftLogical(left, right); @@ -5657,7 +5650,6 @@ internal Arm64() { } /// LSL Ztied1.D, Pg/M, Ztied1.D, Zop2.D /// svuint64_t svlsl[_u64]_x(svbool_t pg, svuint64_t op1, svuint64_t op2) /// LSL Ztied1.D, Pg/M, Ztied1.D, Zop2.D - /// LSLR Ztied2.D, Pg/M, Ztied2.D, Zop1.D /// svuint64_t svlsl[_u64]_z(svbool_t pg, svuint64_t op1, svuint64_t op2) /// public static unsafe Vector ShiftLeftLogical(Vector left, Vector right) => ShiftLeftLogical(left, right); @@ -5670,7 +5662,6 @@ internal Arm64() { } /// ASR Ztied1.H, Pg/M, Ztied1.H, Zop2.H /// svint16_t svasr[_s16]_x(svbool_t pg, svint16_t op1, svuint16_t op2) /// ASR Ztied1.H, Pg/M, Ztied1.H, Zop2.H - /// ASRR Ztied2.H, Pg/M, Ztied2.H, Zop1.H /// svint16_t svasr[_s16]_z(svbool_t pg, svint16_t op1, svuint16_t op2) /// public static unsafe Vector ShiftRightArithmetic(Vector left, Vector right) => ShiftRightArithmetic(left, right); @@ -5690,7 +5681,6 @@ internal Arm64() { } /// ASR Ztied1.S, Pg/M, Ztied1.S, Zop2.S /// svint32_t svasr[_s32]_x(svbool_t pg, svint32_t op1, svuint32_t op2) /// ASR Ztied1.S, Pg/M, Ztied1.S, Zop2.S - /// ASRR Ztied2.S, Pg/M, Ztied2.S, Zop1.S /// svint32_t svasr[_s32]_z(svbool_t pg, svint32_t op1, svuint32_t op2) /// public static unsafe Vector ShiftRightArithmetic(Vector left, Vector right) => ShiftRightArithmetic(left, right); @@ -5710,7 +5700,6 @@ internal Arm64() { } /// ASR Ztied1.D, Pg/M, Ztied1.D, Zop2.D /// svint64_t svasr[_s64]_x(svbool_t pg, svint64_t op1, svuint64_t op2) /// ASR Ztied1.D, Pg/M, Ztied1.D, Zop2.D - /// ASRR Ztied2.D, Pg/M, Ztied2.D, Zop1.D /// svint64_t svasr[_s64]_z(svbool_t pg, svint64_t op1, svuint64_t op2) /// public static unsafe Vector ShiftRightArithmetic(Vector left, Vector right) => ShiftRightArithmetic(left, right); @@ -5720,7 +5709,6 @@ internal Arm64() { } /// ASR Ztied1.B, Pg/M, Ztied1.B, Zop2.B /// svint8_t svasr[_s8]_x(svbool_t pg, svint8_t op1, svuint8_t op2) /// ASR Ztied1.B, Pg/M, Ztied1.B, Zop2.B - /// ASRR Ztied2.B, Pg/M, Ztied2.B, Zop1.B /// svint8_t svasr[_s8]_z(svbool_t pg, svint8_t op1, svuint8_t op2) /// public static unsafe Vector ShiftRightArithmetic(Vector left, Vector right) => ShiftRightArithmetic(left, right); @@ -5743,7 +5731,6 @@ internal Arm64() { } /// LSR Ztied1.B, Pg/M, Ztied1.B, Zop2.B /// svuint8_t svlsr[_u8]_x(svbool_t pg, svuint8_t op1, svuint8_t op2) /// LSR Ztied1.B, Pg/M, Ztied1.B, Zop2.B - /// LSRR Ztied2.B, Pg/M, Ztied2.B, Zop1.B /// svuint8_t svlsr[_u8]_z(svbool_t pg, svuint8_t op1, svuint8_t op2) /// public static unsafe Vector ShiftRightLogical(Vector left, Vector right) => ShiftRightLogical(left, right); @@ -5763,7 +5750,6 @@ internal Arm64() { } /// LSR Ztied1.H, Pg/M, Ztied1.H, Zop2.H /// svuint16_t svlsr[_u16]_x(svbool_t pg, svuint16_t op1, svuint16_t op2) /// LSR Ztied1.H, Pg/M, Ztied1.H, Zop2.H - /// LSRR Ztied2.H, Pg/M, Ztied2.H, Zop1.H /// svuint16_t svlsr[_u16]_z(svbool_t pg, svuint16_t op1, svuint16_t op2) /// public static unsafe Vector ShiftRightLogical(Vector left, Vector right) => ShiftRightLogical(left, right); @@ -5783,7 +5769,6 @@ internal Arm64() { } /// LSR Ztied1.S, Pg/M, Ztied1.S, Zop2.S /// svuint32_t svlsr[_u32]_x(svbool_t pg, svuint32_t op1, svuint32_t op2) /// LSR Ztied1.S, Pg/M, Ztied1.S, Zop2.S - /// LSRR Ztied2.S, Pg/M, Ztied2.S, Zop1.S /// svuint32_t svlsr[_u32]_z(svbool_t pg, svuint32_t op1, svuint32_t op2) /// public static unsafe Vector ShiftRightLogical(Vector left, Vector right) => ShiftRightLogical(left, right); @@ -5803,7 +5788,6 @@ internal Arm64() { } /// LSR Ztied1.D, Pg/M, Ztied1.D, Zop2.D /// svuint64_t svlsr[_u64]_x(svbool_t pg, svuint64_t op1, svuint64_t op2) /// LSR Ztied1.D, Pg/M, Ztied1.D, Zop2.D - /// LSRR Ztied2.D, Pg/M, Ztied2.D, Zop1.D /// svuint64_t svlsr[_u64]_z(svbool_t pg, svuint64_t op1, svuint64_t op2) /// public static unsafe Vector ShiftRightLogical(Vector left, Vector right) => ShiftRightLogical(left, right); From 9080f4edcf9a2d90de1b524277264cf51e81764b Mon Sep 17 00:00:00 2001 From: "Aman Khalid (from Dev Box)" Date: Fri, 28 Jun 2024 10:40:06 -0400 Subject: [PATCH 10/11] New test template --- .../GenerateHWIntrinsicTests_Arm.cs | 61 +-- ...inaryOpDifferentTypesTestTemplate.template | 401 ++++++++++++++++++ .../Shared/_SveBinaryOpTestTemplate.template | 27 +- 3 files changed, 438 insertions(+), 51 deletions(-) create mode 100644 src/tests/JIT/HardwareIntrinsics/Arm/Shared/_SveBinaryOpDifferentTypesTestTemplate.template diff --git a/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs b/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs index aa74e4f3eafb0b..9a997a5337ba7c 100644 --- a/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs +++ b/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs @@ -181,6 +181,7 @@ ("_SveBinaryOpTestTemplate.template", "SveVecBinOpTest.template", new Dictionary { ["TemplateName"] = "Simple", ["TemplateValidationLogic"] = SimpleVecOpTest_ValidationLogic, ["TemplateValidationLogicForCndSel"] = SimpleVecOpTest_ValidationLogicForCndSel }), ("_SveBinaryOpTestTemplate.template", "SveVecBinOpVecTest.template", new Dictionary { ["TemplateName"] = "Simple", ["TemplateValidationLogic"] = SimpleVecOpTest_VectorValidationLogic, ["TemplateValidationLogicForCndSel"] = SimpleVecOpTest_VectorValidationLogicForCndSel }), ("_SveBinaryOpTestTemplate.template", "SveVecBinOpConvertTest.template", new Dictionary { ["TemplateName"] = "Simple", ["TemplateValidationLogic"] = SimpleVecOpTest_ValidationLogic, ["TemplateValidationLogicForCndSel"] = SimpleTernVecOpTest_ValidationLogicForCndSel }), + ("_SveBinaryOpDifferentTypesTestTemplate.template", "SveVecBinOpDifferentTypesTest.template", new Dictionary { ["TemplateName"] = "Simple", ["TemplateValidationLogic"] = SimpleVecOpTest_ValidationLogic, ["TemplateValidationLogicForCndSel"] = SimpleVecOpTest_ValidationLogicForCndSel }), ("_SveBinaryMaskOpTestTemplate.template", "SveMaskVecBinOpConvertTest.template", new Dictionary { ["TemplateName"] = "Simple", ["TemplateValidationLogic"] = SimpleVecOpTest_ValidationLogic, ["TemplateValidationLogicForCndSel"] = SimpleVecOpTest_ValidationLogicForCndSel }), ("_SveImmBinaryOpTestTemplate.template", "SveVecImmBinOpTest.template", new Dictionary { ["TemplateName"] = "Simple", ["TemplateValidationLogic"] = SimpleVecOpTest_ValidationLogic, ["TemplateValidationLogicForCndSel"] = SimpleVecOpTest_ValidationLogicForCndSel }), ("_SveTernOpTestTemplate.template", "SveVecTernOpTest.template", new Dictionary { ["TemplateName"] = "Simple", ["TemplateValidationLogic"] = SimpleVecOpTest_ValidationLogic, ["TemplateValidationLogicForCndSel"] = SimpleTernVecOpTest_ValidationLogicForCndSel }), @@ -3740,36 +3741,36 @@ ("SveVecPairBinOpTest.template", new Dictionary { ["TestName"] = "Sve_Scale_float_int", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "Scale", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateEntry"] = "result[i] != Helpers.Scale(left[i], right[i])"}), ("SveVecPairBinOpTest.template", new Dictionary { ["TestName"] = "Sve_Scale_double_long", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "Scale", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateEntry"] = "result[i] != Helpers.Scale(left[i], right[i])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_sbyte_byte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "(sbyte)Helpers.ShiftLeft((byte)left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "(sbyte)Helpers.ShiftLeft((byte)left[i], (ulong)right[i])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_short_ushort", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "(short)Helpers.ShiftLeft((ushort)left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "(short)Helpers.ShiftLeft((ushort)left[i], (ulong)right[i])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_int_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "(int)Helpers.ShiftLeft((uint)left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "(int)Helpers.ShiftLeft((uint)left[i], (ulong)right[i])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_long_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "(long)Helpers.ShiftLeft((ulong)left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "(long)Helpers.ShiftLeft((ulong)left[i], (ulong)right[i])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_byte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.ShiftLeft(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftLeft(left[i], (ulong)right[i])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_ushort", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.ShiftLeft(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftLeft(left[i], (ulong)right[i])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.ShiftLeft(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftLeft(left[i], (ulong)right[i])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftLeft(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftLeft(left[i], right[i])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_sbyte_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "(sbyte)Helpers.ShiftLeft((byte)left[i], right[(i * sizeof(byte)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "(sbyte)Helpers.ShiftLeft((byte)left[i], right[(i * sizeof(byte)) / sizeof(ulong)])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_short_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "(short)Helpers.ShiftLeft((ushort)left[i], right[(i * sizeof(ushort)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "(short)Helpers.ShiftLeft((ushort)left[i], right[(i * sizeof(ushort)) / sizeof(ulong)])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_int_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "(int)Helpers.ShiftLeft((uint)left[i], right[(i * sizeof(uint)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "(int)Helpers.ShiftLeft((uint)left[i], right[(i * sizeof(uint)) / sizeof(ulong)])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_byte_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftLeft(left[i], right[(i * sizeof(byte)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftLeft(left[i], right[(i * sizeof(byte)) / sizeof(ulong)])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_ushort_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftLeft(left[i], right[(i * sizeof(ushort)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftLeft(left[i], right[(i * sizeof(ushort)) / sizeof(ulong)])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_uint_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftLeft(left[i], right[(i * sizeof(uint)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftLeft(left[i], right[(i * sizeof(uint)) / sizeof(ulong)])"}), - - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightArithmetic_sbyte_byte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightArithmetic_short_ushort", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightArithmetic_int_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightArithmetic_long_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], right[i])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightArithmetic_sbyte_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(sbyte)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(sbyte)) / sizeof(ulong)])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightArithmetic_short_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(short)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(short)) / sizeof(ulong)])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightArithmetic_int_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(int)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(int)) / sizeof(ulong)])"}), - - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_byte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_ushort", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], right[i])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_byte_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(byte)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(byte)) / sizeof(ulong)])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_ushort_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(ushort)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(ushort)) / sizeof(ulong)])"}), - ("SveVecBinOpTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_uint_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(uint)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(uint)) / sizeof(ulong)])"}), + ("SveVecBinOpDifferentTypesTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_sbyte_byte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "(sbyte)Helpers.ShiftLeft((byte)left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "(sbyte)Helpers.ShiftLeft((byte)left[i], (ulong)right[i])"}), + ("SveVecBinOpDifferentTypesTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_short_ushort", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "(short)Helpers.ShiftLeft((ushort)left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "(short)Helpers.ShiftLeft((ushort)left[i], (ulong)right[i])"}), + ("SveVecBinOpDifferentTypesTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_int_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "(int)Helpers.ShiftLeft((uint)left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "(int)Helpers.ShiftLeft((uint)left[i], (ulong)right[i])"}), + ("SveVecBinOpDifferentTypesTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_long_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "(long)Helpers.ShiftLeft((ulong)left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "(long)Helpers.ShiftLeft((ulong)left[i], (ulong)right[i])"}), + ("SveVecBinOpDifferentTypesTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_byte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.ShiftLeft(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftLeft(left[i], (ulong)right[i])"}), + ("SveVecBinOpDifferentTypesTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_ushort", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.ShiftLeft(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftLeft(left[i], (ulong)right[i])"}), + ("SveVecBinOpDifferentTypesTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.ShiftLeft(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftLeft(left[i], (ulong)right[i])"}), + ("SveVecBinOpDifferentTypesTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftLeft(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftLeft(left[i], right[i])"}), + ("SveVecBinOpDifferentTypesTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_sbyte_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "(sbyte)Helpers.ShiftLeft((byte)left[i], right[(i * sizeof(byte)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "(sbyte)Helpers.ShiftLeft((byte)left[i], right[(i * sizeof(byte)) / sizeof(ulong)])"}), + ("SveVecBinOpDifferentTypesTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_short_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "(short)Helpers.ShiftLeft((ushort)left[i], right[(i * sizeof(ushort)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "(short)Helpers.ShiftLeft((ushort)left[i], right[(i * sizeof(ushort)) / sizeof(ulong)])"}), + ("SveVecBinOpDifferentTypesTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_int_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "(int)Helpers.ShiftLeft((uint)left[i], right[(i * sizeof(uint)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "(int)Helpers.ShiftLeft((uint)left[i], right[(i * sizeof(uint)) / sizeof(ulong)])"}), + ("SveVecBinOpDifferentTypesTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_byte_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftLeft(left[i], right[(i * sizeof(byte)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftLeft(left[i], right[(i * sizeof(byte)) / sizeof(ulong)])"}), + ("SveVecBinOpDifferentTypesTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_ushort_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftLeft(left[i], right[(i * sizeof(ushort)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftLeft(left[i], right[(i * sizeof(ushort)) / sizeof(ulong)])"}), + ("SveVecBinOpDifferentTypesTest.template", new Dictionary { ["TestName"] = "Sve_ShiftLeftLogical_uint_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftLeftLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftLeft(left[i], right[(i * sizeof(uint)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftLeft(left[i], right[(i * sizeof(uint)) / sizeof(ulong)])"}), + + ("SveVecBinOpDifferentTypesTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightArithmetic_sbyte_byte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i])"}), + ("SveVecBinOpDifferentTypesTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightArithmetic_short_ushort", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i])"}), + ("SveVecBinOpDifferentTypesTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightArithmetic_int_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i])"}), + ("SveVecBinOpDifferentTypesTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightArithmetic_long_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], right[i])"}), + ("SveVecBinOpDifferentTypesTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightArithmetic_sbyte_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(sbyte)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(sbyte)) / sizeof(ulong)])"}), + ("SveVecBinOpDifferentTypesTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightArithmetic_short_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(short)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(short)) / sizeof(ulong)])"}), + ("SveVecBinOpDifferentTypesTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightArithmetic_int_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightArithmetic", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(int)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(int)) / sizeof(ulong)])"}), + + ("SveVecBinOpDifferentTypesTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_byte", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i])"}), + ("SveVecBinOpDifferentTypesTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_ushort", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i])"}), + ("SveVecBinOpDifferentTypesTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_uint", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], (ulong)right[i])"}), + ("SveVecBinOpDifferentTypesTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], right[i]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], right[i])"}), + ("SveVecBinOpDifferentTypesTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_byte_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(byte)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(byte)) / sizeof(ulong)])"}), + ("SveVecBinOpDifferentTypesTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_ushort_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(ushort)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(ushort)) / sizeof(ulong)])"}), + ("SveVecBinOpDifferentTypesTest.template", new Dictionary { ["TestName"] = "Sve_ShiftRightLogical_uint_ulong", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "ShiftRightLogical", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(uint)) / sizeof(ulong)]) != result[i]", ["GetIterResult"] = "Helpers.ShiftRight(left[i], right[(i * sizeof(uint)) / sizeof(ulong)])"}), ("SveSimpleVecOpTest.template", new Dictionary { ["TestName"] = "Sve_SignExtend16_int", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "SignExtend16", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "result[i] != Helpers.SignExtend(firstOp[i], 16, false)", ["GetIterResult"] = "Helpers.SignExtend(leftOp[i], 16, false)"}), ("SveSimpleVecOpTest.template", new Dictionary { ["TestName"] = "Sve_SignExtend16_long", ["Isa"] = "Sve", ["LoadIsa"] = "Sve", ["Method"] = "SignExtend16", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "result[i] != Helpers.SignExtend(firstOp[i], 16, false)", ["GetIterResult"] = "Helpers.SignExtend(leftOp[i], 16, false)"}), diff --git a/src/tests/JIT/HardwareIntrinsics/Arm/Shared/_SveBinaryOpDifferentTypesTestTemplate.template b/src/tests/JIT/HardwareIntrinsics/Arm/Shared/_SveBinaryOpDifferentTypesTestTemplate.template new file mode 100644 index 00000000000000..d10dc394716e64 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/Arm/Shared/_SveBinaryOpDifferentTypesTestTemplate.template @@ -0,0 +1,401 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +/****************************************************************************** + * This file is auto-generated from a template file by the GenerateTests.csx * + * script in tests\src\JIT\HardwareIntrinsics.Arm\Shared. In order to make * + * changes, please update the corresponding template and run according to the * + * directions listed in the file. * + ******************************************************************************/ + +using System; +using System.Linq; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics; +using System.Runtime.Intrinsics.Arm; +using Xunit; + +namespace JIT.HardwareIntrinsics.Arm +{ + public static partial class Program + { + [Fact] + public static void {TestName}() + { + var test = new {TemplateName}BinaryOpTest__{TestName}(); + + if (test.IsSupported) + { + // Validates basic functionality works, using Unsafe.Read + test.RunBasicScenario_UnsafeRead(); + + // Validates calling via reflection works, using Unsafe.Read + test.RunReflectionScenario_UnsafeRead(); + + // Validates passing a local works, using Unsafe.Read + test.RunLclVarScenario_UnsafeRead(); + + // Validates passing an instance member of a class works + test.RunClassFldScenario(); + + // Validates passing the field of a local struct works + test.RunStructLclFldScenario(); + + // Validates passing an instance member of a struct works + test.RunStructFldScenario(); + + // Validates executing the test inside conditional, with op1 as falseValue + test.ConditionalSelect_Op1(); + + // Validates executing the test inside conditional, with op3 as falseValue + test.ConditionalSelect_FalseOp(); + + // Validates executing the test inside conditional, with op3 as zero + test.ConditionalSelect_ZeroOp(); + } + else + { + // Validates we throw on unsupported hardware + test.RunUnsupportedScenario(); + } + + if (!test.Succeeded) + { + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } + + public sealed unsafe class {TemplateName}BinaryOpTest__{TestName} + { + private struct DataTable + { + private byte[] inArray1; + private byte[] inArray2; + private byte[] outArray; + + private GCHandle inHandle1; + private GCHandle inHandle2; + private GCHandle outHandle; + + private ulong alignment; + + public DataTable({Op1BaseType}[] inArray1, {Op2BaseType}[] inArray2, {RetBaseType}[] outArray, int alignment) + { + int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf<{Op1BaseType}>(); + int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf<{Op2BaseType}>(); + int sizeOfoutArray = outArray.Length * Unsafe.SizeOf<{RetBaseType}>(); + if ((alignment != 64 && alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfinArray2 || (alignment * 2) < sizeOfoutArray) + { + throw new ArgumentException($"Invalid value of alignment: {alignment}, sizeOfinArray1: {sizeOfinArray1}, sizeOfinArray2: {sizeOfinArray2}, sizeOfoutArray: {sizeOfoutArray}"); + } + + this.inArray1 = new byte[alignment * 2]; + this.inArray2 = new byte[alignment * 2]; + this.outArray = new byte[alignment * 2]; + + this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); + this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); + this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); + + this.alignment = (ulong)alignment; + + Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As<{Op1BaseType}, byte>(ref inArray1[0]), (uint)sizeOfinArray1); + Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As<{Op2BaseType}, byte>(ref inArray2[0]), (uint)sizeOfinArray2); + } + + public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); + public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); + public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); + + public void Dispose() + { + inHandle1.Free(); + inHandle2.Free(); + outHandle.Free(); + } + + private static unsafe void* Align(byte* buffer, ulong expectedAlignment) + { + return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); + } + } + + private struct TestStruct + { + public {Op1VectorType}<{Op1BaseType}> _fld1; + public {Op2VectorType}<{Op2BaseType}> _fld2; + + public static TestStruct Create() + { + var testStruct = new TestStruct(); + + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref testStruct._fld1), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = {NextValueOp2}; } + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2VectorType}<{Op2BaseType}>, byte>(ref testStruct._fld2), ref Unsafe.As<{Op2BaseType}, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); + + return testStruct; + } + + public void RunStructFldScenario({TemplateName}BinaryOpTest__{TestName} testClass) + { + var result = {Isa}.{Method}(_fld1, _fld2); + + Unsafe.Write(testClass._dataTable.outArrayPtr, result); + testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr); + } + } + + private static readonly int LargestVectorSize = {LargestVectorSize}; + + private static readonly int Op1ElementCount = Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>() / sizeof({Op1BaseType}); + private static readonly int Op2ElementCount = Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>() / sizeof({Op2BaseType}); + private static readonly int RetElementCount = Unsafe.SizeOf<{RetVectorType}<{RetBaseType}>>() / sizeof({RetBaseType}); + + private static {Op1BaseType}[] _maskData = new {Op1BaseType}[Op1ElementCount]; + private static {Op1BaseType}[] _data1 = new {Op1BaseType}[Op1ElementCount]; + private static {Op2BaseType}[] _data2 = new {Op2BaseType}[Op2ElementCount]; + + private {Op1VectorType}<{Op1BaseType}> _mask; + private {Op1VectorType}<{Op1BaseType}> _falseFld; + private {Op1VectorType}<{Op1BaseType}> _fld1; + private {Op2VectorType}<{Op2BaseType}> _fld2; + + private DataTable _dataTable; + + public {TemplateName}BinaryOpTest__{TestName}() + { + Succeeded = true; + + for (var i = 0; i < Op1ElementCount; i++) { _maskData[i] = ({Op1BaseType})({NextValueOp1} % 2); } + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref _mask), ref Unsafe.As<{Op1BaseType}, byte>(ref _maskData[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref _falseFld), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref _fld1), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = {NextValueOp2}; } + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2VectorType}<{Op2BaseType}>, byte>(ref _fld2), ref Unsafe.As<{Op2BaseType}, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); + + for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } + for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = {NextValueOp2}; } + _dataTable = new DataTable(_data1, _data2, new {RetBaseType}[RetElementCount], LargestVectorSize); + } + + public bool IsSupported => {Isa}.IsSupported; + + public bool Succeeded { get; set; } + + public void RunBasicScenario_UnsafeRead() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); + + var result = {Isa}.{Method}( + Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr), + Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray2Ptr) + ); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); + } + + public void RunReflectionScenario_UnsafeRead() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); + + var result = typeof({Isa}).GetMethod(nameof({Isa}.{Method}), new Type[] { typeof({Op1VectorType}<{Op1BaseType}>), typeof({Op2VectorType}<{Op2BaseType}>) }) + .Invoke(null, new object[] { + Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr), + Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray2Ptr) + }); + + Unsafe.Write(_dataTable.outArrayPtr, ({RetVectorType}<{RetBaseType}>)(result)); + ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); + } + + public void RunLclVarScenario_UnsafeRead() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); + + var op1 = Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr); + var op2 = Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray2Ptr); + var result = {Isa}.{Method}(op1, op2); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(op1, op2, _dataTable.outArrayPtr); + } + + public void RunClassFldScenario() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); + + var result = {Isa}.{Method}(_fld1, _fld2); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr); + } + + public void RunStructLclFldScenario() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); + + var test = TestStruct.Create(); + var result = {Isa}.{Method}(test._fld1, test._fld2); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr); + } + + public void RunStructFldScenario() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); + + var test = TestStruct.Create(); + test.RunStructFldScenario(this); + } + + public void ConditionalSelect_Op1() + { + TestLibrary.TestFramework.BeginScenario("ConditionalSelect_Op1_mask"); + ConditionalSelectScenario(_mask, _fld1, _fld2, _fld1); + + TestLibrary.TestFramework.BeginScenario("ConditionalSelect_Op1_zero"); + ConditionalSelectScenario({Op1VectorType}<{Op1BaseType}>.Zero, _fld1, _fld2, _fld1); + + TestLibrary.TestFramework.BeginScenario("ConditionalSelect_Op1_all"); + ConditionalSelectScenario({Op1VectorType}<{Op1BaseType}>.AllBitsSet, _fld1, _fld2, _fld1); + } + + public void ConditionalSelect_FalseOp() + { + TestLibrary.TestFramework.BeginScenario("ConditionalSelect_FalseOp_mask"); + ConditionalSelectScenario(_mask, _fld1, _fld2, _falseFld); + + TestLibrary.TestFramework.BeginScenario("ConditionalSelect_FalseOp_zero"); + ConditionalSelectScenario({Op1VectorType}<{Op1BaseType}>.Zero, _fld1, _fld2, _falseFld); + + TestLibrary.TestFramework.BeginScenario("ConditionalSelect_FalseOp_all"); + ConditionalSelectScenario({Op1VectorType}<{Op1BaseType}>.AllBitsSet, _fld1, _fld2, _falseFld); + } + + public void ConditionalSelect_ZeroOp() + { + TestLibrary.TestFramework.BeginScenario("ConditionalSelect_ZeroOp_mask"); + ConditionalSelectScenario(_mask, _fld1, _fld2, {Op1VectorType}<{Op1BaseType}>.Zero); + + TestLibrary.TestFramework.BeginScenario("ConditionalSelect_ZeroOp_zero"); + ConditionalSelectScenario({Op1VectorType}<{Op1BaseType}>.Zero, _fld1, _fld2, {Op1VectorType}<{Op1BaseType}>.Zero); + + TestLibrary.TestFramework.BeginScenario("ConditionalSelect_ZeroOp_all"); + ConditionalSelectScenario({Op1VectorType}<{Op1BaseType}>.AllBitsSet, _fld1, _fld2, {Op1VectorType}<{Op1BaseType}>.Zero); + } + + [method: MethodImpl(MethodImplOptions.AggressiveInlining)] + private void ConditionalSelectScenario({Op1VectorType}<{Op1BaseType}> mask, {Op1VectorType}<{Op1BaseType}> op1, {Op2VectorType}<{Op2BaseType}> op2, {Op1VectorType}<{Op1BaseType}> falseOp) + { + var result = Sve.ConditionalSelect(mask, {Isa}.{Method}(op1, op2), falseOp); + + Unsafe.Write(_dataTable.outArrayPtr, result); + ValidateConditionalSelectResult(mask, op1, op2, falseOp, _dataTable.outArrayPtr); + } + + public void RunUnsupportedScenario() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); + + bool succeeded = false; + + try + { + RunBasicScenario_UnsafeRead(); + } + catch (PlatformNotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + Succeeded = false; + } + } + + private void ValidateConditionalSelectResult({Op1VectorType}<{Op1BaseType}> maskOp, {Op1VectorType}<{Op1BaseType}> leftOp, {Op2VectorType}<{Op2BaseType}> rightOp, {Op1VectorType}<{Op1BaseType}> falseOp, void* output, [CallerMemberName] string method = "") + { + {Op1BaseType}[] mask = new {Op1BaseType}[Op1ElementCount]; + {Op1BaseType}[] left = new {Op1BaseType}[Op1ElementCount]; + {Op2BaseType}[] right = new {Op2BaseType}[Op2ElementCount]; + {Op1BaseType}[] falseVal = new {Op1BaseType}[Op1ElementCount]; + {RetBaseType}[] result = new {RetBaseType}[RetElementCount]; + + Unsafe.WriteUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref mask[0]), maskOp); + Unsafe.WriteUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref left[0]), leftOp); + Unsafe.WriteUnaligned(ref Unsafe.As<{Op2BaseType}, byte>(ref right[0]), rightOp); + Unsafe.WriteUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref falseVal[0]), falseOp); + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{RetBaseType}, byte>(ref result[0]), ref Unsafe.AsRef(output), (uint)Unsafe.SizeOf<{RetVectorType}<{RetBaseType}>>()); + + bool succeeded = true; + + {TemplateValidationLogicForCndSel} + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}>, {Op2VectorType}<{Op2BaseType}>): {method} failed:"); + TestLibrary.TestFramework.LogInformation($" mask: ({string.Join(", ", mask)})"); + TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); + TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); + TestLibrary.TestFramework.LogInformation($" falseOp: ({string.Join(", ", falseVal)})"); + TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); + TestLibrary.TestFramework.LogInformation(string.Empty); + + Succeeded = false; + } + } + + private void ValidateResult({Op1VectorType}<{Op1BaseType}> op1, {Op2VectorType}<{Op2BaseType}> op2, void* result, [CallerMemberName] string method = "") + { + {Op1BaseType}[] inArray1 = new {Op1BaseType}[Op1ElementCount]; + {Op2BaseType}[] inArray2 = new {Op2BaseType}[Op2ElementCount]; + {RetBaseType}[] outArray = new {RetBaseType}[RetElementCount]; + + Unsafe.WriteUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref inArray1[0]), op1); + Unsafe.WriteUnaligned(ref Unsafe.As<{Op2BaseType}, byte>(ref inArray2[0]), op2); + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{RetBaseType}, byte>(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf<{RetVectorType}<{RetBaseType}>>()); + + ValidateResult(inArray1, inArray2, outArray, method); + } + + private void ValidateResult(void* op1, void* op2, void* result, [CallerMemberName] string method = "") + { + {Op1BaseType}[] inArray1 = new {Op1BaseType}[Op1ElementCount]; + {Op2BaseType}[] inArray2 = new {Op2BaseType}[Op2ElementCount]; + {RetBaseType}[] outArray = new {RetBaseType}[RetElementCount]; + + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2BaseType}, byte>(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{RetBaseType}, byte>(ref outArray[0]), ref Unsafe.AsRef(result), (uint)Unsafe.SizeOf<{RetVectorType}<{RetBaseType}>>()); + + ValidateResult(inArray1, inArray2, outArray, method); + } + + private void ValidateResult({Op1BaseType}[] left, {Op2BaseType}[] right, {RetBaseType}[] result, [CallerMemberName] string method = "") + { + bool succeeded = true; + + {TemplateValidationLogic} + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}>, {Op2VectorType}<{Op2BaseType}>): {method} failed:"); + TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); + TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); + TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); + TestLibrary.TestFramework.LogInformation(string.Empty); + + Succeeded = false; + } + } + } +} diff --git a/src/tests/JIT/HardwareIntrinsics/Arm/Shared/_SveBinaryOpTestTemplate.template b/src/tests/JIT/HardwareIntrinsics/Arm/Shared/_SveBinaryOpTestTemplate.template index ab2f5672eb1980..0a10283036e836 100644 --- a/src/tests/JIT/HardwareIntrinsics/Arm/Shared/_SveBinaryOpTestTemplate.template +++ b/src/tests/JIT/HardwareIntrinsics/Arm/Shared/_SveBinaryOpTestTemplate.template @@ -8,16 +8,6 @@ * directions listed in the file. * ******************************************************************************/ -// By defining the first operand type as a symbol, we can conditionally compile -// scenarios depending on if the operand types are the same, -// avoiding the need for a new template. -// If the types are the same, the #undef will remove the symbol. -// If they aren't the same, the #undef won't do anything, -// and the first operand type symbol will remain defined. -// We can then conditionally compile on the condition #if !{Op1VectorType}{Op1BaseType}, etc. -#define {Op1VectorType}{Op1BaseType} -#undef {Op2VectorType}{Op2BaseType} - using System; using System.Linq; using System.Numerics; @@ -179,9 +169,9 @@ namespace JIT.HardwareIntrinsics.Arm private static {Op2BaseType}[] _data2 = new {Op2BaseType}[Op2ElementCount]; private {Op1VectorType}<{Op1BaseType}> _mask; - private {Op1VectorType}<{Op1BaseType}> _falseFld; private {Op1VectorType}<{Op1BaseType}> _fld1; private {Op2VectorType}<{Op2BaseType}> _fld2; + private {Op2VectorType}<{Op2BaseType}> _falseFld; private DataTable _dataTable; @@ -192,11 +182,10 @@ namespace JIT.HardwareIntrinsics.Arm for (var i = 0; i < Op1ElementCount; i++) { _maskData[i] = ({Op1BaseType})({NextValueOp1} % 2); } Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref _mask), ref Unsafe.As<{Op1BaseType}, byte>(ref _maskData[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref _falseFld), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref _fld1), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = {NextValueOp2}; } Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2VectorType}<{Op2BaseType}>, byte>(ref _fld2), ref Unsafe.As<{Op2BaseType}, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2VectorType}<{Op2BaseType}>, byte>(ref _falseFld), ref Unsafe.As<{Op2BaseType}, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } for (var i = 0; i < Op2ElementCount; i++) { _data2[i] = {NextValueOp2}; } @@ -222,7 +211,6 @@ namespace JIT.HardwareIntrinsics.Arm public void RunBasicScenario_Load() { -#if !{Op1VectorType}{Op1BaseType} TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); {Op1VectorType}<{Op1BaseType}> loadMask = Sve.CreateTrueMask{RetBaseType}(SveMaskPattern.All); @@ -234,7 +222,6 @@ namespace JIT.HardwareIntrinsics.Arm Unsafe.Write(_dataTable.outArrayPtr, result); ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr); -#endif } public void RunReflectionScenario_UnsafeRead() @@ -306,7 +293,6 @@ namespace JIT.HardwareIntrinsics.Arm public void ConditionalSelect_Op2() { -#if !{Op1VectorType}{Op1BaseType} TestLibrary.TestFramework.BeginScenario("ConditionalSelect_Op2_mask"); ConditionalSelectScenario(_mask, _fld1, _fld2, _fld2); @@ -315,7 +301,6 @@ namespace JIT.HardwareIntrinsics.Arm TestLibrary.TestFramework.BeginScenario("ConditionalSelect_Op2_all"); ConditionalSelectScenario({Op1VectorType}<{Op1BaseType}>.AllBitsSet, _fld1, _fld2, _fld2); -#endif } public void ConditionalSelect_FalseOp() @@ -343,7 +328,7 @@ namespace JIT.HardwareIntrinsics.Arm } [method: MethodImpl(MethodImplOptions.AggressiveInlining)] - private void ConditionalSelectScenario({Op1VectorType}<{Op1BaseType}> mask, {Op1VectorType}<{Op1BaseType}> op1, {Op2VectorType}<{Op2BaseType}> op2, {Op1VectorType}<{Op1BaseType}> falseOp) + private void ConditionalSelectScenario({Op1VectorType}<{Op1BaseType}> mask, {Op1VectorType}<{Op1BaseType}> op1, {Op1VectorType}<{Op1BaseType}> op2, {Op1VectorType}<{Op1BaseType}> falseOp) { var result = Sve.ConditionalSelect(mask, {Isa}.{Method}(op1, op2), falseOp); @@ -372,17 +357,17 @@ namespace JIT.HardwareIntrinsics.Arm } } - private void ValidateConditionalSelectResult({Op1VectorType}<{Op1BaseType}> maskOp, {Op1VectorType}<{Op1BaseType}> leftOp, {Op2VectorType}<{Op2BaseType}> rightOp, {Op1VectorType}<{Op1BaseType}> falseOp, void* output, [CallerMemberName] string method = "") + private void ValidateConditionalSelectResult({Op1VectorType}<{Op1BaseType}> maskOp, {Op1VectorType}<{Op1BaseType}> leftOp, {Op1VectorType}<{Op1BaseType}> rightOp, {Op1VectorType}<{Op1BaseType}> falseOp, void* output, [CallerMemberName] string method = "") { {Op1BaseType}[] mask = new {Op1BaseType}[Op1ElementCount]; {Op1BaseType}[] left = new {Op1BaseType}[Op1ElementCount]; - {Op2BaseType}[] right = new {Op2BaseType}[Op2ElementCount]; + {Op1BaseType}[] right = new {Op1BaseType}[Op1ElementCount]; {Op1BaseType}[] falseVal = new {Op1BaseType}[Op1ElementCount]; {RetBaseType}[] result = new {RetBaseType}[RetElementCount]; Unsafe.WriteUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref mask[0]), maskOp); Unsafe.WriteUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref left[0]), leftOp); - Unsafe.WriteUnaligned(ref Unsafe.As<{Op2BaseType}, byte>(ref right[0]), rightOp); + Unsafe.WriteUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref right[0]), rightOp); Unsafe.WriteUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref falseVal[0]), falseOp); Unsafe.CopyBlockUnaligned(ref Unsafe.As<{RetBaseType}, byte>(ref result[0]), ref Unsafe.AsRef(output), (uint)Unsafe.SizeOf<{RetVectorType}<{RetBaseType}>>()); From 9616ba3e3d961a9fc6c8819a4c6265c7968169f2 Mon Sep 17 00:00:00 2001 From: "Aman Khalid (from Dev Box)" Date: Fri, 28 Jun 2024 10:44:23 -0400 Subject: [PATCH 11/11] Remove unnecessary changes --- src/tests/JIT/HardwareIntrinsics/Arm/Shared/Helpers.cs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/tests/JIT/HardwareIntrinsics/Arm/Shared/Helpers.cs b/src/tests/JIT/HardwareIntrinsics/Arm/Shared/Helpers.cs index 0ed39cd0546ba9..43f149787e0dc1 100644 --- a/src/tests/JIT/HardwareIntrinsics/Arm/Shared/Helpers.cs +++ b/src/tests/JIT/HardwareIntrinsics/Arm/Shared/Helpers.cs @@ -3710,8 +3710,6 @@ private static short SignedShift(short op1, short op2, bool rounding = false, bo public static ushort ShiftLeftLogical(ushort op1, byte op2) => UnsignedShift(op1, (short)op2); - public static ushort ShiftLeftLogical(ushort op1, ushort op2) => UnsignedShift(op1, (short)op2); - public static short ShiftLeftLogicalSaturate(short op1, byte op2) => SignedShift(op1, (short)op2, saturating: true); public static ushort ShiftLeftLogicalSaturate(ushort op1, byte op2) => UnsignedShift(op1, (short)op2, saturating: true); @@ -3980,8 +3978,6 @@ private static int SignedShift(int op1, int op2, bool rounding = false, bool sat public static uint ShiftLeftLogical(uint op1, byte op2) => UnsignedShift(op1, (int)op2); - public static uint ShiftLeftLogical(uint op1, uint op2) => UnsignedShift(op1, (int)op2); - public static int ShiftLeftLogicalSaturate(int op1, byte op2) => SignedShift(op1, (int)op2, saturating: true); public static uint ShiftLeftLogicalSaturate(uint op1, byte op2) => UnsignedShift(op1, (int)op2, saturating: true); @@ -4250,8 +4246,6 @@ private static long SignedShift(long op1, long op2, bool rounding = false, bool public static ulong ShiftLeftLogical(ulong op1, byte op2) => UnsignedShift(op1, (long)op2); - public static ulong ShiftLeftLogical(ulong op1, ulong op2) => UnsignedShift(op1, (long)op2); - public static long ShiftLeftLogicalSaturate(long op1, byte op2) => SignedShift(op1, (long)op2, saturating: true); public static ulong ShiftLeftLogicalSaturate(ulong op1, byte op2) => UnsignedShift(op1, (long)op2, saturating: true);