From d17df0551c6b9fa2938571134153eee1b4b147a9 Mon Sep 17 00:00:00 2001 From: Swapnil Gaikwad Date: Thu, 13 Nov 2025 15:10:13 +0000 Subject: [PATCH 1/2] Fix failing NaN comparisons in Sve2.ConvertTo* tests --- .../GenerateHWIntrinsicTests/Arm/Sve2Tests.cs | 20 +++++++++---------- .../GenerateHWIntrinsicTests/Arm/Templates.cs | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/tests/Common/GenerateHWIntrinsicTests/Arm/Sve2Tests.cs b/src/tests/Common/GenerateHWIntrinsicTests/Arm/Sve2Tests.cs index 6ad73360c19b5c..7704ec47ce86e0 100644 --- a/src/tests/Common/GenerateHWIntrinsicTests/Arm/Sve2Tests.cs +++ b/src/tests/Common/GenerateHWIntrinsicTests/Arm/Sve2Tests.cs @@ -222,13 +222,13 @@ public static (string templateFileName, Dictionary templateData) ("SveVecTernOpTest.template", new Dictionary { ["TestName"] = "Sve2_BitwiseSelectRightInverted_uint", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "BitwiseSelectRightInverted", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["ConvertFunc"] = "", ["ValidateIterResult"] = "result[i] != Helpers.BitwiseSelectRightInverted(firstOp[i], secondOp[i], thirdOp[i])", ["GetIterResult"] = "Helpers.BitwiseSelectRightInverted(firstOp[i], secondOp[i], thirdOp[i])"}), ("SveVecTernOpTest.template", new Dictionary { ["TestName"] = "Sve2_BitwiseSelectRightInverted_ulong", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "BitwiseSelectRightInverted", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt64()", ["ConvertFunc"] = "", ["ValidateIterResult"] = "result[i] != Helpers.BitwiseSelectRightInverted(firstOp[i], secondOp[i], thirdOp[i])", ["GetIterResult"] = "Helpers.BitwiseSelectRightInverted(firstOp[i], secondOp[i], thirdOp[i])"}), - ("SveSimpleVecOpDiffRetTypeTest.template", new Dictionary { ["TestName"] = "Sve2_ConvertToDoubleOdd_double_float", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "ConvertToDoubleOdd", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ConvertFunc"] = "", ["ValidateIterResult"] = "Helpers.ConvertToDouble(firstOp[i * 2 + 1]) != result[i]", ["GetIterResult"] = "Helpers.ConvertToDouble(left[i * 2 + 1])"}), + ("SveSimpleVecOpDiffRetTypeTest.template", new Dictionary { ["TestName"] = "Sve2_ConvertToDoubleOdd_double_float", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "ConvertToDoubleOdd", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ConvertFunc"] = "BitConverter.DoubleToInt64Bits", ["ValidateIterResult"] = "Helpers.ConvertToDouble(firstOp[i * 2 + 1]) != result[i]", ["GetIterResult"] = "Helpers.ConvertToDouble(left[i * 2 + 1])"}), - ("SveSimpleVecOpDiffRetTypeTest.template", new Dictionary { ["TestName"] = "Sve2_ConvertToSingleEvenRoundToOdd_float_double", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "ConvertToSingleEvenRoundToOdd", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ConvertFunc"] = "", ["ValidateIterResult"] = "Helpers.ConvertToSingleEvenRoundToOdd(firstOp, i) != result[i]", ["GetIterResult"] = "Helpers.ConvertToSingleEvenRoundToOdd(left, i)"}), + ("SveSimpleVecOpDiffRetTypeTest.template", new Dictionary { ["TestName"] = "Sve2_ConvertToSingleEvenRoundToOdd_float_double", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "ConvertToSingleEvenRoundToOdd", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ConvertFunc"] = "BitConverter.SingleToInt32Bits", ["ValidateIterResult"] = "Helpers.ConvertToSingleEvenRoundToOdd(firstOp, i) != result[i]", ["GetIterResult"] = "Helpers.ConvertToSingleEvenRoundToOdd(left, i)"}), - ("SveVecBinOpDifferentRetType.template", new Dictionary { ["TestName"] = "Sve2_ConvertToSingleOdd_float_double", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "ConvertToSingleOdd", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ConvertFunc"] = "", ["ValidateIterResult"] = "Helpers.ConvertToSingleOdd(left, right, i) != result[i]", ["GetIterResult"] = "Helpers.ConvertToSingleOdd(left, right, i)"}), + ("SveVecBinOpDifferentRetType.template", new Dictionary { ["TestName"] = "Sve2_ConvertToSingleOdd_float_double", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "ConvertToSingleOdd", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ConvertFunc"] = "BitConverter.SingleToInt32Bits", ["ValidateIterResult"] = "Helpers.ConvertToSingleOdd(left, right, i) != result[i]", ["GetIterResult"] = "Helpers.ConvertToSingleOdd(left, right, i)"}), - ("SveVecBinOpDifferentRetType.template", new Dictionary { ["TestName"] = "Sve2_ConvertToSingleOddRoundToOdd_float_double", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "ConvertToSingleOddRoundToOdd", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ConvertFunc"] = "", ["ValidateIterResult"] = "Helpers.ConvertToSingleOddRoundToOdd(left, right, i) != result[i]", ["GetIterResult"] = "Helpers.ConvertToSingleOddRoundToOdd(left, right, i)"}), + ("SveVecBinOpDifferentRetType.template", new Dictionary { ["TestName"] = "Sve2_ConvertToSingleOddRoundToOdd_float_double", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "ConvertToSingleOddRoundToOdd", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ConvertFunc"] = "BitConverter.SingleToInt32Bits", ["ValidateIterResult"] = "Helpers.ConvertToSingleOddRoundToOdd(left, right, i) != result[i]", ["GetIterResult"] = "Helpers.ConvertToSingleOddRoundToOdd(left, right, i)"}), ("SveVecImmTernOpFirstArgTest.template", new Dictionary { ["TestName"] = "Sve2_DotProductRotateComplex_int_sbyte_0", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "DotProductRotateComplex", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "SByte", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "SByte", ["Op4BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp3"] = "TestLibrary.Generator.GetSByte()", ["Imm"] = "0", ["InvalidImm"] = "4", ["ConvertFunc"] = "", ["ValidateIterResult"] = "Helpers.DotProductRotateComplex(first[i], second, 4 * i, third, Imm) != result[i]", ["GetIterResult"] = "Helpers.DotProductRotateComplex(first[i], second, 4 * i, third, Imm)"}), ("SveVecImmTernOpFirstArgTest.template", new Dictionary { ["TestName"] = "Sve2_DotProductRotateComplex_int_sbyte_1", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "DotProductRotateComplex", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "SByte", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "SByte", ["Op4BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp3"] = "TestLibrary.Generator.GetSByte()", ["Imm"] = "1", ["InvalidImm"] = "4", ["ConvertFunc"] = "", ["ValidateIterResult"] = "Helpers.DotProductRotateComplex(first[i], second, 4 * i, third, Imm) != result[i]", ["GetIterResult"] = "Helpers.DotProductRotateComplex(first[i], second, 4 * i, third, Imm)"}), @@ -841,12 +841,12 @@ public static (string templateFileName, Dictionary templateData) ("SveVecTernOpVecTest.template", new Dictionary { ["TestName"] = "Sve2_SubtractBorrowWideningOdd_uint", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "SubtractBorrowWideningOdd", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["ValidateVectorResult"] = "!result.SequenceEqual(Helpers.SubtractBorrowWideningOdd(firstOp, secondOp, thirdOp))", ["GetVectorResult"] = "Helpers.SubtractBorrowWideningOdd(first, second, third)"}), ("SveVecTernOpVecTest.template", new Dictionary { ["TestName"] = "Sve2_SubtractBorrowWideningOdd_ulong", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "SubtractBorrowWideningOdd", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt64()", ["ValidateVectorResult"] = "!result.SequenceEqual(Helpers.SubtractBorrowWideningOdd(firstOp, secondOp, thirdOp))", ["GetVectorResult"] = "Helpers.SubtractBorrowWideningOdd(first, second, third)"}), - ("SveVecBinOpDifferentRetType.template", new Dictionary { ["TestName"] = "Sve2_SubtractHighNarrowingEven_sbyte_short", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "SubtractHighNarrowingEven", ["RetVectorType"] = "Vector", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.SubtractHighNarrowingEven(left, right, i) != result[i]", ["GetIterResult"] = "Helpers.SubtractHighNarrowingEven(left, right, i)"}), - ("SveVecBinOpDifferentRetType.template", new Dictionary { ["TestName"] = "Sve2_SubtractHighNarrowingEven_short_int", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "SubtractHighNarrowingEven", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.SubtractHighNarrowingEven(left, right, i) != result[i]", ["GetIterResult"] = "Helpers.SubtractHighNarrowingEven(left, right, i)"}), - ("SveVecBinOpDifferentRetType.template", new Dictionary { ["TestName"] = "Sve2_SubtractHighNarrowingEven_int_long", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "SubtractHighNarrowingEven", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.SubtractHighNarrowingEven(left, right, i) != result[i]", ["GetIterResult"] = "Helpers.SubtractHighNarrowingEven(left, right, i)"}), - ("SveVecBinOpDifferentRetType.template", new Dictionary { ["TestName"] = "Sve2_SubtractHighNarrowingEven_byte_ushort", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "SubtractHighNarrowingEven", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.SubtractHighNarrowingEven(left, right, i) != result[i]", ["GetIterResult"] = "Helpers.SubtractHighNarrowingEven(left, right, i)"}), - ("SveVecBinOpDifferentRetType.template", new Dictionary { ["TestName"] = "Sve2_SubtractHighNarrowingEven_ushort_uint", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "SubtractHighNarrowingEven", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.SubtractHighNarrowingEven(left, right, i) != result[i]", ["GetIterResult"] = "Helpers.SubtractHighNarrowingEven(left, right, i)"}), - ("SveVecBinOpDifferentRetType.template", new Dictionary { ["TestName"] = "Sve2_SubtractHighNarrowingEven_uint_ulong", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "SubtractHighNarrowingEven", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.SubtractHighNarrowingEven(left, right, i) != result[i]", ["GetIterResult"] = "Helpers.SubtractHighNarrowingEven(left, right, i)"}), + ("SveVecBinOpDifferentRetType.template", new Dictionary { ["TestName"] = "Sve2_SubtractHighNarrowingEven_sbyte_short", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "SubtractHighNarrowingEven", ["RetVectorType"] = "Vector", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ConvertFunc"] = "", ["ValidateIterResult"] = "Helpers.SubtractHighNarrowingEven(left, right, i) != result[i]", ["GetIterResult"] = "Helpers.SubtractHighNarrowingEven(left, right, i)"}), + ("SveVecBinOpDifferentRetType.template", new Dictionary { ["TestName"] = "Sve2_SubtractHighNarrowingEven_short_int", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "SubtractHighNarrowingEven", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ConvertFunc"] = "", ["ValidateIterResult"] = "Helpers.SubtractHighNarrowingEven(left, right, i) != result[i]", ["GetIterResult"] = "Helpers.SubtractHighNarrowingEven(left, right, i)"}), + ("SveVecBinOpDifferentRetType.template", new Dictionary { ["TestName"] = "Sve2_SubtractHighNarrowingEven_int_long", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "SubtractHighNarrowingEven", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ConvertFunc"] = "", ["ValidateIterResult"] = "Helpers.SubtractHighNarrowingEven(left, right, i) != result[i]", ["GetIterResult"] = "Helpers.SubtractHighNarrowingEven(left, right, i)"}), + ("SveVecBinOpDifferentRetType.template", new Dictionary { ["TestName"] = "Sve2_SubtractHighNarrowingEven_byte_ushort", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "SubtractHighNarrowingEven", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ConvertFunc"] = "", ["ValidateIterResult"] = "Helpers.SubtractHighNarrowingEven(left, right, i) != result[i]", ["GetIterResult"] = "Helpers.SubtractHighNarrowingEven(left, right, i)"}), + ("SveVecBinOpDifferentRetType.template", new Dictionary { ["TestName"] = "Sve2_SubtractHighNarrowingEven_ushort_uint", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "SubtractHighNarrowingEven", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ConvertFunc"] = "", ["ValidateIterResult"] = "Helpers.SubtractHighNarrowingEven(left, right, i) != result[i]", ["GetIterResult"] = "Helpers.SubtractHighNarrowingEven(left, right, i)"}), + ("SveVecBinOpDifferentRetType.template", new Dictionary { ["TestName"] = "Sve2_SubtractHighNarrowingEven_uint_ulong", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "SubtractHighNarrowingEven", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ConvertFunc"] = "", ["ValidateIterResult"] = "Helpers.SubtractHighNarrowingEven(left, right, i) != result[i]", ["GetIterResult"] = "Helpers.SubtractHighNarrowingEven(left, right, i)"}), ("SveVecTernOpFirstArgTest.template", new Dictionary { ["TestName"] = "Sve2_SubtractHighNarrowingOdd_sbyte_short", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "SubtractHighNarrowingOdd", ["RetVectorType"] = "Vector", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Int16", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "Int16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt16()", ["ConvertFunc"] = "", ["ValidateIterResult"] = "Helpers.SubtractHighNarrowingOdd(first, second, third, i) != result[i]", ["GetIterResult"] = "Helpers.SubtractHighNarrowingOdd(first, second, third, i)"}), ("SveVecTernOpFirstArgTest.template", new Dictionary { ["TestName"] = "Sve2_SubtractHighNarrowingOdd_short_int", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "SubtractHighNarrowingOdd", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Int32", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "Int32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["ConvertFunc"] = "", ["ValidateIterResult"] = "Helpers.SubtractHighNarrowingOdd(first, second, third, i) != result[i]", ["GetIterResult"] = "Helpers.SubtractHighNarrowingOdd(first, second, third, i)"}), diff --git a/src/tests/Common/GenerateHWIntrinsicTests/Arm/Templates.cs b/src/tests/Common/GenerateHWIntrinsicTests/Arm/Templates.cs index cdf2f8340f7ac3..64221c6f76f605 100644 --- a/src/tests/Common/GenerateHWIntrinsicTests/Arm/Templates.cs +++ b/src/tests/Common/GenerateHWIntrinsicTests/Arm/Templates.cs @@ -310,13 +310,13 @@ public static (string templateFileName, string outputTemplateName, Dictionary { ["TemplateName"] = "SecureHash", ["TemplateValidationLogic"] = SecureHashOpTest_ValidationLogic }), ("_TernaryOpTestTemplate.template", "SecureHashTernOpTest.template", new Dictionary { ["TemplateName"] = "SecureHash", ["TemplateValidationLogic"] = SecureHashOpTest_ValidationLogic }), ("_SveUnaryOpTestTemplate.template", "SveSimpleVecOpTest.template", new Dictionary { ["TemplateName"] = "Simple", ["TemplateValidationLogic"] = SimpleVecOpTest_ValidationLogic, ["TemplateValidationLogicForCndSel"] = SimpleVecOpTest_ValidationLogicForCndSel, ["TemplateValidationLogicForCndSel_FalseValue"] = SimpleVecOpTest_ValidationLogicForCndSel_FalseValue }), - ("_SveUnaryOpDifferentRetTypeTestTemplate.template", "SveSimpleVecOpDiffRetTypeTest.template", new Dictionary { ["TemplateName"] = "Simple", ["TemplateValidationLogic"] = SimpleVecOpTest_ValidationLogic, ["TemplateValidationLogicForCndSel"] = SimpleVecOpTest_ValidationLogicForCndSel, ["TemplateValidationLogicForCndSel_FalseValue"] = SimpleVecOpTest_ValidationLogicForCndSel_FalseValue }), + ("_SveUnaryOpDifferentRetTypeTestTemplate.template", "SveSimpleVecOpDiffRetTypeTest.template", new Dictionary { ["TemplateName"] = "Simple", ["TemplateValidationLogic"] = SimpleVecOpTest_ValidationLogic, ["TemplateValidationLogicForCndSel"] = SimpleVecOpTest_ValidationLogicForCndSelForNarrowing, ["TemplateValidationLogicForCndSel_FalseValue"] = SimpleVecOpTest_ValidationLogicForCndSelForNarrowing_FalseValue }), ("_SveUnaryOpDifferentRetTypeTestTemplate.template", "SveSimpleVecOpNarrowingTest.template", new Dictionary { ["TemplateName"] = "Simple", ["TemplateValidationLogic"] = SimpleVecOpTest_ValidationLogicForNarrowing, ["TemplateValidationLogicForCndSel"] = SimpleVecOpTest_ValidationLogicForCndSelForNarrowing, ["TemplateValidationLogicForCndSel_FalseValue"] = SimpleVecOpTest_ValidationLogicForCndSelForNarrowing_FalseValue }), ("_SveUnaryOpDifferentRetTypeTestTemplate.template", "SveSimpleVecOpDiffRetTypeTestVec.template", new Dictionary { ["TemplateName"] = "Simple", ["TemplateValidationLogic"] = SimpleVecOpTest_VectorValidationLogic, ["TemplateValidationLogicForCndSel"] = SimpleVecOpTest_VectorValidationLogicForCndSel, ["TemplateValidationLogicForCndSel_FalseValue"] = SimpleVecOpTest_VectorValidationLogicForCndSel_FalseValue }), ("_SveBinaryOpTestTemplate.template", "SveVecBinOpTest.template", new Dictionary { ["TemplateName"] = "Simple", ["TemplateValidationLogic"] = SimpleVecOpTest_ValidationLogic, ["TemplateValidationLogicForCndSel"] = SimpleVecOpTest_ValidationLogicForCndSel, ["TemplateValidationLogicForCndSel_FalseValue"] = SimpleVecOpTest_ValidationLogicForCndSel_FalseValue }), ("_SveBinaryOpTestTemplate.template", "SveVecBinOpVecTest.template", new Dictionary { ["TemplateName"] = "Simple", ["TemplateValidationLogic"] = SimpleVecOpTest_VectorValidationLogic, ["TemplateValidationLogicForCndSel"] = SimpleVecOpTest_VectorValidationLogicForCndSel, ["TemplateValidationLogicForCndSel_FalseValue"] = SimpleVecOpTest_VectorValidationLogicForCndSel_FalseValue }), ("_SveBinaryOpTestTemplate.template", "SveVecBinOpConvertTest.template", new Dictionary { ["TemplateName"] = "Simple", ["TemplateValidationLogic"] = SimpleVecOpTest_ValidationLogic, ["TemplateValidationLogicForCndSel"] = SimpleTernVecOpTest_ValidationLogicForCndSel, ["TemplateValidationLogicForCndSel_FalseValue"] = SimpleTernVecOpTest_ValidationLogicForCndSel_FalseValue }), - ("_SveBinaryOpDifferentRetTypeTestTemplate.template", "SveVecBinOpDifferentRetType.template", new Dictionary { ["TemplateName"] = "Simple", ["TemplateValidationLogic"] = SimpleVecOpTest_ValidationLogic, ["TemplateValidationLogicForCndSel"] = SimpleVecOpTest_ValidationLogicForCndSel, ["TemplateValidationLogicForCndSel_FalseValue"] = SimpleVecOpTest_ValidationLogicForCndSel_FalseValue}), + ("_SveBinaryOpDifferentRetTypeTestTemplate.template", "SveVecBinOpDifferentRetType.template", new Dictionary { ["TemplateName"] = "Simple", ["TemplateValidationLogic"] = SimpleVecOpTest_ValidationLogic, ["TemplateValidationLogicForCndSel"] = SimpleVecOpTest_ValidationLogicForCndSelForNarrowing, ["TemplateValidationLogicForCndSel_FalseValue"] = SimpleVecOpTest_ValidationLogicForCndSelForNarrowing_FalseValue}), ("_SveMasklessBinaryOpTestTemplate.template", "SveVecBinOpTestScalarRet.template", new Dictionary { ["TemplateName"] = "Simple", ["TemplateValidationLogic"] = SimpleScalarOpTest_ValidationLogic }), ("_SveBinaryRetMaskOpTestTemplate.template", "SveVecBinRetMaskOpConvertTest.template", new Dictionary { ["TemplateName"] = "Simple", ["TemplateValidationLogic"] = SimpleVecOpTest_ValidationLogic, ["TemplateValidationLogicForCndSel"] = SimpleTernVecOpTest_ValidationLogicForCndSel, ["TemplateValidationLogicForCndSel_FalseValue"] = SimpleTernVecOpTest_ValidationLogicForCndSel_FalseValue, ["TemplateValidationLogicForCndSelMask"] = SimpleVecOpTest_ValidationLogicForCndSelMask }), ("_SveBinaryOpDifferentTypesTestTemplate.template", "SveVecBinOpDifferentTypesTest.template", new Dictionary { ["TemplateName"] = "Simple", ["TemplateValidationLogic"] = SimpleVecOpTest_ValidationLogic, ["TemplateValidationLogicForCndSel"] = SimpleVecOpTest_ValidationLogicForCndSel, ["TemplateValidationLogicForCndSel_FalseValue"] = SimpleVecOpTest_ValidationLogicForCndSel_FalseValue }), From b42bd9bc5cf0dc256aa70fc66d8455888ca4eeb8 Mon Sep 17 00:00:00 2001 From: Swapnil Gaikwad Date: Tue, 18 Nov 2025 14:17:12 +0000 Subject: [PATCH 2/2] Use new templates limit the test fix to ConvertTo tests --- .../GenerateHWIntrinsicTests/Arm/Sve2Tests.cs | 22 +++++++++---------- .../GenerateHWIntrinsicTests/Arm/Templates.cs | 6 +++-- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/tests/Common/GenerateHWIntrinsicTests/Arm/Sve2Tests.cs b/src/tests/Common/GenerateHWIntrinsicTests/Arm/Sve2Tests.cs index 7704ec47ce86e0..ff34ba5f7229e2 100644 --- a/src/tests/Common/GenerateHWIntrinsicTests/Arm/Sve2Tests.cs +++ b/src/tests/Common/GenerateHWIntrinsicTests/Arm/Sve2Tests.cs @@ -222,13 +222,11 @@ public static (string templateFileName, Dictionary templateData) ("SveVecTernOpTest.template", new Dictionary { ["TestName"] = "Sve2_BitwiseSelectRightInverted_uint", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "BitwiseSelectRightInverted", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["ConvertFunc"] = "", ["ValidateIterResult"] = "result[i] != Helpers.BitwiseSelectRightInverted(firstOp[i], secondOp[i], thirdOp[i])", ["GetIterResult"] = "Helpers.BitwiseSelectRightInverted(firstOp[i], secondOp[i], thirdOp[i])"}), ("SveVecTernOpTest.template", new Dictionary { ["TestName"] = "Sve2_BitwiseSelectRightInverted_ulong", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "BitwiseSelectRightInverted", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt64()", ["ConvertFunc"] = "", ["ValidateIterResult"] = "result[i] != Helpers.BitwiseSelectRightInverted(firstOp[i], secondOp[i], thirdOp[i])", ["GetIterResult"] = "Helpers.BitwiseSelectRightInverted(firstOp[i], secondOp[i], thirdOp[i])"}), - ("SveSimpleVecOpDiffRetTypeTest.template", new Dictionary { ["TestName"] = "Sve2_ConvertToDoubleOdd_double_float", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "ConvertToDoubleOdd", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ConvertFunc"] = "BitConverter.DoubleToInt64Bits", ["ValidateIterResult"] = "Helpers.ConvertToDouble(firstOp[i * 2 + 1]) != result[i]", ["GetIterResult"] = "Helpers.ConvertToDouble(left[i * 2 + 1])"}), + ("SveSimpleVecOpDiffRetTypeFloats.template", new Dictionary { ["TestName"] = "Sve2_ConvertToDoubleOdd_double_float", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "ConvertToDoubleOdd", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ConvertFunc"] = "BitConverter.DoubleToInt64Bits", ["ValidateIterResult"] = "Helpers.ConvertToDouble(firstOp[i * 2 + 1]) != result[i]", ["GetIterResult"] = "Helpers.ConvertToDouble(left[i * 2 + 1])"}), + ("SveSimpleVecOpDiffRetTypeFloats.template", new Dictionary { ["TestName"] = "Sve2_ConvertToSingleEvenRoundToOdd_float_double", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "ConvertToSingleEvenRoundToOdd", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ConvertFunc"] = "BitConverter.SingleToInt32Bits", ["ValidateIterResult"] = "Helpers.ConvertToSingleEvenRoundToOdd(firstOp, i) != result[i]", ["GetIterResult"] = "Helpers.ConvertToSingleEvenRoundToOdd(left, i)"}), - ("SveSimpleVecOpDiffRetTypeTest.template", new Dictionary { ["TestName"] = "Sve2_ConvertToSingleEvenRoundToOdd_float_double", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "ConvertToSingleEvenRoundToOdd", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ConvertFunc"] = "BitConverter.SingleToInt32Bits", ["ValidateIterResult"] = "Helpers.ConvertToSingleEvenRoundToOdd(firstOp, i) != result[i]", ["GetIterResult"] = "Helpers.ConvertToSingleEvenRoundToOdd(left, i)"}), - - ("SveVecBinOpDifferentRetType.template", new Dictionary { ["TestName"] = "Sve2_ConvertToSingleOdd_float_double", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "ConvertToSingleOdd", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ConvertFunc"] = "BitConverter.SingleToInt32Bits", ["ValidateIterResult"] = "Helpers.ConvertToSingleOdd(left, right, i) != result[i]", ["GetIterResult"] = "Helpers.ConvertToSingleOdd(left, right, i)"}), - - ("SveVecBinOpDifferentRetType.template", new Dictionary { ["TestName"] = "Sve2_ConvertToSingleOddRoundToOdd_float_double", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "ConvertToSingleOddRoundToOdd", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ConvertFunc"] = "BitConverter.SingleToInt32Bits", ["ValidateIterResult"] = "Helpers.ConvertToSingleOddRoundToOdd(left, right, i) != result[i]", ["GetIterResult"] = "Helpers.ConvertToSingleOddRoundToOdd(left, right, i)"}), + ("SveVecBinOpDiffRetTypeFloats.template", new Dictionary { ["TestName"] = "Sve2_ConvertToSingleOdd_float_double", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "ConvertToSingleOdd", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ConvertFunc"] = "BitConverter.SingleToInt32Bits", ["ValidateIterResult"] = "Helpers.ConvertToSingleOdd(left, right, i) != result[i]", ["GetIterResult"] = "Helpers.ConvertToSingleOdd(left, right, i)"}), + ("SveVecBinOpDiffRetTypeFloats.template", new Dictionary { ["TestName"] = "Sve2_ConvertToSingleOddRoundToOdd_float_double", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "ConvertToSingleOddRoundToOdd", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ConvertFunc"] = "BitConverter.SingleToInt32Bits", ["ValidateIterResult"] = "Helpers.ConvertToSingleOddRoundToOdd(left, right, i) != result[i]", ["GetIterResult"] = "Helpers.ConvertToSingleOddRoundToOdd(left, right, i)"}), ("SveVecImmTernOpFirstArgTest.template", new Dictionary { ["TestName"] = "Sve2_DotProductRotateComplex_int_sbyte_0", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "DotProductRotateComplex", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "SByte", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "SByte", ["Op4BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp3"] = "TestLibrary.Generator.GetSByte()", ["Imm"] = "0", ["InvalidImm"] = "4", ["ConvertFunc"] = "", ["ValidateIterResult"] = "Helpers.DotProductRotateComplex(first[i], second, 4 * i, third, Imm) != result[i]", ["GetIterResult"] = "Helpers.DotProductRotateComplex(first[i], second, 4 * i, third, Imm)"}), ("SveVecImmTernOpFirstArgTest.template", new Dictionary { ["TestName"] = "Sve2_DotProductRotateComplex_int_sbyte_1", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "DotProductRotateComplex", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "SByte", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "SByte", ["Op4BaseType"] = "Byte", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp3"] = "TestLibrary.Generator.GetSByte()", ["Imm"] = "1", ["InvalidImm"] = "4", ["ConvertFunc"] = "", ["ValidateIterResult"] = "Helpers.DotProductRotateComplex(first[i], second, 4 * i, third, Imm) != result[i]", ["GetIterResult"] = "Helpers.DotProductRotateComplex(first[i], second, 4 * i, third, Imm)"}), @@ -841,12 +839,12 @@ public static (string templateFileName, Dictionary templateData) ("SveVecTernOpVecTest.template", new Dictionary { ["TestName"] = "Sve2_SubtractBorrowWideningOdd_uint", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "SubtractBorrowWideningOdd", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt32", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt32()", ["ValidateVectorResult"] = "!result.SequenceEqual(Helpers.SubtractBorrowWideningOdd(firstOp, secondOp, thirdOp))", ["GetVectorResult"] = "Helpers.SubtractBorrowWideningOdd(first, second, third)"}), ("SveVecTernOpVecTest.template", new Dictionary { ["TestName"] = "Sve2_SubtractBorrowWideningOdd_ulong", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "SubtractBorrowWideningOdd", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp3"] = "TestLibrary.Generator.GetUInt64()", ["ValidateVectorResult"] = "!result.SequenceEqual(Helpers.SubtractBorrowWideningOdd(firstOp, secondOp, thirdOp))", ["GetVectorResult"] = "Helpers.SubtractBorrowWideningOdd(first, second, third)"}), - ("SveVecBinOpDifferentRetType.template", new Dictionary { ["TestName"] = "Sve2_SubtractHighNarrowingEven_sbyte_short", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "SubtractHighNarrowingEven", ["RetVectorType"] = "Vector", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ConvertFunc"] = "", ["ValidateIterResult"] = "Helpers.SubtractHighNarrowingEven(left, right, i) != result[i]", ["GetIterResult"] = "Helpers.SubtractHighNarrowingEven(left, right, i)"}), - ("SveVecBinOpDifferentRetType.template", new Dictionary { ["TestName"] = "Sve2_SubtractHighNarrowingEven_short_int", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "SubtractHighNarrowingEven", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ConvertFunc"] = "", ["ValidateIterResult"] = "Helpers.SubtractHighNarrowingEven(left, right, i) != result[i]", ["GetIterResult"] = "Helpers.SubtractHighNarrowingEven(left, right, i)"}), - ("SveVecBinOpDifferentRetType.template", new Dictionary { ["TestName"] = "Sve2_SubtractHighNarrowingEven_int_long", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "SubtractHighNarrowingEven", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ConvertFunc"] = "", ["ValidateIterResult"] = "Helpers.SubtractHighNarrowingEven(left, right, i) != result[i]", ["GetIterResult"] = "Helpers.SubtractHighNarrowingEven(left, right, i)"}), - ("SveVecBinOpDifferentRetType.template", new Dictionary { ["TestName"] = "Sve2_SubtractHighNarrowingEven_byte_ushort", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "SubtractHighNarrowingEven", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ConvertFunc"] = "", ["ValidateIterResult"] = "Helpers.SubtractHighNarrowingEven(left, right, i) != result[i]", ["GetIterResult"] = "Helpers.SubtractHighNarrowingEven(left, right, i)"}), - ("SveVecBinOpDifferentRetType.template", new Dictionary { ["TestName"] = "Sve2_SubtractHighNarrowingEven_ushort_uint", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "SubtractHighNarrowingEven", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ConvertFunc"] = "", ["ValidateIterResult"] = "Helpers.SubtractHighNarrowingEven(left, right, i) != result[i]", ["GetIterResult"] = "Helpers.SubtractHighNarrowingEven(left, right, i)"}), - ("SveVecBinOpDifferentRetType.template", new Dictionary { ["TestName"] = "Sve2_SubtractHighNarrowingEven_uint_ulong", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "SubtractHighNarrowingEven", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ConvertFunc"] = "", ["ValidateIterResult"] = "Helpers.SubtractHighNarrowingEven(left, right, i) != result[i]", ["GetIterResult"] = "Helpers.SubtractHighNarrowingEven(left, right, i)"}), + ("SveVecBinOpDifferentRetType.template", new Dictionary { ["TestName"] = "Sve2_SubtractHighNarrowingEven_sbyte_short", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "SubtractHighNarrowingEven", ["RetVectorType"] = "Vector", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateIterResult"] = "Helpers.SubtractHighNarrowingEven(left, right, i) != result[i]", ["GetIterResult"] = "Helpers.SubtractHighNarrowingEven(left, right, i)"}), + ("SveVecBinOpDifferentRetType.template", new Dictionary { ["TestName"] = "Sve2_SubtractHighNarrowingEven_short_int", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "SubtractHighNarrowingEven", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateIterResult"] = "Helpers.SubtractHighNarrowingEven(left, right, i) != result[i]", ["GetIterResult"] = "Helpers.SubtractHighNarrowingEven(left, right, i)"}), + ("SveVecBinOpDifferentRetType.template", new Dictionary { ["TestName"] = "Sve2_SubtractHighNarrowingEven_int_long", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "SubtractHighNarrowingEven", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateIterResult"] = "Helpers.SubtractHighNarrowingEven(left, right, i) != result[i]", ["GetIterResult"] = "Helpers.SubtractHighNarrowingEven(left, right, i)"}), + ("SveVecBinOpDifferentRetType.template", new Dictionary { ["TestName"] = "Sve2_SubtractHighNarrowingEven_byte_ushort", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "SubtractHighNarrowingEven", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.SubtractHighNarrowingEven(left, right, i) != result[i]", ["GetIterResult"] = "Helpers.SubtractHighNarrowingEven(left, right, i)"}), + ("SveVecBinOpDifferentRetType.template", new Dictionary { ["TestName"] = "Sve2_SubtractHighNarrowingEven_ushort_uint", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "SubtractHighNarrowingEven", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.SubtractHighNarrowingEven(left, right, i) != result[i]", ["GetIterResult"] = "Helpers.SubtractHighNarrowingEven(left, right, i)"}), + ("SveVecBinOpDifferentRetType.template", new Dictionary { ["TestName"] = "Sve2_SubtractHighNarrowingEven_uint_ulong", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "SubtractHighNarrowingEven", ["RetVectorType"] = "Vector", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.SubtractHighNarrowingEven(left, right, i) != result[i]", ["GetIterResult"] = "Helpers.SubtractHighNarrowingEven(left, right, i)"}), ("SveVecTernOpFirstArgTest.template", new Dictionary { ["TestName"] = "Sve2_SubtractHighNarrowingOdd_sbyte_short", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "SubtractHighNarrowingOdd", ["RetVectorType"] = "Vector", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Int16", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "Int16", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt16()", ["ConvertFunc"] = "", ["ValidateIterResult"] = "Helpers.SubtractHighNarrowingOdd(first, second, third, i) != result[i]", ["GetIterResult"] = "Helpers.SubtractHighNarrowingOdd(first, second, third, i)"}), ("SveVecTernOpFirstArgTest.template", new Dictionary { ["TestName"] = "Sve2_SubtractHighNarrowingOdd_short_int", ["Isa"] = "Sve2", ["LoadIsa"] = "Sve2", ["Method"] = "SubtractHighNarrowingOdd", ["RetVectorType"] = "Vector", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector", ["Op2BaseType"] = "Int32", ["Op3VectorType"] = "Vector", ["Op3BaseType"] = "Int32", ["LargestVectorSize"] = "64", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["NextValueOp3"] = "TestLibrary.Generator.GetInt32()", ["ConvertFunc"] = "", ["ValidateIterResult"] = "Helpers.SubtractHighNarrowingOdd(first, second, third, i) != result[i]", ["GetIterResult"] = "Helpers.SubtractHighNarrowingOdd(first, second, third, i)"}), diff --git a/src/tests/Common/GenerateHWIntrinsicTests/Arm/Templates.cs b/src/tests/Common/GenerateHWIntrinsicTests/Arm/Templates.cs index 64221c6f76f605..e9a46129d90423 100644 --- a/src/tests/Common/GenerateHWIntrinsicTests/Arm/Templates.cs +++ b/src/tests/Common/GenerateHWIntrinsicTests/Arm/Templates.cs @@ -310,13 +310,15 @@ public static (string templateFileName, string outputTemplateName, Dictionary { ["TemplateName"] = "SecureHash", ["TemplateValidationLogic"] = SecureHashOpTest_ValidationLogic }), ("_TernaryOpTestTemplate.template", "SecureHashTernOpTest.template", new Dictionary { ["TemplateName"] = "SecureHash", ["TemplateValidationLogic"] = SecureHashOpTest_ValidationLogic }), ("_SveUnaryOpTestTemplate.template", "SveSimpleVecOpTest.template", new Dictionary { ["TemplateName"] = "Simple", ["TemplateValidationLogic"] = SimpleVecOpTest_ValidationLogic, ["TemplateValidationLogicForCndSel"] = SimpleVecOpTest_ValidationLogicForCndSel, ["TemplateValidationLogicForCndSel_FalseValue"] = SimpleVecOpTest_ValidationLogicForCndSel_FalseValue }), - ("_SveUnaryOpDifferentRetTypeTestTemplate.template", "SveSimpleVecOpDiffRetTypeTest.template", new Dictionary { ["TemplateName"] = "Simple", ["TemplateValidationLogic"] = SimpleVecOpTest_ValidationLogic, ["TemplateValidationLogicForCndSel"] = SimpleVecOpTest_ValidationLogicForCndSelForNarrowing, ["TemplateValidationLogicForCndSel_FalseValue"] = SimpleVecOpTest_ValidationLogicForCndSelForNarrowing_FalseValue }), + ("_SveUnaryOpDifferentRetTypeTestTemplate.template", "SveSimpleVecOpDiffRetTypeTest.template", new Dictionary { ["TemplateName"] = "Simple", ["TemplateValidationLogic"] = SimpleVecOpTest_ValidationLogic, ["TemplateValidationLogicForCndSel"] = SimpleVecOpTest_ValidationLogicForCndSel, ["TemplateValidationLogicForCndSel_FalseValue"] = SimpleVecOpTest_ValidationLogicForCndSel_FalseValue }), + ("_SveUnaryOpDifferentRetTypeTestTemplate.template", "SveSimpleVecOpDiffRetTypeFloats.template", new Dictionary { ["TemplateName"] = "Simple", ["TemplateValidationLogic"] = SimpleVecOpTest_ValidationLogic, ["TemplateValidationLogicForCndSel"] = SimpleVecOpTest_ValidationLogicForCndSelForNarrowing, ["TemplateValidationLogicForCndSel_FalseValue"] = SimpleVecOpTest_ValidationLogicForCndSelForNarrowing_FalseValue }), ("_SveUnaryOpDifferentRetTypeTestTemplate.template", "SveSimpleVecOpNarrowingTest.template", new Dictionary { ["TemplateName"] = "Simple", ["TemplateValidationLogic"] = SimpleVecOpTest_ValidationLogicForNarrowing, ["TemplateValidationLogicForCndSel"] = SimpleVecOpTest_ValidationLogicForCndSelForNarrowing, ["TemplateValidationLogicForCndSel_FalseValue"] = SimpleVecOpTest_ValidationLogicForCndSelForNarrowing_FalseValue }), ("_SveUnaryOpDifferentRetTypeTestTemplate.template", "SveSimpleVecOpDiffRetTypeTestVec.template", new Dictionary { ["TemplateName"] = "Simple", ["TemplateValidationLogic"] = SimpleVecOpTest_VectorValidationLogic, ["TemplateValidationLogicForCndSel"] = SimpleVecOpTest_VectorValidationLogicForCndSel, ["TemplateValidationLogicForCndSel_FalseValue"] = SimpleVecOpTest_VectorValidationLogicForCndSel_FalseValue }), ("_SveBinaryOpTestTemplate.template", "SveVecBinOpTest.template", new Dictionary { ["TemplateName"] = "Simple", ["TemplateValidationLogic"] = SimpleVecOpTest_ValidationLogic, ["TemplateValidationLogicForCndSel"] = SimpleVecOpTest_ValidationLogicForCndSel, ["TemplateValidationLogicForCndSel_FalseValue"] = SimpleVecOpTest_ValidationLogicForCndSel_FalseValue }), ("_SveBinaryOpTestTemplate.template", "SveVecBinOpVecTest.template", new Dictionary { ["TemplateName"] = "Simple", ["TemplateValidationLogic"] = SimpleVecOpTest_VectorValidationLogic, ["TemplateValidationLogicForCndSel"] = SimpleVecOpTest_VectorValidationLogicForCndSel, ["TemplateValidationLogicForCndSel_FalseValue"] = SimpleVecOpTest_VectorValidationLogicForCndSel_FalseValue }), ("_SveBinaryOpTestTemplate.template", "SveVecBinOpConvertTest.template", new Dictionary { ["TemplateName"] = "Simple", ["TemplateValidationLogic"] = SimpleVecOpTest_ValidationLogic, ["TemplateValidationLogicForCndSel"] = SimpleTernVecOpTest_ValidationLogicForCndSel, ["TemplateValidationLogicForCndSel_FalseValue"] = SimpleTernVecOpTest_ValidationLogicForCndSel_FalseValue }), - ("_SveBinaryOpDifferentRetTypeTestTemplate.template", "SveVecBinOpDifferentRetType.template", new Dictionary { ["TemplateName"] = "Simple", ["TemplateValidationLogic"] = SimpleVecOpTest_ValidationLogic, ["TemplateValidationLogicForCndSel"] = SimpleVecOpTest_ValidationLogicForCndSelForNarrowing, ["TemplateValidationLogicForCndSel_FalseValue"] = SimpleVecOpTest_ValidationLogicForCndSelForNarrowing_FalseValue}), + ("_SveBinaryOpDifferentRetTypeTestTemplate.template", "SveVecBinOpDifferentRetType.template", new Dictionary { ["TemplateName"] = "Simple", ["TemplateValidationLogic"] = SimpleVecOpTest_ValidationLogic, ["TemplateValidationLogicForCndSel"] = SimpleVecOpTest_ValidationLogicForCndSel, ["TemplateValidationLogicForCndSel_FalseValue"] = SimpleVecOpTest_ValidationLogicForCndSel_FalseValue }), + ("_SveBinaryOpDifferentRetTypeTestTemplate.template", "SveVecBinOpDiffRetTypeFloats.template", new Dictionary { ["TemplateName"] = "Simple", ["TemplateValidationLogic"] = SimpleVecOpTest_ValidationLogic, ["TemplateValidationLogicForCndSel"] = SimpleVecOpTest_ValidationLogicForCndSelForNarrowing, ["TemplateValidationLogicForCndSel_FalseValue"] = SimpleVecOpTest_ValidationLogicForCndSelForNarrowing_FalseValue }), ("_SveMasklessBinaryOpTestTemplate.template", "SveVecBinOpTestScalarRet.template", new Dictionary { ["TemplateName"] = "Simple", ["TemplateValidationLogic"] = SimpleScalarOpTest_ValidationLogic }), ("_SveBinaryRetMaskOpTestTemplate.template", "SveVecBinRetMaskOpConvertTest.template", new Dictionary { ["TemplateName"] = "Simple", ["TemplateValidationLogic"] = SimpleVecOpTest_ValidationLogic, ["TemplateValidationLogicForCndSel"] = SimpleTernVecOpTest_ValidationLogicForCndSel, ["TemplateValidationLogicForCndSel_FalseValue"] = SimpleTernVecOpTest_ValidationLogicForCndSel_FalseValue, ["TemplateValidationLogicForCndSelMask"] = SimpleVecOpTest_ValidationLogicForCndSelMask }), ("_SveBinaryOpDifferentTypesTestTemplate.template", "SveVecBinOpDifferentTypesTest.template", new Dictionary { ["TemplateName"] = "Simple", ["TemplateValidationLogic"] = SimpleVecOpTest_ValidationLogic, ["TemplateValidationLogicForCndSel"] = SimpleVecOpTest_ValidationLogicForCndSel, ["TemplateValidationLogicForCndSel_FalseValue"] = SimpleVecOpTest_ValidationLogicForCndSel_FalseValue }),