From 4773349f1cf7741145dee3c7b1d5013fe63c5e28 Mon Sep 17 00:00:00 2001 From: EgorBo Date: Sat, 7 Dec 2019 04:40:07 +0300 Subject: [PATCH 1/9] Extend existing constant folding logic for other operators (AND, OR, XOR) --- src/coreclr/src/jit/morph.cpp | 102 +++++++++++++++++++++++++--------- 1 file changed, 75 insertions(+), 27 deletions(-) diff --git a/src/coreclr/src/jit/morph.cpp b/src/coreclr/src/jit/morph.cpp index 12791f77d7902e..524ba8701059d3 100644 --- a/src/coreclr/src/jit/morph.cpp +++ b/src/coreclr/src/jit/morph.cpp @@ -12515,25 +12515,49 @@ GenTree* Compiler::fgMorphSmpOp(GenTree* tree, MorphAddrContext* mac) op2 = tree->AsOp()->gtOp2; } - /* See if we can fold GT_ADD nodes. */ - - if (oper == GT_ADD) + // See if we can fold constants for commutative operators. + if (tree->OperIs(GT_OR, GT_XOR, GT_AND, GT_ADD)) { - /* Fold "((x+icon1)+(y+icon2)) to ((x+y)+(icon1+icon2))" */ - - if (op1->gtOper == GT_ADD && op2->gtOper == GT_ADD && !gtIsActiveCSE_Candidate(op2) && - op1->AsOp()->gtOp2->gtOper == GT_CNS_INT && op2->AsOp()->gtOp2->gtOper == GT_CNS_INT && - !op1->gtOverflow() && !op2->gtOverflow()) + // Fold "((x icon1) (y icon2))" to "((x y) (icon1 icon2))" + if (op1->OperIs(op2->OperGet()) && op1->OperIs(oper) && !gtIsActiveCSE_Candidate(op2) && + op1->AsOp()->gtGetOp2()->IsCnsIntOrI() && op2->AsOp()->gtGetOp2()->IsCnsIntOrI()) { // Don't create a byref pointer that may point outside of the ref object. // If a GC happens, the byref won't get updated. This can happen if one // of the int components is negative. It also requires the address generation // be in a fully-interruptible code region. - if (!varTypeIsGC(op1->AsOp()->gtOp1->TypeGet()) && !varTypeIsGC(op2->AsOp()->gtOp1->TypeGet())) + if (!varTypeIsGC(op1->AsOp()->gtGetOp1()->TypeGet()) && + !varTypeIsGC(op2->AsOp()->gtGetOp1()->TypeGet())) { - cns1 = op1->AsOp()->gtOp2; - cns2 = op2->AsOp()->gtOp2; - cns1->AsIntCon()->gtIconVal += cns2->AsIntCon()->gtIconVal; + cns1 = op1->AsOp()->gtGetOp2(); + cns2 = op2->AsOp()->gtGetOp2(); + ssize_t icon1 = cns1->AsIntCon()->IconValue(); + ssize_t icon2 = cns2->AsIntCon()->IconValue(); + + if (oper == GT_ADD) + { + if (op1->gtOverflow() || op2->gtOverflow()) + { + break; + } + cns1->AsIntCon()->SetIconValue(icon1 + icon2); + } + else if (oper == GT_OR) + { + cns1->AsIntCon()->SetIconValue(icon1 | icon2); + } + else if (oper == GT_XOR) + { + cns1->AsIntCon()->SetIconValue(icon1 ^ icon2); + } + else if (oper == GT_AND) + { + cns1->AsIntCon()->SetIconValue(icon1 & icon2); + } + else + { + noway_assert(!"unexpected operator"); + } #ifdef _TARGET_64BIT_ if (cns1->TypeGet() == TYP_INT) { @@ -12554,20 +12578,44 @@ GenTree* Compiler::fgMorphSmpOp(GenTree* tree, MorphAddrContext* mac) if (op2->IsCnsIntOrI() && varTypeIsIntegralOrI(typ)) { - /* Fold "((x+icon1)+icon2) to (x+(icon1+icon2))" */ + // Fold "((x icon1) icon2) to (x (icon1 icon2))" CLANG_FORMAT_COMMENT_ANCHOR; - if (op1->gtOper == GT_ADD && // - !gtIsActiveCSE_Candidate(op1) && // - !op1->gtOverflow() && // - op1->AsOp()->gtOp2->IsCnsIntOrI() && // - (op1->AsOp()->gtOp2->OperGet() == op2->OperGet()) && // - (op1->AsOp()->gtOp2->TypeGet() != TYP_REF) && // Don't fold REFs - (op2->TypeGet() != TYP_REF)) // Don't fold REFs + if (op1->OperIs(oper) && // + !gtIsActiveCSE_Candidate(op1) && // + op1->AsOp()->gtGetOp2()->IsCnsIntOrI() && // + (op1->AsOp()->gtGetOp2()->OperGet() == op2->OperGet()) && // + (op1->AsOp()->gtGetOp2()->TypeGet() != TYP_REF) && // Don't fold REFs + (op2->TypeGet() != TYP_REF)) // Don't fold REFs { - cns1 = op1->AsOp()->gtOp2; - op2->AsIntConCommon()->SetIconValue(cns1->AsIntConCommon()->IconValue() + - op2->AsIntConCommon()->IconValue()); + cns1 = op1->AsOp()->gtGetOp2(); + ssize_t icon1 = cns1->AsIntConCommon()->IconValue(); + ssize_t icon2 = op2->AsIntConCommon()->IconValue(); + + if (oper == GT_ADD) + { + if (op1->gtOverflow()) + { + break; + } + op2->AsIntConCommon()->SetIconValue(icon1 + icon2); + } + else if (oper == GT_OR) + { + op2->AsIntConCommon()->SetIconValue(icon1 | icon2); + } + else if (oper == GT_XOR) + { + op2->AsIntConCommon()->SetIconValue(icon1 ^ icon2); + } + else if (oper == GT_AND) + { + op2->AsIntConCommon()->SetIconValue(icon1 & icon2); + } + else + { + noway_assert(!"unexpected operator"); + } #ifdef _TARGET_64BIT_ if (op2->TypeGet() == TYP_INT) { @@ -12588,9 +12636,9 @@ GenTree* Compiler::fgMorphSmpOp(GenTree* tree, MorphAddrContext* mac) op1 = tree->AsOp()->gtOp1; } - // Fold (x + 0). - - if ((op2->AsIntConCommon()->IconValue() == 0) && !gtIsActiveCSE_Candidate(tree)) + // Fold (x 0) for GT_ADD, GT_OR and GT_XOR. + if (tree->OperIs(GT_ADD, GT_OR, GT_XOR) && (op2->AsIntConCommon()->IconValue() == 0) && + !gtIsActiveCSE_Candidate(tree)) { // If this addition is adding an offset to a null pointer, @@ -12752,7 +12800,7 @@ GenTree* Compiler::fgMorphSmpOp(GenTree* tree, MorphAddrContext* mac) goto DONE_MORPHING_CHILDREN; } } - else if (fgOperIsBitwiseRotationRoot(oper)) + if (fgOperIsBitwiseRotationRoot(oper)) { tree = fgRecognizeAndMorphBitwiseRotation(tree); From e4160d82ceb78281bc9ac6a6c9f4889905fac272 Mon Sep 17 00:00:00 2001 From: EgorBo Date: Sat, 7 Dec 2019 05:04:39 +0300 Subject: [PATCH 2/9] Add tests with T4 --- .../InstructionCombining/ConstantFolding.cs | 15 + .../ConstantFolding.csproj | 25 + .../ConstantFolding_TestGen.cs | 1400 +++++++++++++++++ .../ConstantFolding_TestGen.tt | 120 ++ 4 files changed, 1560 insertions(+) create mode 100644 src/coreclr/tests/src/JIT/opt/InstructionCombining/ConstantFolding.cs create mode 100644 src/coreclr/tests/src/JIT/opt/InstructionCombining/ConstantFolding.csproj create mode 100644 src/coreclr/tests/src/JIT/opt/InstructionCombining/ConstantFolding_TestGen.cs create mode 100644 src/coreclr/tests/src/JIT/opt/InstructionCombining/ConstantFolding_TestGen.tt diff --git a/src/coreclr/tests/src/JIT/opt/InstructionCombining/ConstantFolding.cs b/src/coreclr/tests/src/JIT/opt/InstructionCombining/ConstantFolding.cs new file mode 100644 index 00000000000000..f088c403a0d6f7 --- /dev/null +++ b/src/coreclr/tests/src/JIT/opt/InstructionCombining/ConstantFolding.cs @@ -0,0 +1,15 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +public class Program +{ + public static int Main(string[] args) + { + int failures = 0; + failures += new ConstantFoldingTests1().RunTests(); + failures += new ConstantFoldingTests2().RunTests(); + failures += new ConstantFoldingTests3().RunTests(); + return 100 + failures; + } +} \ No newline at end of file diff --git a/src/coreclr/tests/src/JIT/opt/InstructionCombining/ConstantFolding.csproj b/src/coreclr/tests/src/JIT/opt/InstructionCombining/ConstantFolding.csproj new file mode 100644 index 00000000000000..9d10922a84fcde --- /dev/null +++ b/src/coreclr/tests/src/JIT/opt/InstructionCombining/ConstantFolding.csproj @@ -0,0 +1,25 @@ + + + Exe + + + None + True + + + + + + + TextTemplatingFileGenerator + ConstantFolding_TestGen.cs + + + + + True + True + ConstantFolding_TestGen.tt + + + diff --git a/src/coreclr/tests/src/JIT/opt/InstructionCombining/ConstantFolding_TestGen.cs b/src/coreclr/tests/src/JIT/opt/InstructionCombining/ConstantFolding_TestGen.cs new file mode 100644 index 00000000000000..9a0b620b450dd8 --- /dev/null +++ b/src/coreclr/tests/src/JIT/opt/InstructionCombining/ConstantFolding_TestGen.cs @@ -0,0 +1,1400 @@ +using System.Runtime.CompilerServices; +using TestType = System.Int32; + +public class ConstantFoldingTestsBase +{ + public const TestType Const1 = 8; + public const TestType Const2 = 1027; + + [MethodImpl(MethodImplOptions.NoInlining)] public TestType GetConst1() => Const1; + [MethodImpl(MethodImplOptions.NoInlining)] public TestType GetConst2() => Const2; +} + +// ((x op icon1) op icon2) +public class ConstantFoldingTests1 : ConstantFoldingTestsBase +{ + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_1_cns(TestType x) => ((x + Const1) + Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_1_var(TestType x) => ((x + GetConst1()) + GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_2_cns(TestType x) => ((x + Const1) - Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_2_var(TestType x) => ((x + GetConst1()) - GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_3_cns(TestType x) => ((x + Const1) & Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_3_var(TestType x) => ((x + GetConst1()) & GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_4_cns(TestType x) => ((x + Const1) | Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_4_var(TestType x) => ((x + GetConst1()) | GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_5_cns(TestType x) => ((x + Const1) ^ Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_5_var(TestType x) => ((x + GetConst1()) ^ GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_6_cns(TestType x) => ((x + Const1) >> Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_6_var(TestType x) => ((x + GetConst1()) >> GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_7_cns(TestType x) => ((x + Const1) << Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_7_var(TestType x) => ((x + GetConst1()) << GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_8_cns(TestType x) => ((x + Const1) * Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_8_var(TestType x) => ((x + GetConst1()) * GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_9_cns(TestType x) => ((x + Const1) / Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_9_var(TestType x) => ((x + GetConst1()) / GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_10_cns(TestType x) => ((x - Const1) + Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_10_var(TestType x) => ((x - GetConst1()) + GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_11_cns(TestType x) => ((x - Const1) - Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_11_var(TestType x) => ((x - GetConst1()) - GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_12_cns(TestType x) => ((x - Const1) & Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_12_var(TestType x) => ((x - GetConst1()) & GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_13_cns(TestType x) => ((x - Const1) | Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_13_var(TestType x) => ((x - GetConst1()) | GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_14_cns(TestType x) => ((x - Const1) ^ Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_14_var(TestType x) => ((x - GetConst1()) ^ GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_15_cns(TestType x) => ((x - Const1) >> Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_15_var(TestType x) => ((x - GetConst1()) >> GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_16_cns(TestType x) => ((x - Const1) << Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_16_var(TestType x) => ((x - GetConst1()) << GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_17_cns(TestType x) => ((x - Const1) * Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_17_var(TestType x) => ((x - GetConst1()) * GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_18_cns(TestType x) => ((x - Const1) / Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_18_var(TestType x) => ((x - GetConst1()) / GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_19_cns(TestType x) => ((x & Const1) + Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_19_var(TestType x) => ((x & GetConst1()) + GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_20_cns(TestType x) => ((x & Const1) - Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_20_var(TestType x) => ((x & GetConst1()) - GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_21_cns(TestType x) => ((x & Const1) & Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_21_var(TestType x) => ((x & GetConst1()) & GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_22_cns(TestType x) => ((x & Const1) | Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_22_var(TestType x) => ((x & GetConst1()) | GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_23_cns(TestType x) => ((x & Const1) ^ Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_23_var(TestType x) => ((x & GetConst1()) ^ GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_24_cns(TestType x) => ((x & Const1) >> Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_24_var(TestType x) => ((x & GetConst1()) >> GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_25_cns(TestType x) => ((x & Const1) << Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_25_var(TestType x) => ((x & GetConst1()) << GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_26_cns(TestType x) => ((x & Const1) * Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_26_var(TestType x) => ((x & GetConst1()) * GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_27_cns(TestType x) => ((x & Const1) / Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_27_var(TestType x) => ((x & GetConst1()) / GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_28_cns(TestType x) => ((x | Const1) + Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_28_var(TestType x) => ((x | GetConst1()) + GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_29_cns(TestType x) => ((x | Const1) - Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_29_var(TestType x) => ((x | GetConst1()) - GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_30_cns(TestType x) => ((x | Const1) & Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_30_var(TestType x) => ((x | GetConst1()) & GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_31_cns(TestType x) => ((x | Const1) | Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_31_var(TestType x) => ((x | GetConst1()) | GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_32_cns(TestType x) => ((x | Const1) ^ Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_32_var(TestType x) => ((x | GetConst1()) ^ GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_33_cns(TestType x) => ((x | Const1) >> Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_33_var(TestType x) => ((x | GetConst1()) >> GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_34_cns(TestType x) => ((x | Const1) << Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_34_var(TestType x) => ((x | GetConst1()) << GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_35_cns(TestType x) => ((x | Const1) * Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_35_var(TestType x) => ((x | GetConst1()) * GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_36_cns(TestType x) => ((x | Const1) / Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_36_var(TestType x) => ((x | GetConst1()) / GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_37_cns(TestType x) => ((x ^ Const1) + Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_37_var(TestType x) => ((x ^ GetConst1()) + GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_38_cns(TestType x) => ((x ^ Const1) - Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_38_var(TestType x) => ((x ^ GetConst1()) - GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_39_cns(TestType x) => ((x ^ Const1) & Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_39_var(TestType x) => ((x ^ GetConst1()) & GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_40_cns(TestType x) => ((x ^ Const1) | Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_40_var(TestType x) => ((x ^ GetConst1()) | GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_41_cns(TestType x) => ((x ^ Const1) ^ Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_41_var(TestType x) => ((x ^ GetConst1()) ^ GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_42_cns(TestType x) => ((x ^ Const1) >> Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_42_var(TestType x) => ((x ^ GetConst1()) >> GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_43_cns(TestType x) => ((x ^ Const1) << Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_43_var(TestType x) => ((x ^ GetConst1()) << GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_44_cns(TestType x) => ((x ^ Const1) * Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_44_var(TestType x) => ((x ^ GetConst1()) * GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_45_cns(TestType x) => ((x ^ Const1) / Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_45_var(TestType x) => ((x ^ GetConst1()) / GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_46_cns(TestType x) => ((x >> Const1) + Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_46_var(TestType x) => ((x >> GetConst1()) + GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_47_cns(TestType x) => ((x >> Const1) - Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_47_var(TestType x) => ((x >> GetConst1()) - GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_48_cns(TestType x) => ((x >> Const1) & Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_48_var(TestType x) => ((x >> GetConst1()) & GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_49_cns(TestType x) => ((x >> Const1) | Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_49_var(TestType x) => ((x >> GetConst1()) | GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_50_cns(TestType x) => ((x >> Const1) ^ Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_50_var(TestType x) => ((x >> GetConst1()) ^ GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_51_cns(TestType x) => ((x >> Const1) >> Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_51_var(TestType x) => ((x >> GetConst1()) >> GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_52_cns(TestType x) => ((x >> Const1) << Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_52_var(TestType x) => ((x >> GetConst1()) << GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_53_cns(TestType x) => ((x >> Const1) * Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_53_var(TestType x) => ((x >> GetConst1()) * GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_54_cns(TestType x) => ((x >> Const1) / Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_54_var(TestType x) => ((x >> GetConst1()) / GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_55_cns(TestType x) => ((x << Const1) + Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_55_var(TestType x) => ((x << GetConst1()) + GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_56_cns(TestType x) => ((x << Const1) - Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_56_var(TestType x) => ((x << GetConst1()) - GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_57_cns(TestType x) => ((x << Const1) & Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_57_var(TestType x) => ((x << GetConst1()) & GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_58_cns(TestType x) => ((x << Const1) | Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_58_var(TestType x) => ((x << GetConst1()) | GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_59_cns(TestType x) => ((x << Const1) ^ Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_59_var(TestType x) => ((x << GetConst1()) ^ GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_60_cns(TestType x) => ((x << Const1) >> Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_60_var(TestType x) => ((x << GetConst1()) >> GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_61_cns(TestType x) => ((x << Const1) << Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_61_var(TestType x) => ((x << GetConst1()) << GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_62_cns(TestType x) => ((x << Const1) * Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_62_var(TestType x) => ((x << GetConst1()) * GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_63_cns(TestType x) => ((x << Const1) / Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_63_var(TestType x) => ((x << GetConst1()) / GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_64_cns(TestType x) => ((x * Const1) + Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_64_var(TestType x) => ((x * GetConst1()) + GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_65_cns(TestType x) => ((x * Const1) - Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_65_var(TestType x) => ((x * GetConst1()) - GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_66_cns(TestType x) => ((x * Const1) & Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_66_var(TestType x) => ((x * GetConst1()) & GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_67_cns(TestType x) => ((x * Const1) | Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_67_var(TestType x) => ((x * GetConst1()) | GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_68_cns(TestType x) => ((x * Const1) ^ Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_68_var(TestType x) => ((x * GetConst1()) ^ GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_69_cns(TestType x) => ((x * Const1) >> Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_69_var(TestType x) => ((x * GetConst1()) >> GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_70_cns(TestType x) => ((x * Const1) << Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_70_var(TestType x) => ((x * GetConst1()) << GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_71_cns(TestType x) => ((x * Const1) * Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_71_var(TestType x) => ((x * GetConst1()) * GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_72_cns(TestType x) => ((x * Const1) / Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_72_var(TestType x) => ((x * GetConst1()) / GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_73_cns(TestType x) => ((x / Const1) + Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_73_var(TestType x) => ((x / GetConst1()) + GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_74_cns(TestType x) => ((x / Const1) - Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_74_var(TestType x) => ((x / GetConst1()) - GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_75_cns(TestType x) => ((x / Const1) & Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_75_var(TestType x) => ((x / GetConst1()) & GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_76_cns(TestType x) => ((x / Const1) | Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_76_var(TestType x) => ((x / GetConst1()) | GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_77_cns(TestType x) => ((x / Const1) ^ Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_77_var(TestType x) => ((x / GetConst1()) ^ GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_78_cns(TestType x) => ((x / Const1) >> Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_78_var(TestType x) => ((x / GetConst1()) >> GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_79_cns(TestType x) => ((x / Const1) << Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_79_var(TestType x) => ((x / GetConst1()) << GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_80_cns(TestType x) => ((x / Const1) * Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_80_var(TestType x) => ((x / GetConst1()) * GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_81_cns(TestType x) => ((x / Const1) / Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_81_var(TestType x) => ((x / GetConst1()) / GetConst2()); + + public int RunTests() + { + int failures = 0; + if (Case_1_cns(0) != Case_1_var(0)) failures++; + if (Case_1_cns(42) != Case_1_var(42)) failures++; + if (Case_1_cns(TestType.MinValue) != Case_1_var(TestType.MinValue)) failures++; + if (Case_1_cns(TestType.MaxValue) != Case_1_var(TestType.MaxValue)) failures++; + if (Case_2_cns(0) != Case_2_var(0)) failures++; + if (Case_2_cns(42) != Case_2_var(42)) failures++; + if (Case_2_cns(TestType.MinValue) != Case_2_var(TestType.MinValue)) failures++; + if (Case_2_cns(TestType.MaxValue) != Case_2_var(TestType.MaxValue)) failures++; + if (Case_3_cns(0) != Case_3_var(0)) failures++; + if (Case_3_cns(42) != Case_3_var(42)) failures++; + if (Case_3_cns(TestType.MinValue) != Case_3_var(TestType.MinValue)) failures++; + if (Case_3_cns(TestType.MaxValue) != Case_3_var(TestType.MaxValue)) failures++; + if (Case_4_cns(0) != Case_4_var(0)) failures++; + if (Case_4_cns(42) != Case_4_var(42)) failures++; + if (Case_4_cns(TestType.MinValue) != Case_4_var(TestType.MinValue)) failures++; + if (Case_4_cns(TestType.MaxValue) != Case_4_var(TestType.MaxValue)) failures++; + if (Case_5_cns(0) != Case_5_var(0)) failures++; + if (Case_5_cns(42) != Case_5_var(42)) failures++; + if (Case_5_cns(TestType.MinValue) != Case_5_var(TestType.MinValue)) failures++; + if (Case_5_cns(TestType.MaxValue) != Case_5_var(TestType.MaxValue)) failures++; + if (Case_6_cns(0) != Case_6_var(0)) failures++; + if (Case_6_cns(42) != Case_6_var(42)) failures++; + if (Case_6_cns(TestType.MinValue) != Case_6_var(TestType.MinValue)) failures++; + if (Case_6_cns(TestType.MaxValue) != Case_6_var(TestType.MaxValue)) failures++; + if (Case_7_cns(0) != Case_7_var(0)) failures++; + if (Case_7_cns(42) != Case_7_var(42)) failures++; + if (Case_7_cns(TestType.MinValue) != Case_7_var(TestType.MinValue)) failures++; + if (Case_7_cns(TestType.MaxValue) != Case_7_var(TestType.MaxValue)) failures++; + if (Case_8_cns(0) != Case_8_var(0)) failures++; + if (Case_8_cns(42) != Case_8_var(42)) failures++; + if (Case_8_cns(TestType.MinValue) != Case_8_var(TestType.MinValue)) failures++; + if (Case_8_cns(TestType.MaxValue) != Case_8_var(TestType.MaxValue)) failures++; + if (Case_9_cns(0) != Case_9_var(0)) failures++; + if (Case_9_cns(42) != Case_9_var(42)) failures++; + if (Case_9_cns(TestType.MinValue) != Case_9_var(TestType.MinValue)) failures++; + if (Case_9_cns(TestType.MaxValue) != Case_9_var(TestType.MaxValue)) failures++; + if (Case_10_cns(0) != Case_10_var(0)) failures++; + if (Case_10_cns(42) != Case_10_var(42)) failures++; + if (Case_10_cns(TestType.MinValue) != Case_10_var(TestType.MinValue)) failures++; + if (Case_10_cns(TestType.MaxValue) != Case_10_var(TestType.MaxValue)) failures++; + if (Case_11_cns(0) != Case_11_var(0)) failures++; + if (Case_11_cns(42) != Case_11_var(42)) failures++; + if (Case_11_cns(TestType.MinValue) != Case_11_var(TestType.MinValue)) failures++; + if (Case_11_cns(TestType.MaxValue) != Case_11_var(TestType.MaxValue)) failures++; + if (Case_12_cns(0) != Case_12_var(0)) failures++; + if (Case_12_cns(42) != Case_12_var(42)) failures++; + if (Case_12_cns(TestType.MinValue) != Case_12_var(TestType.MinValue)) failures++; + if (Case_12_cns(TestType.MaxValue) != Case_12_var(TestType.MaxValue)) failures++; + if (Case_13_cns(0) != Case_13_var(0)) failures++; + if (Case_13_cns(42) != Case_13_var(42)) failures++; + if (Case_13_cns(TestType.MinValue) != Case_13_var(TestType.MinValue)) failures++; + if (Case_13_cns(TestType.MaxValue) != Case_13_var(TestType.MaxValue)) failures++; + if (Case_14_cns(0) != Case_14_var(0)) failures++; + if (Case_14_cns(42) != Case_14_var(42)) failures++; + if (Case_14_cns(TestType.MinValue) != Case_14_var(TestType.MinValue)) failures++; + if (Case_14_cns(TestType.MaxValue) != Case_14_var(TestType.MaxValue)) failures++; + if (Case_15_cns(0) != Case_15_var(0)) failures++; + if (Case_15_cns(42) != Case_15_var(42)) failures++; + if (Case_15_cns(TestType.MinValue) != Case_15_var(TestType.MinValue)) failures++; + if (Case_15_cns(TestType.MaxValue) != Case_15_var(TestType.MaxValue)) failures++; + if (Case_16_cns(0) != Case_16_var(0)) failures++; + if (Case_16_cns(42) != Case_16_var(42)) failures++; + if (Case_16_cns(TestType.MinValue) != Case_16_var(TestType.MinValue)) failures++; + if (Case_16_cns(TestType.MaxValue) != Case_16_var(TestType.MaxValue)) failures++; + if (Case_17_cns(0) != Case_17_var(0)) failures++; + if (Case_17_cns(42) != Case_17_var(42)) failures++; + if (Case_17_cns(TestType.MinValue) != Case_17_var(TestType.MinValue)) failures++; + if (Case_17_cns(TestType.MaxValue) != Case_17_var(TestType.MaxValue)) failures++; + if (Case_18_cns(0) != Case_18_var(0)) failures++; + if (Case_18_cns(42) != Case_18_var(42)) failures++; + if (Case_18_cns(TestType.MinValue) != Case_18_var(TestType.MinValue)) failures++; + if (Case_18_cns(TestType.MaxValue) != Case_18_var(TestType.MaxValue)) failures++; + if (Case_19_cns(0) != Case_19_var(0)) failures++; + if (Case_19_cns(42) != Case_19_var(42)) failures++; + if (Case_19_cns(TestType.MinValue) != Case_19_var(TestType.MinValue)) failures++; + if (Case_19_cns(TestType.MaxValue) != Case_19_var(TestType.MaxValue)) failures++; + if (Case_20_cns(0) != Case_20_var(0)) failures++; + if (Case_20_cns(42) != Case_20_var(42)) failures++; + if (Case_20_cns(TestType.MinValue) != Case_20_var(TestType.MinValue)) failures++; + if (Case_20_cns(TestType.MaxValue) != Case_20_var(TestType.MaxValue)) failures++; + if (Case_21_cns(0) != Case_21_var(0)) failures++; + if (Case_21_cns(42) != Case_21_var(42)) failures++; + if (Case_21_cns(TestType.MinValue) != Case_21_var(TestType.MinValue)) failures++; + if (Case_21_cns(TestType.MaxValue) != Case_21_var(TestType.MaxValue)) failures++; + if (Case_22_cns(0) != Case_22_var(0)) failures++; + if (Case_22_cns(42) != Case_22_var(42)) failures++; + if (Case_22_cns(TestType.MinValue) != Case_22_var(TestType.MinValue)) failures++; + if (Case_22_cns(TestType.MaxValue) != Case_22_var(TestType.MaxValue)) failures++; + if (Case_23_cns(0) != Case_23_var(0)) failures++; + if (Case_23_cns(42) != Case_23_var(42)) failures++; + if (Case_23_cns(TestType.MinValue) != Case_23_var(TestType.MinValue)) failures++; + if (Case_23_cns(TestType.MaxValue) != Case_23_var(TestType.MaxValue)) failures++; + if (Case_24_cns(0) != Case_24_var(0)) failures++; + if (Case_24_cns(42) != Case_24_var(42)) failures++; + if (Case_24_cns(TestType.MinValue) != Case_24_var(TestType.MinValue)) failures++; + if (Case_24_cns(TestType.MaxValue) != Case_24_var(TestType.MaxValue)) failures++; + if (Case_25_cns(0) != Case_25_var(0)) failures++; + if (Case_25_cns(42) != Case_25_var(42)) failures++; + if (Case_25_cns(TestType.MinValue) != Case_25_var(TestType.MinValue)) failures++; + if (Case_25_cns(TestType.MaxValue) != Case_25_var(TestType.MaxValue)) failures++; + if (Case_26_cns(0) != Case_26_var(0)) failures++; + if (Case_26_cns(42) != Case_26_var(42)) failures++; + if (Case_26_cns(TestType.MinValue) != Case_26_var(TestType.MinValue)) failures++; + if (Case_26_cns(TestType.MaxValue) != Case_26_var(TestType.MaxValue)) failures++; + if (Case_27_cns(0) != Case_27_var(0)) failures++; + if (Case_27_cns(42) != Case_27_var(42)) failures++; + if (Case_27_cns(TestType.MinValue) != Case_27_var(TestType.MinValue)) failures++; + if (Case_27_cns(TestType.MaxValue) != Case_27_var(TestType.MaxValue)) failures++; + if (Case_28_cns(0) != Case_28_var(0)) failures++; + if (Case_28_cns(42) != Case_28_var(42)) failures++; + if (Case_28_cns(TestType.MinValue) != Case_28_var(TestType.MinValue)) failures++; + if (Case_28_cns(TestType.MaxValue) != Case_28_var(TestType.MaxValue)) failures++; + if (Case_29_cns(0) != Case_29_var(0)) failures++; + if (Case_29_cns(42) != Case_29_var(42)) failures++; + if (Case_29_cns(TestType.MinValue) != Case_29_var(TestType.MinValue)) failures++; + if (Case_29_cns(TestType.MaxValue) != Case_29_var(TestType.MaxValue)) failures++; + if (Case_30_cns(0) != Case_30_var(0)) failures++; + if (Case_30_cns(42) != Case_30_var(42)) failures++; + if (Case_30_cns(TestType.MinValue) != Case_30_var(TestType.MinValue)) failures++; + if (Case_30_cns(TestType.MaxValue) != Case_30_var(TestType.MaxValue)) failures++; + if (Case_31_cns(0) != Case_31_var(0)) failures++; + if (Case_31_cns(42) != Case_31_var(42)) failures++; + if (Case_31_cns(TestType.MinValue) != Case_31_var(TestType.MinValue)) failures++; + if (Case_31_cns(TestType.MaxValue) != Case_31_var(TestType.MaxValue)) failures++; + if (Case_32_cns(0) != Case_32_var(0)) failures++; + if (Case_32_cns(42) != Case_32_var(42)) failures++; + if (Case_32_cns(TestType.MinValue) != Case_32_var(TestType.MinValue)) failures++; + if (Case_32_cns(TestType.MaxValue) != Case_32_var(TestType.MaxValue)) failures++; + if (Case_33_cns(0) != Case_33_var(0)) failures++; + if (Case_33_cns(42) != Case_33_var(42)) failures++; + if (Case_33_cns(TestType.MinValue) != Case_33_var(TestType.MinValue)) failures++; + if (Case_33_cns(TestType.MaxValue) != Case_33_var(TestType.MaxValue)) failures++; + if (Case_34_cns(0) != Case_34_var(0)) failures++; + if (Case_34_cns(42) != Case_34_var(42)) failures++; + if (Case_34_cns(TestType.MinValue) != Case_34_var(TestType.MinValue)) failures++; + if (Case_34_cns(TestType.MaxValue) != Case_34_var(TestType.MaxValue)) failures++; + if (Case_35_cns(0) != Case_35_var(0)) failures++; + if (Case_35_cns(42) != Case_35_var(42)) failures++; + if (Case_35_cns(TestType.MinValue) != Case_35_var(TestType.MinValue)) failures++; + if (Case_35_cns(TestType.MaxValue) != Case_35_var(TestType.MaxValue)) failures++; + if (Case_36_cns(0) != Case_36_var(0)) failures++; + if (Case_36_cns(42) != Case_36_var(42)) failures++; + if (Case_36_cns(TestType.MinValue) != Case_36_var(TestType.MinValue)) failures++; + if (Case_36_cns(TestType.MaxValue) != Case_36_var(TestType.MaxValue)) failures++; + if (Case_37_cns(0) != Case_37_var(0)) failures++; + if (Case_37_cns(42) != Case_37_var(42)) failures++; + if (Case_37_cns(TestType.MinValue) != Case_37_var(TestType.MinValue)) failures++; + if (Case_37_cns(TestType.MaxValue) != Case_37_var(TestType.MaxValue)) failures++; + if (Case_38_cns(0) != Case_38_var(0)) failures++; + if (Case_38_cns(42) != Case_38_var(42)) failures++; + if (Case_38_cns(TestType.MinValue) != Case_38_var(TestType.MinValue)) failures++; + if (Case_38_cns(TestType.MaxValue) != Case_38_var(TestType.MaxValue)) failures++; + if (Case_39_cns(0) != Case_39_var(0)) failures++; + if (Case_39_cns(42) != Case_39_var(42)) failures++; + if (Case_39_cns(TestType.MinValue) != Case_39_var(TestType.MinValue)) failures++; + if (Case_39_cns(TestType.MaxValue) != Case_39_var(TestType.MaxValue)) failures++; + if (Case_40_cns(0) != Case_40_var(0)) failures++; + if (Case_40_cns(42) != Case_40_var(42)) failures++; + if (Case_40_cns(TestType.MinValue) != Case_40_var(TestType.MinValue)) failures++; + if (Case_40_cns(TestType.MaxValue) != Case_40_var(TestType.MaxValue)) failures++; + if (Case_41_cns(0) != Case_41_var(0)) failures++; + if (Case_41_cns(42) != Case_41_var(42)) failures++; + if (Case_41_cns(TestType.MinValue) != Case_41_var(TestType.MinValue)) failures++; + if (Case_41_cns(TestType.MaxValue) != Case_41_var(TestType.MaxValue)) failures++; + if (Case_42_cns(0) != Case_42_var(0)) failures++; + if (Case_42_cns(42) != Case_42_var(42)) failures++; + if (Case_42_cns(TestType.MinValue) != Case_42_var(TestType.MinValue)) failures++; + if (Case_42_cns(TestType.MaxValue) != Case_42_var(TestType.MaxValue)) failures++; + if (Case_43_cns(0) != Case_43_var(0)) failures++; + if (Case_43_cns(42) != Case_43_var(42)) failures++; + if (Case_43_cns(TestType.MinValue) != Case_43_var(TestType.MinValue)) failures++; + if (Case_43_cns(TestType.MaxValue) != Case_43_var(TestType.MaxValue)) failures++; + if (Case_44_cns(0) != Case_44_var(0)) failures++; + if (Case_44_cns(42) != Case_44_var(42)) failures++; + if (Case_44_cns(TestType.MinValue) != Case_44_var(TestType.MinValue)) failures++; + if (Case_44_cns(TestType.MaxValue) != Case_44_var(TestType.MaxValue)) failures++; + if (Case_45_cns(0) != Case_45_var(0)) failures++; + if (Case_45_cns(42) != Case_45_var(42)) failures++; + if (Case_45_cns(TestType.MinValue) != Case_45_var(TestType.MinValue)) failures++; + if (Case_45_cns(TestType.MaxValue) != Case_45_var(TestType.MaxValue)) failures++; + if (Case_46_cns(0) != Case_46_var(0)) failures++; + if (Case_46_cns(42) != Case_46_var(42)) failures++; + if (Case_46_cns(TestType.MinValue) != Case_46_var(TestType.MinValue)) failures++; + if (Case_46_cns(TestType.MaxValue) != Case_46_var(TestType.MaxValue)) failures++; + if (Case_47_cns(0) != Case_47_var(0)) failures++; + if (Case_47_cns(42) != Case_47_var(42)) failures++; + if (Case_47_cns(TestType.MinValue) != Case_47_var(TestType.MinValue)) failures++; + if (Case_47_cns(TestType.MaxValue) != Case_47_var(TestType.MaxValue)) failures++; + if (Case_48_cns(0) != Case_48_var(0)) failures++; + if (Case_48_cns(42) != Case_48_var(42)) failures++; + if (Case_48_cns(TestType.MinValue) != Case_48_var(TestType.MinValue)) failures++; + if (Case_48_cns(TestType.MaxValue) != Case_48_var(TestType.MaxValue)) failures++; + if (Case_49_cns(0) != Case_49_var(0)) failures++; + if (Case_49_cns(42) != Case_49_var(42)) failures++; + if (Case_49_cns(TestType.MinValue) != Case_49_var(TestType.MinValue)) failures++; + if (Case_49_cns(TestType.MaxValue) != Case_49_var(TestType.MaxValue)) failures++; + if (Case_50_cns(0) != Case_50_var(0)) failures++; + if (Case_50_cns(42) != Case_50_var(42)) failures++; + if (Case_50_cns(TestType.MinValue) != Case_50_var(TestType.MinValue)) failures++; + if (Case_50_cns(TestType.MaxValue) != Case_50_var(TestType.MaxValue)) failures++; + if (Case_51_cns(0) != Case_51_var(0)) failures++; + if (Case_51_cns(42) != Case_51_var(42)) failures++; + if (Case_51_cns(TestType.MinValue) != Case_51_var(TestType.MinValue)) failures++; + if (Case_51_cns(TestType.MaxValue) != Case_51_var(TestType.MaxValue)) failures++; + if (Case_52_cns(0) != Case_52_var(0)) failures++; + if (Case_52_cns(42) != Case_52_var(42)) failures++; + if (Case_52_cns(TestType.MinValue) != Case_52_var(TestType.MinValue)) failures++; + if (Case_52_cns(TestType.MaxValue) != Case_52_var(TestType.MaxValue)) failures++; + if (Case_53_cns(0) != Case_53_var(0)) failures++; + if (Case_53_cns(42) != Case_53_var(42)) failures++; + if (Case_53_cns(TestType.MinValue) != Case_53_var(TestType.MinValue)) failures++; + if (Case_53_cns(TestType.MaxValue) != Case_53_var(TestType.MaxValue)) failures++; + if (Case_54_cns(0) != Case_54_var(0)) failures++; + if (Case_54_cns(42) != Case_54_var(42)) failures++; + if (Case_54_cns(TestType.MinValue) != Case_54_var(TestType.MinValue)) failures++; + if (Case_54_cns(TestType.MaxValue) != Case_54_var(TestType.MaxValue)) failures++; + if (Case_55_cns(0) != Case_55_var(0)) failures++; + if (Case_55_cns(42) != Case_55_var(42)) failures++; + if (Case_55_cns(TestType.MinValue) != Case_55_var(TestType.MinValue)) failures++; + if (Case_55_cns(TestType.MaxValue) != Case_55_var(TestType.MaxValue)) failures++; + if (Case_56_cns(0) != Case_56_var(0)) failures++; + if (Case_56_cns(42) != Case_56_var(42)) failures++; + if (Case_56_cns(TestType.MinValue) != Case_56_var(TestType.MinValue)) failures++; + if (Case_56_cns(TestType.MaxValue) != Case_56_var(TestType.MaxValue)) failures++; + if (Case_57_cns(0) != Case_57_var(0)) failures++; + if (Case_57_cns(42) != Case_57_var(42)) failures++; + if (Case_57_cns(TestType.MinValue) != Case_57_var(TestType.MinValue)) failures++; + if (Case_57_cns(TestType.MaxValue) != Case_57_var(TestType.MaxValue)) failures++; + if (Case_58_cns(0) != Case_58_var(0)) failures++; + if (Case_58_cns(42) != Case_58_var(42)) failures++; + if (Case_58_cns(TestType.MinValue) != Case_58_var(TestType.MinValue)) failures++; + if (Case_58_cns(TestType.MaxValue) != Case_58_var(TestType.MaxValue)) failures++; + if (Case_59_cns(0) != Case_59_var(0)) failures++; + if (Case_59_cns(42) != Case_59_var(42)) failures++; + if (Case_59_cns(TestType.MinValue) != Case_59_var(TestType.MinValue)) failures++; + if (Case_59_cns(TestType.MaxValue) != Case_59_var(TestType.MaxValue)) failures++; + if (Case_60_cns(0) != Case_60_var(0)) failures++; + if (Case_60_cns(42) != Case_60_var(42)) failures++; + if (Case_60_cns(TestType.MinValue) != Case_60_var(TestType.MinValue)) failures++; + if (Case_60_cns(TestType.MaxValue) != Case_60_var(TestType.MaxValue)) failures++; + if (Case_61_cns(0) != Case_61_var(0)) failures++; + if (Case_61_cns(42) != Case_61_var(42)) failures++; + if (Case_61_cns(TestType.MinValue) != Case_61_var(TestType.MinValue)) failures++; + if (Case_61_cns(TestType.MaxValue) != Case_61_var(TestType.MaxValue)) failures++; + if (Case_62_cns(0) != Case_62_var(0)) failures++; + if (Case_62_cns(42) != Case_62_var(42)) failures++; + if (Case_62_cns(TestType.MinValue) != Case_62_var(TestType.MinValue)) failures++; + if (Case_62_cns(TestType.MaxValue) != Case_62_var(TestType.MaxValue)) failures++; + if (Case_63_cns(0) != Case_63_var(0)) failures++; + if (Case_63_cns(42) != Case_63_var(42)) failures++; + if (Case_63_cns(TestType.MinValue) != Case_63_var(TestType.MinValue)) failures++; + if (Case_63_cns(TestType.MaxValue) != Case_63_var(TestType.MaxValue)) failures++; + if (Case_64_cns(0) != Case_64_var(0)) failures++; + if (Case_64_cns(42) != Case_64_var(42)) failures++; + if (Case_64_cns(TestType.MinValue) != Case_64_var(TestType.MinValue)) failures++; + if (Case_64_cns(TestType.MaxValue) != Case_64_var(TestType.MaxValue)) failures++; + if (Case_65_cns(0) != Case_65_var(0)) failures++; + if (Case_65_cns(42) != Case_65_var(42)) failures++; + if (Case_65_cns(TestType.MinValue) != Case_65_var(TestType.MinValue)) failures++; + if (Case_65_cns(TestType.MaxValue) != Case_65_var(TestType.MaxValue)) failures++; + if (Case_66_cns(0) != Case_66_var(0)) failures++; + if (Case_66_cns(42) != Case_66_var(42)) failures++; + if (Case_66_cns(TestType.MinValue) != Case_66_var(TestType.MinValue)) failures++; + if (Case_66_cns(TestType.MaxValue) != Case_66_var(TestType.MaxValue)) failures++; + if (Case_67_cns(0) != Case_67_var(0)) failures++; + if (Case_67_cns(42) != Case_67_var(42)) failures++; + if (Case_67_cns(TestType.MinValue) != Case_67_var(TestType.MinValue)) failures++; + if (Case_67_cns(TestType.MaxValue) != Case_67_var(TestType.MaxValue)) failures++; + if (Case_68_cns(0) != Case_68_var(0)) failures++; + if (Case_68_cns(42) != Case_68_var(42)) failures++; + if (Case_68_cns(TestType.MinValue) != Case_68_var(TestType.MinValue)) failures++; + if (Case_68_cns(TestType.MaxValue) != Case_68_var(TestType.MaxValue)) failures++; + if (Case_69_cns(0) != Case_69_var(0)) failures++; + if (Case_69_cns(42) != Case_69_var(42)) failures++; + if (Case_69_cns(TestType.MinValue) != Case_69_var(TestType.MinValue)) failures++; + if (Case_69_cns(TestType.MaxValue) != Case_69_var(TestType.MaxValue)) failures++; + if (Case_70_cns(0) != Case_70_var(0)) failures++; + if (Case_70_cns(42) != Case_70_var(42)) failures++; + if (Case_70_cns(TestType.MinValue) != Case_70_var(TestType.MinValue)) failures++; + if (Case_70_cns(TestType.MaxValue) != Case_70_var(TestType.MaxValue)) failures++; + if (Case_71_cns(0) != Case_71_var(0)) failures++; + if (Case_71_cns(42) != Case_71_var(42)) failures++; + if (Case_71_cns(TestType.MinValue) != Case_71_var(TestType.MinValue)) failures++; + if (Case_71_cns(TestType.MaxValue) != Case_71_var(TestType.MaxValue)) failures++; + if (Case_72_cns(0) != Case_72_var(0)) failures++; + if (Case_72_cns(42) != Case_72_var(42)) failures++; + if (Case_72_cns(TestType.MinValue) != Case_72_var(TestType.MinValue)) failures++; + if (Case_72_cns(TestType.MaxValue) != Case_72_var(TestType.MaxValue)) failures++; + if (Case_73_cns(0) != Case_73_var(0)) failures++; + if (Case_73_cns(42) != Case_73_var(42)) failures++; + if (Case_73_cns(TestType.MinValue) != Case_73_var(TestType.MinValue)) failures++; + if (Case_73_cns(TestType.MaxValue) != Case_73_var(TestType.MaxValue)) failures++; + if (Case_74_cns(0) != Case_74_var(0)) failures++; + if (Case_74_cns(42) != Case_74_var(42)) failures++; + if (Case_74_cns(TestType.MinValue) != Case_74_var(TestType.MinValue)) failures++; + if (Case_74_cns(TestType.MaxValue) != Case_74_var(TestType.MaxValue)) failures++; + if (Case_75_cns(0) != Case_75_var(0)) failures++; + if (Case_75_cns(42) != Case_75_var(42)) failures++; + if (Case_75_cns(TestType.MinValue) != Case_75_var(TestType.MinValue)) failures++; + if (Case_75_cns(TestType.MaxValue) != Case_75_var(TestType.MaxValue)) failures++; + if (Case_76_cns(0) != Case_76_var(0)) failures++; + if (Case_76_cns(42) != Case_76_var(42)) failures++; + if (Case_76_cns(TestType.MinValue) != Case_76_var(TestType.MinValue)) failures++; + if (Case_76_cns(TestType.MaxValue) != Case_76_var(TestType.MaxValue)) failures++; + if (Case_77_cns(0) != Case_77_var(0)) failures++; + if (Case_77_cns(42) != Case_77_var(42)) failures++; + if (Case_77_cns(TestType.MinValue) != Case_77_var(TestType.MinValue)) failures++; + if (Case_77_cns(TestType.MaxValue) != Case_77_var(TestType.MaxValue)) failures++; + if (Case_78_cns(0) != Case_78_var(0)) failures++; + if (Case_78_cns(42) != Case_78_var(42)) failures++; + if (Case_78_cns(TestType.MinValue) != Case_78_var(TestType.MinValue)) failures++; + if (Case_78_cns(TestType.MaxValue) != Case_78_var(TestType.MaxValue)) failures++; + if (Case_79_cns(0) != Case_79_var(0)) failures++; + if (Case_79_cns(42) != Case_79_var(42)) failures++; + if (Case_79_cns(TestType.MinValue) != Case_79_var(TestType.MinValue)) failures++; + if (Case_79_cns(TestType.MaxValue) != Case_79_var(TestType.MaxValue)) failures++; + if (Case_80_cns(0) != Case_80_var(0)) failures++; + if (Case_80_cns(42) != Case_80_var(42)) failures++; + if (Case_80_cns(TestType.MinValue) != Case_80_var(TestType.MinValue)) failures++; + if (Case_80_cns(TestType.MaxValue) != Case_80_var(TestType.MaxValue)) failures++; + if (Case_81_cns(0) != Case_81_var(0)) failures++; + if (Case_81_cns(42) != Case_81_var(42)) failures++; + if (Case_81_cns(TestType.MinValue) != Case_81_var(TestType.MinValue)) failures++; + if (Case_81_cns(TestType.MaxValue) != Case_81_var(TestType.MaxValue)) failures++; + return failures; + } +} + +// x op icon1==icon2 +public class ConstantFoldingTests2 : ConstantFoldingTestsBase +{ + [MethodImpl(MethodImplOptions.NoInlining)] bool Case_1_cns(TestType x) => ((x + Const1) == Const2); + [MethodImpl(MethodImplOptions.NoInlining)] bool Case_1_var(TestType x) => ((x + GetConst1()) == GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] bool Case_2_cns(TestType x) => ((x - Const1) == Const2); + [MethodImpl(MethodImplOptions.NoInlining)] bool Case_2_var(TestType x) => ((x - GetConst1()) == GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] bool Case_3_cns(TestType x) => ((x & Const1) == Const2); + [MethodImpl(MethodImplOptions.NoInlining)] bool Case_3_var(TestType x) => ((x & GetConst1()) == GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] bool Case_4_cns(TestType x) => ((x | Const1) == Const2); + [MethodImpl(MethodImplOptions.NoInlining)] bool Case_4_var(TestType x) => ((x | GetConst1()) == GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] bool Case_5_cns(TestType x) => ((x ^ Const1) == Const2); + [MethodImpl(MethodImplOptions.NoInlining)] bool Case_5_var(TestType x) => ((x ^ GetConst1()) == GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] bool Case_6_cns(TestType x) => ((x >> Const1) == Const2); + [MethodImpl(MethodImplOptions.NoInlining)] bool Case_6_var(TestType x) => ((x >> GetConst1()) == GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] bool Case_7_cns(TestType x) => ((x << Const1) == Const2); + [MethodImpl(MethodImplOptions.NoInlining)] bool Case_7_var(TestType x) => ((x << GetConst1()) == GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] bool Case_8_cns(TestType x) => ((x * Const1) == Const2); + [MethodImpl(MethodImplOptions.NoInlining)] bool Case_8_var(TestType x) => ((x * GetConst1()) == GetConst2()); + + [MethodImpl(MethodImplOptions.NoInlining)] bool Case_9_cns(TestType x) => ((x / Const1) == Const2); + [MethodImpl(MethodImplOptions.NoInlining)] bool Case_9_var(TestType x) => ((x / GetConst1()) == GetConst2()); + + public int RunTests() + { + int failures = 0; + if (Case_1_cns(0) != Case_1_var(0)) failures++; + if (Case_1_cns(42) != Case_1_var(42)) failures++; + if (Case_1_cns(TestType.MinValue) != Case_1_var(TestType.MinValue)) failures++; + if (Case_1_cns(TestType.MaxValue) != Case_1_var(TestType.MaxValue)) failures++; + if (Case_2_cns(0) != Case_2_var(0)) failures++; + if (Case_2_cns(42) != Case_2_var(42)) failures++; + if (Case_2_cns(TestType.MinValue) != Case_2_var(TestType.MinValue)) failures++; + if (Case_2_cns(TestType.MaxValue) != Case_2_var(TestType.MaxValue)) failures++; + if (Case_3_cns(0) != Case_3_var(0)) failures++; + if (Case_3_cns(42) != Case_3_var(42)) failures++; + if (Case_3_cns(TestType.MinValue) != Case_3_var(TestType.MinValue)) failures++; + if (Case_3_cns(TestType.MaxValue) != Case_3_var(TestType.MaxValue)) failures++; + if (Case_4_cns(0) != Case_4_var(0)) failures++; + if (Case_4_cns(42) != Case_4_var(42)) failures++; + if (Case_4_cns(TestType.MinValue) != Case_4_var(TestType.MinValue)) failures++; + if (Case_4_cns(TestType.MaxValue) != Case_4_var(TestType.MaxValue)) failures++; + if (Case_5_cns(0) != Case_5_var(0)) failures++; + if (Case_5_cns(42) != Case_5_var(42)) failures++; + if (Case_5_cns(TestType.MinValue) != Case_5_var(TestType.MinValue)) failures++; + if (Case_5_cns(TestType.MaxValue) != Case_5_var(TestType.MaxValue)) failures++; + if (Case_6_cns(0) != Case_6_var(0)) failures++; + if (Case_6_cns(42) != Case_6_var(42)) failures++; + if (Case_6_cns(TestType.MinValue) != Case_6_var(TestType.MinValue)) failures++; + if (Case_6_cns(TestType.MaxValue) != Case_6_var(TestType.MaxValue)) failures++; + if (Case_7_cns(0) != Case_7_var(0)) failures++; + if (Case_7_cns(42) != Case_7_var(42)) failures++; + if (Case_7_cns(TestType.MinValue) != Case_7_var(TestType.MinValue)) failures++; + if (Case_7_cns(TestType.MaxValue) != Case_7_var(TestType.MaxValue)) failures++; + if (Case_8_cns(0) != Case_8_var(0)) failures++; + if (Case_8_cns(42) != Case_8_var(42)) failures++; + if (Case_8_cns(TestType.MinValue) != Case_8_var(TestType.MinValue)) failures++; + if (Case_8_cns(TestType.MaxValue) != Case_8_var(TestType.MaxValue)) failures++; + if (Case_9_cns(0) != Case_9_var(0)) failures++; + if (Case_9_cns(42) != Case_9_var(42)) failures++; + if (Case_9_cns(TestType.MinValue) != Case_9_var(TestType.MinValue)) failures++; + if (Case_9_cns(TestType.MaxValue) != Case_9_var(TestType.MaxValue)) failures++; + return failures; + } +} + +// ((x+icon1)+(y+icon2)) +public class ConstantFoldingTests3 : ConstantFoldingTestsBase +{ + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_1_cns(TestType x, TestType y) => ((x + Const1) + (y + Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_1_var(TestType x, TestType y) => ((x + GetConst1()) + (y + GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_2_cns(TestType x, TestType y) => ((x + Const1) + (y - Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_2_var(TestType x, TestType y) => ((x + GetConst1()) + (y - GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_3_cns(TestType x, TestType y) => ((x + Const1) + (y & Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_3_var(TestType x, TestType y) => ((x + GetConst1()) + (y & GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_4_cns(TestType x, TestType y) => ((x + Const1) + (y | Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_4_var(TestType x, TestType y) => ((x + GetConst1()) + (y | GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_5_cns(TestType x, TestType y) => ((x + Const1) + (y ^ Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_5_var(TestType x, TestType y) => ((x + GetConst1()) + (y ^ GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_6_cns(TestType x, TestType y) => ((x + Const1) + (y >> Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_6_var(TestType x, TestType y) => ((x + GetConst1()) + (y >> GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_7_cns(TestType x, TestType y) => ((x + Const1) + (y << Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_7_var(TestType x, TestType y) => ((x + GetConst1()) + (y << GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_8_cns(TestType x, TestType y) => ((x + Const1) + (y * Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_8_var(TestType x, TestType y) => ((x + GetConst1()) + (y * GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_9_cns(TestType x, TestType y) => ((x + Const1) + (y / Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_9_var(TestType x, TestType y) => ((x + GetConst1()) + (y / GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_10_cns(TestType x, TestType y) => ((x - Const1) + (y + Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_10_var(TestType x, TestType y) => ((x - GetConst1()) + (y + GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_11_cns(TestType x, TestType y) => ((x - Const1) + (y - Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_11_var(TestType x, TestType y) => ((x - GetConst1()) + (y - GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_12_cns(TestType x, TestType y) => ((x - Const1) + (y & Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_12_var(TestType x, TestType y) => ((x - GetConst1()) + (y & GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_13_cns(TestType x, TestType y) => ((x - Const1) + (y | Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_13_var(TestType x, TestType y) => ((x - GetConst1()) + (y | GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_14_cns(TestType x, TestType y) => ((x - Const1) + (y ^ Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_14_var(TestType x, TestType y) => ((x - GetConst1()) + (y ^ GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_15_cns(TestType x, TestType y) => ((x - Const1) + (y >> Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_15_var(TestType x, TestType y) => ((x - GetConst1()) + (y >> GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_16_cns(TestType x, TestType y) => ((x - Const1) + (y << Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_16_var(TestType x, TestType y) => ((x - GetConst1()) + (y << GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_17_cns(TestType x, TestType y) => ((x - Const1) + (y * Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_17_var(TestType x, TestType y) => ((x - GetConst1()) + (y * GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_18_cns(TestType x, TestType y) => ((x - Const1) + (y / Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_18_var(TestType x, TestType y) => ((x - GetConst1()) + (y / GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_19_cns(TestType x, TestType y) => ((x & Const1) + (y + Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_19_var(TestType x, TestType y) => ((x & GetConst1()) + (y + GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_20_cns(TestType x, TestType y) => ((x & Const1) + (y - Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_20_var(TestType x, TestType y) => ((x & GetConst1()) + (y - GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_21_cns(TestType x, TestType y) => ((x & Const1) + (y & Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_21_var(TestType x, TestType y) => ((x & GetConst1()) + (y & GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_22_cns(TestType x, TestType y) => ((x & Const1) + (y | Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_22_var(TestType x, TestType y) => ((x & GetConst1()) + (y | GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_23_cns(TestType x, TestType y) => ((x & Const1) + (y ^ Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_23_var(TestType x, TestType y) => ((x & GetConst1()) + (y ^ GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_24_cns(TestType x, TestType y) => ((x & Const1) + (y >> Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_24_var(TestType x, TestType y) => ((x & GetConst1()) + (y >> GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_25_cns(TestType x, TestType y) => ((x & Const1) + (y << Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_25_var(TestType x, TestType y) => ((x & GetConst1()) + (y << GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_26_cns(TestType x, TestType y) => ((x & Const1) + (y * Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_26_var(TestType x, TestType y) => ((x & GetConst1()) + (y * GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_27_cns(TestType x, TestType y) => ((x & Const1) + (y / Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_27_var(TestType x, TestType y) => ((x & GetConst1()) + (y / GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_28_cns(TestType x, TestType y) => ((x | Const1) + (y + Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_28_var(TestType x, TestType y) => ((x | GetConst1()) + (y + GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_29_cns(TestType x, TestType y) => ((x | Const1) + (y - Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_29_var(TestType x, TestType y) => ((x | GetConst1()) + (y - GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_30_cns(TestType x, TestType y) => ((x | Const1) + (y & Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_30_var(TestType x, TestType y) => ((x | GetConst1()) + (y & GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_31_cns(TestType x, TestType y) => ((x | Const1) + (y | Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_31_var(TestType x, TestType y) => ((x | GetConst1()) + (y | GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_32_cns(TestType x, TestType y) => ((x | Const1) + (y ^ Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_32_var(TestType x, TestType y) => ((x | GetConst1()) + (y ^ GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_33_cns(TestType x, TestType y) => ((x | Const1) + (y >> Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_33_var(TestType x, TestType y) => ((x | GetConst1()) + (y >> GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_34_cns(TestType x, TestType y) => ((x | Const1) + (y << Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_34_var(TestType x, TestType y) => ((x | GetConst1()) + (y << GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_35_cns(TestType x, TestType y) => ((x | Const1) + (y * Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_35_var(TestType x, TestType y) => ((x | GetConst1()) + (y * GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_36_cns(TestType x, TestType y) => ((x | Const1) + (y / Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_36_var(TestType x, TestType y) => ((x | GetConst1()) + (y / GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_37_cns(TestType x, TestType y) => ((x ^ Const1) + (y + Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_37_var(TestType x, TestType y) => ((x ^ GetConst1()) + (y + GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_38_cns(TestType x, TestType y) => ((x ^ Const1) + (y - Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_38_var(TestType x, TestType y) => ((x ^ GetConst1()) + (y - GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_39_cns(TestType x, TestType y) => ((x ^ Const1) + (y & Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_39_var(TestType x, TestType y) => ((x ^ GetConst1()) + (y & GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_40_cns(TestType x, TestType y) => ((x ^ Const1) + (y | Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_40_var(TestType x, TestType y) => ((x ^ GetConst1()) + (y | GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_41_cns(TestType x, TestType y) => ((x ^ Const1) + (y ^ Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_41_var(TestType x, TestType y) => ((x ^ GetConst1()) + (y ^ GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_42_cns(TestType x, TestType y) => ((x ^ Const1) + (y >> Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_42_var(TestType x, TestType y) => ((x ^ GetConst1()) + (y >> GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_43_cns(TestType x, TestType y) => ((x ^ Const1) + (y << Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_43_var(TestType x, TestType y) => ((x ^ GetConst1()) + (y << GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_44_cns(TestType x, TestType y) => ((x ^ Const1) + (y * Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_44_var(TestType x, TestType y) => ((x ^ GetConst1()) + (y * GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_45_cns(TestType x, TestType y) => ((x ^ Const1) + (y / Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_45_var(TestType x, TestType y) => ((x ^ GetConst1()) + (y / GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_46_cns(TestType x, TestType y) => ((x >> Const1) + (y + Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_46_var(TestType x, TestType y) => ((x >> GetConst1()) + (y + GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_47_cns(TestType x, TestType y) => ((x >> Const1) + (y - Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_47_var(TestType x, TestType y) => ((x >> GetConst1()) + (y - GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_48_cns(TestType x, TestType y) => ((x >> Const1) + (y & Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_48_var(TestType x, TestType y) => ((x >> GetConst1()) + (y & GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_49_cns(TestType x, TestType y) => ((x >> Const1) + (y | Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_49_var(TestType x, TestType y) => ((x >> GetConst1()) + (y | GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_50_cns(TestType x, TestType y) => ((x >> Const1) + (y ^ Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_50_var(TestType x, TestType y) => ((x >> GetConst1()) + (y ^ GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_51_cns(TestType x, TestType y) => ((x >> Const1) + (y >> Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_51_var(TestType x, TestType y) => ((x >> GetConst1()) + (y >> GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_52_cns(TestType x, TestType y) => ((x >> Const1) + (y << Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_52_var(TestType x, TestType y) => ((x >> GetConst1()) + (y << GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_53_cns(TestType x, TestType y) => ((x >> Const1) + (y * Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_53_var(TestType x, TestType y) => ((x >> GetConst1()) + (y * GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_54_cns(TestType x, TestType y) => ((x >> Const1) + (y / Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_54_var(TestType x, TestType y) => ((x >> GetConst1()) + (y / GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_55_cns(TestType x, TestType y) => ((x << Const1) + (y + Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_55_var(TestType x, TestType y) => ((x << GetConst1()) + (y + GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_56_cns(TestType x, TestType y) => ((x << Const1) + (y - Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_56_var(TestType x, TestType y) => ((x << GetConst1()) + (y - GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_57_cns(TestType x, TestType y) => ((x << Const1) + (y & Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_57_var(TestType x, TestType y) => ((x << GetConst1()) + (y & GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_58_cns(TestType x, TestType y) => ((x << Const1) + (y | Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_58_var(TestType x, TestType y) => ((x << GetConst1()) + (y | GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_59_cns(TestType x, TestType y) => ((x << Const1) + (y ^ Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_59_var(TestType x, TestType y) => ((x << GetConst1()) + (y ^ GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_60_cns(TestType x, TestType y) => ((x << Const1) + (y >> Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_60_var(TestType x, TestType y) => ((x << GetConst1()) + (y >> GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_61_cns(TestType x, TestType y) => ((x << Const1) + (y << Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_61_var(TestType x, TestType y) => ((x << GetConst1()) + (y << GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_62_cns(TestType x, TestType y) => ((x << Const1) + (y * Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_62_var(TestType x, TestType y) => ((x << GetConst1()) + (y * GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_63_cns(TestType x, TestType y) => ((x << Const1) + (y / Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_63_var(TestType x, TestType y) => ((x << GetConst1()) + (y / GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_64_cns(TestType x, TestType y) => ((x * Const1) + (y + Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_64_var(TestType x, TestType y) => ((x * GetConst1()) + (y + GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_65_cns(TestType x, TestType y) => ((x * Const1) + (y - Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_65_var(TestType x, TestType y) => ((x * GetConst1()) + (y - GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_66_cns(TestType x, TestType y) => ((x * Const1) + (y & Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_66_var(TestType x, TestType y) => ((x * GetConst1()) + (y & GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_67_cns(TestType x, TestType y) => ((x * Const1) + (y | Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_67_var(TestType x, TestType y) => ((x * GetConst1()) + (y | GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_68_cns(TestType x, TestType y) => ((x * Const1) + (y ^ Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_68_var(TestType x, TestType y) => ((x * GetConst1()) + (y ^ GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_69_cns(TestType x, TestType y) => ((x * Const1) + (y >> Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_69_var(TestType x, TestType y) => ((x * GetConst1()) + (y >> GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_70_cns(TestType x, TestType y) => ((x * Const1) + (y << Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_70_var(TestType x, TestType y) => ((x * GetConst1()) + (y << GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_71_cns(TestType x, TestType y) => ((x * Const1) + (y * Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_71_var(TestType x, TestType y) => ((x * GetConst1()) + (y * GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_72_cns(TestType x, TestType y) => ((x * Const1) + (y / Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_72_var(TestType x, TestType y) => ((x * GetConst1()) + (y / GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_73_cns(TestType x, TestType y) => ((x / Const1) + (y + Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_73_var(TestType x, TestType y) => ((x / GetConst1()) + (y + GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_74_cns(TestType x, TestType y) => ((x / Const1) + (y - Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_74_var(TestType x, TestType y) => ((x / GetConst1()) + (y - GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_75_cns(TestType x, TestType y) => ((x / Const1) + (y & Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_75_var(TestType x, TestType y) => ((x / GetConst1()) + (y & GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_76_cns(TestType x, TestType y) => ((x / Const1) + (y | Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_76_var(TestType x, TestType y) => ((x / GetConst1()) + (y | GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_77_cns(TestType x, TestType y) => ((x / Const1) + (y ^ Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_77_var(TestType x, TestType y) => ((x / GetConst1()) + (y ^ GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_78_cns(TestType x, TestType y) => ((x / Const1) + (y >> Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_78_var(TestType x, TestType y) => ((x / GetConst1()) + (y >> GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_79_cns(TestType x, TestType y) => ((x / Const1) + (y << Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_79_var(TestType x, TestType y) => ((x / GetConst1()) + (y << GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_80_cns(TestType x, TestType y) => ((x / Const1) + (y * Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_80_var(TestType x, TestType y) => ((x / GetConst1()) + (y * GetConst2())); + + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_81_cns(TestType x, TestType y) => ((x / Const1) + (y / Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_81_var(TestType x, TestType y) => ((x / GetConst1()) + (y / GetConst2())); + + public int RunTests() + { + int failures = 0; + if (Case_1_cns(0, 0) != Case_1_var(0, 0)) failures++; + if (Case_1_cns(42, 42) != Case_1_var(42, 42)) failures++; + if (Case_1_cns(TestType.MinValue, TestType.MinValue) != Case_1_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_1_cns(TestType.MaxValue, TestType.MaxValue) != Case_1_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_1_cns(TestType.MaxValue, TestType.MinValue) != Case_1_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_1_cns(TestType.MinValue, TestType.MaxValue) != Case_1_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_2_cns(0, 0) != Case_2_var(0, 0)) failures++; + if (Case_2_cns(42, 42) != Case_2_var(42, 42)) failures++; + if (Case_2_cns(TestType.MinValue, TestType.MinValue) != Case_2_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_2_cns(TestType.MaxValue, TestType.MaxValue) != Case_2_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_2_cns(TestType.MaxValue, TestType.MinValue) != Case_2_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_2_cns(TestType.MinValue, TestType.MaxValue) != Case_2_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_3_cns(0, 0) != Case_3_var(0, 0)) failures++; + if (Case_3_cns(42, 42) != Case_3_var(42, 42)) failures++; + if (Case_3_cns(TestType.MinValue, TestType.MinValue) != Case_3_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_3_cns(TestType.MaxValue, TestType.MaxValue) != Case_3_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_3_cns(TestType.MaxValue, TestType.MinValue) != Case_3_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_3_cns(TestType.MinValue, TestType.MaxValue) != Case_3_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_4_cns(0, 0) != Case_4_var(0, 0)) failures++; + if (Case_4_cns(42, 42) != Case_4_var(42, 42)) failures++; + if (Case_4_cns(TestType.MinValue, TestType.MinValue) != Case_4_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_4_cns(TestType.MaxValue, TestType.MaxValue) != Case_4_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_4_cns(TestType.MaxValue, TestType.MinValue) != Case_4_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_4_cns(TestType.MinValue, TestType.MaxValue) != Case_4_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_5_cns(0, 0) != Case_5_var(0, 0)) failures++; + if (Case_5_cns(42, 42) != Case_5_var(42, 42)) failures++; + if (Case_5_cns(TestType.MinValue, TestType.MinValue) != Case_5_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_5_cns(TestType.MaxValue, TestType.MaxValue) != Case_5_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_5_cns(TestType.MaxValue, TestType.MinValue) != Case_5_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_5_cns(TestType.MinValue, TestType.MaxValue) != Case_5_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_6_cns(0, 0) != Case_6_var(0, 0)) failures++; + if (Case_6_cns(42, 42) != Case_6_var(42, 42)) failures++; + if (Case_6_cns(TestType.MinValue, TestType.MinValue) != Case_6_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_6_cns(TestType.MaxValue, TestType.MaxValue) != Case_6_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_6_cns(TestType.MaxValue, TestType.MinValue) != Case_6_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_6_cns(TestType.MinValue, TestType.MaxValue) != Case_6_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_7_cns(0, 0) != Case_7_var(0, 0)) failures++; + if (Case_7_cns(42, 42) != Case_7_var(42, 42)) failures++; + if (Case_7_cns(TestType.MinValue, TestType.MinValue) != Case_7_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_7_cns(TestType.MaxValue, TestType.MaxValue) != Case_7_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_7_cns(TestType.MaxValue, TestType.MinValue) != Case_7_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_7_cns(TestType.MinValue, TestType.MaxValue) != Case_7_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_8_cns(0, 0) != Case_8_var(0, 0)) failures++; + if (Case_8_cns(42, 42) != Case_8_var(42, 42)) failures++; + if (Case_8_cns(TestType.MinValue, TestType.MinValue) != Case_8_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_8_cns(TestType.MaxValue, TestType.MaxValue) != Case_8_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_8_cns(TestType.MaxValue, TestType.MinValue) != Case_8_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_8_cns(TestType.MinValue, TestType.MaxValue) != Case_8_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_9_cns(0, 0) != Case_9_var(0, 0)) failures++; + if (Case_9_cns(42, 42) != Case_9_var(42, 42)) failures++; + if (Case_9_cns(TestType.MinValue, TestType.MinValue) != Case_9_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_9_cns(TestType.MaxValue, TestType.MaxValue) != Case_9_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_9_cns(TestType.MaxValue, TestType.MinValue) != Case_9_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_9_cns(TestType.MinValue, TestType.MaxValue) != Case_9_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_10_cns(0, 0) != Case_10_var(0, 0)) failures++; + if (Case_10_cns(42, 42) != Case_10_var(42, 42)) failures++; + if (Case_10_cns(TestType.MinValue, TestType.MinValue) != Case_10_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_10_cns(TestType.MaxValue, TestType.MaxValue) != Case_10_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_10_cns(TestType.MaxValue, TestType.MinValue) != Case_10_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_10_cns(TestType.MinValue, TestType.MaxValue) != Case_10_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_11_cns(0, 0) != Case_11_var(0, 0)) failures++; + if (Case_11_cns(42, 42) != Case_11_var(42, 42)) failures++; + if (Case_11_cns(TestType.MinValue, TestType.MinValue) != Case_11_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_11_cns(TestType.MaxValue, TestType.MaxValue) != Case_11_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_11_cns(TestType.MaxValue, TestType.MinValue) != Case_11_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_11_cns(TestType.MinValue, TestType.MaxValue) != Case_11_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_12_cns(0, 0) != Case_12_var(0, 0)) failures++; + if (Case_12_cns(42, 42) != Case_12_var(42, 42)) failures++; + if (Case_12_cns(TestType.MinValue, TestType.MinValue) != Case_12_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_12_cns(TestType.MaxValue, TestType.MaxValue) != Case_12_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_12_cns(TestType.MaxValue, TestType.MinValue) != Case_12_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_12_cns(TestType.MinValue, TestType.MaxValue) != Case_12_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_13_cns(0, 0) != Case_13_var(0, 0)) failures++; + if (Case_13_cns(42, 42) != Case_13_var(42, 42)) failures++; + if (Case_13_cns(TestType.MinValue, TestType.MinValue) != Case_13_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_13_cns(TestType.MaxValue, TestType.MaxValue) != Case_13_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_13_cns(TestType.MaxValue, TestType.MinValue) != Case_13_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_13_cns(TestType.MinValue, TestType.MaxValue) != Case_13_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_14_cns(0, 0) != Case_14_var(0, 0)) failures++; + if (Case_14_cns(42, 42) != Case_14_var(42, 42)) failures++; + if (Case_14_cns(TestType.MinValue, TestType.MinValue) != Case_14_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_14_cns(TestType.MaxValue, TestType.MaxValue) != Case_14_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_14_cns(TestType.MaxValue, TestType.MinValue) != Case_14_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_14_cns(TestType.MinValue, TestType.MaxValue) != Case_14_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_15_cns(0, 0) != Case_15_var(0, 0)) failures++; + if (Case_15_cns(42, 42) != Case_15_var(42, 42)) failures++; + if (Case_15_cns(TestType.MinValue, TestType.MinValue) != Case_15_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_15_cns(TestType.MaxValue, TestType.MaxValue) != Case_15_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_15_cns(TestType.MaxValue, TestType.MinValue) != Case_15_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_15_cns(TestType.MinValue, TestType.MaxValue) != Case_15_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_16_cns(0, 0) != Case_16_var(0, 0)) failures++; + if (Case_16_cns(42, 42) != Case_16_var(42, 42)) failures++; + if (Case_16_cns(TestType.MinValue, TestType.MinValue) != Case_16_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_16_cns(TestType.MaxValue, TestType.MaxValue) != Case_16_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_16_cns(TestType.MaxValue, TestType.MinValue) != Case_16_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_16_cns(TestType.MinValue, TestType.MaxValue) != Case_16_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_17_cns(0, 0) != Case_17_var(0, 0)) failures++; + if (Case_17_cns(42, 42) != Case_17_var(42, 42)) failures++; + if (Case_17_cns(TestType.MinValue, TestType.MinValue) != Case_17_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_17_cns(TestType.MaxValue, TestType.MaxValue) != Case_17_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_17_cns(TestType.MaxValue, TestType.MinValue) != Case_17_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_17_cns(TestType.MinValue, TestType.MaxValue) != Case_17_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_18_cns(0, 0) != Case_18_var(0, 0)) failures++; + if (Case_18_cns(42, 42) != Case_18_var(42, 42)) failures++; + if (Case_18_cns(TestType.MinValue, TestType.MinValue) != Case_18_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_18_cns(TestType.MaxValue, TestType.MaxValue) != Case_18_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_18_cns(TestType.MaxValue, TestType.MinValue) != Case_18_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_18_cns(TestType.MinValue, TestType.MaxValue) != Case_18_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_19_cns(0, 0) != Case_19_var(0, 0)) failures++; + if (Case_19_cns(42, 42) != Case_19_var(42, 42)) failures++; + if (Case_19_cns(TestType.MinValue, TestType.MinValue) != Case_19_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_19_cns(TestType.MaxValue, TestType.MaxValue) != Case_19_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_19_cns(TestType.MaxValue, TestType.MinValue) != Case_19_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_19_cns(TestType.MinValue, TestType.MaxValue) != Case_19_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_20_cns(0, 0) != Case_20_var(0, 0)) failures++; + if (Case_20_cns(42, 42) != Case_20_var(42, 42)) failures++; + if (Case_20_cns(TestType.MinValue, TestType.MinValue) != Case_20_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_20_cns(TestType.MaxValue, TestType.MaxValue) != Case_20_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_20_cns(TestType.MaxValue, TestType.MinValue) != Case_20_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_20_cns(TestType.MinValue, TestType.MaxValue) != Case_20_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_21_cns(0, 0) != Case_21_var(0, 0)) failures++; + if (Case_21_cns(42, 42) != Case_21_var(42, 42)) failures++; + if (Case_21_cns(TestType.MinValue, TestType.MinValue) != Case_21_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_21_cns(TestType.MaxValue, TestType.MaxValue) != Case_21_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_21_cns(TestType.MaxValue, TestType.MinValue) != Case_21_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_21_cns(TestType.MinValue, TestType.MaxValue) != Case_21_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_22_cns(0, 0) != Case_22_var(0, 0)) failures++; + if (Case_22_cns(42, 42) != Case_22_var(42, 42)) failures++; + if (Case_22_cns(TestType.MinValue, TestType.MinValue) != Case_22_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_22_cns(TestType.MaxValue, TestType.MaxValue) != Case_22_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_22_cns(TestType.MaxValue, TestType.MinValue) != Case_22_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_22_cns(TestType.MinValue, TestType.MaxValue) != Case_22_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_23_cns(0, 0) != Case_23_var(0, 0)) failures++; + if (Case_23_cns(42, 42) != Case_23_var(42, 42)) failures++; + if (Case_23_cns(TestType.MinValue, TestType.MinValue) != Case_23_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_23_cns(TestType.MaxValue, TestType.MaxValue) != Case_23_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_23_cns(TestType.MaxValue, TestType.MinValue) != Case_23_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_23_cns(TestType.MinValue, TestType.MaxValue) != Case_23_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_24_cns(0, 0) != Case_24_var(0, 0)) failures++; + if (Case_24_cns(42, 42) != Case_24_var(42, 42)) failures++; + if (Case_24_cns(TestType.MinValue, TestType.MinValue) != Case_24_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_24_cns(TestType.MaxValue, TestType.MaxValue) != Case_24_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_24_cns(TestType.MaxValue, TestType.MinValue) != Case_24_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_24_cns(TestType.MinValue, TestType.MaxValue) != Case_24_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_25_cns(0, 0) != Case_25_var(0, 0)) failures++; + if (Case_25_cns(42, 42) != Case_25_var(42, 42)) failures++; + if (Case_25_cns(TestType.MinValue, TestType.MinValue) != Case_25_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_25_cns(TestType.MaxValue, TestType.MaxValue) != Case_25_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_25_cns(TestType.MaxValue, TestType.MinValue) != Case_25_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_25_cns(TestType.MinValue, TestType.MaxValue) != Case_25_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_26_cns(0, 0) != Case_26_var(0, 0)) failures++; + if (Case_26_cns(42, 42) != Case_26_var(42, 42)) failures++; + if (Case_26_cns(TestType.MinValue, TestType.MinValue) != Case_26_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_26_cns(TestType.MaxValue, TestType.MaxValue) != Case_26_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_26_cns(TestType.MaxValue, TestType.MinValue) != Case_26_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_26_cns(TestType.MinValue, TestType.MaxValue) != Case_26_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_27_cns(0, 0) != Case_27_var(0, 0)) failures++; + if (Case_27_cns(42, 42) != Case_27_var(42, 42)) failures++; + if (Case_27_cns(TestType.MinValue, TestType.MinValue) != Case_27_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_27_cns(TestType.MaxValue, TestType.MaxValue) != Case_27_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_27_cns(TestType.MaxValue, TestType.MinValue) != Case_27_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_27_cns(TestType.MinValue, TestType.MaxValue) != Case_27_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_28_cns(0, 0) != Case_28_var(0, 0)) failures++; + if (Case_28_cns(42, 42) != Case_28_var(42, 42)) failures++; + if (Case_28_cns(TestType.MinValue, TestType.MinValue) != Case_28_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_28_cns(TestType.MaxValue, TestType.MaxValue) != Case_28_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_28_cns(TestType.MaxValue, TestType.MinValue) != Case_28_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_28_cns(TestType.MinValue, TestType.MaxValue) != Case_28_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_29_cns(0, 0) != Case_29_var(0, 0)) failures++; + if (Case_29_cns(42, 42) != Case_29_var(42, 42)) failures++; + if (Case_29_cns(TestType.MinValue, TestType.MinValue) != Case_29_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_29_cns(TestType.MaxValue, TestType.MaxValue) != Case_29_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_29_cns(TestType.MaxValue, TestType.MinValue) != Case_29_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_29_cns(TestType.MinValue, TestType.MaxValue) != Case_29_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_30_cns(0, 0) != Case_30_var(0, 0)) failures++; + if (Case_30_cns(42, 42) != Case_30_var(42, 42)) failures++; + if (Case_30_cns(TestType.MinValue, TestType.MinValue) != Case_30_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_30_cns(TestType.MaxValue, TestType.MaxValue) != Case_30_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_30_cns(TestType.MaxValue, TestType.MinValue) != Case_30_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_30_cns(TestType.MinValue, TestType.MaxValue) != Case_30_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_31_cns(0, 0) != Case_31_var(0, 0)) failures++; + if (Case_31_cns(42, 42) != Case_31_var(42, 42)) failures++; + if (Case_31_cns(TestType.MinValue, TestType.MinValue) != Case_31_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_31_cns(TestType.MaxValue, TestType.MaxValue) != Case_31_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_31_cns(TestType.MaxValue, TestType.MinValue) != Case_31_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_31_cns(TestType.MinValue, TestType.MaxValue) != Case_31_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_32_cns(0, 0) != Case_32_var(0, 0)) failures++; + if (Case_32_cns(42, 42) != Case_32_var(42, 42)) failures++; + if (Case_32_cns(TestType.MinValue, TestType.MinValue) != Case_32_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_32_cns(TestType.MaxValue, TestType.MaxValue) != Case_32_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_32_cns(TestType.MaxValue, TestType.MinValue) != Case_32_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_32_cns(TestType.MinValue, TestType.MaxValue) != Case_32_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_33_cns(0, 0) != Case_33_var(0, 0)) failures++; + if (Case_33_cns(42, 42) != Case_33_var(42, 42)) failures++; + if (Case_33_cns(TestType.MinValue, TestType.MinValue) != Case_33_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_33_cns(TestType.MaxValue, TestType.MaxValue) != Case_33_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_33_cns(TestType.MaxValue, TestType.MinValue) != Case_33_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_33_cns(TestType.MinValue, TestType.MaxValue) != Case_33_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_34_cns(0, 0) != Case_34_var(0, 0)) failures++; + if (Case_34_cns(42, 42) != Case_34_var(42, 42)) failures++; + if (Case_34_cns(TestType.MinValue, TestType.MinValue) != Case_34_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_34_cns(TestType.MaxValue, TestType.MaxValue) != Case_34_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_34_cns(TestType.MaxValue, TestType.MinValue) != Case_34_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_34_cns(TestType.MinValue, TestType.MaxValue) != Case_34_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_35_cns(0, 0) != Case_35_var(0, 0)) failures++; + if (Case_35_cns(42, 42) != Case_35_var(42, 42)) failures++; + if (Case_35_cns(TestType.MinValue, TestType.MinValue) != Case_35_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_35_cns(TestType.MaxValue, TestType.MaxValue) != Case_35_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_35_cns(TestType.MaxValue, TestType.MinValue) != Case_35_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_35_cns(TestType.MinValue, TestType.MaxValue) != Case_35_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_36_cns(0, 0) != Case_36_var(0, 0)) failures++; + if (Case_36_cns(42, 42) != Case_36_var(42, 42)) failures++; + if (Case_36_cns(TestType.MinValue, TestType.MinValue) != Case_36_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_36_cns(TestType.MaxValue, TestType.MaxValue) != Case_36_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_36_cns(TestType.MaxValue, TestType.MinValue) != Case_36_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_36_cns(TestType.MinValue, TestType.MaxValue) != Case_36_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_37_cns(0, 0) != Case_37_var(0, 0)) failures++; + if (Case_37_cns(42, 42) != Case_37_var(42, 42)) failures++; + if (Case_37_cns(TestType.MinValue, TestType.MinValue) != Case_37_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_37_cns(TestType.MaxValue, TestType.MaxValue) != Case_37_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_37_cns(TestType.MaxValue, TestType.MinValue) != Case_37_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_37_cns(TestType.MinValue, TestType.MaxValue) != Case_37_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_38_cns(0, 0) != Case_38_var(0, 0)) failures++; + if (Case_38_cns(42, 42) != Case_38_var(42, 42)) failures++; + if (Case_38_cns(TestType.MinValue, TestType.MinValue) != Case_38_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_38_cns(TestType.MaxValue, TestType.MaxValue) != Case_38_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_38_cns(TestType.MaxValue, TestType.MinValue) != Case_38_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_38_cns(TestType.MinValue, TestType.MaxValue) != Case_38_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_39_cns(0, 0) != Case_39_var(0, 0)) failures++; + if (Case_39_cns(42, 42) != Case_39_var(42, 42)) failures++; + if (Case_39_cns(TestType.MinValue, TestType.MinValue) != Case_39_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_39_cns(TestType.MaxValue, TestType.MaxValue) != Case_39_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_39_cns(TestType.MaxValue, TestType.MinValue) != Case_39_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_39_cns(TestType.MinValue, TestType.MaxValue) != Case_39_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_40_cns(0, 0) != Case_40_var(0, 0)) failures++; + if (Case_40_cns(42, 42) != Case_40_var(42, 42)) failures++; + if (Case_40_cns(TestType.MinValue, TestType.MinValue) != Case_40_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_40_cns(TestType.MaxValue, TestType.MaxValue) != Case_40_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_40_cns(TestType.MaxValue, TestType.MinValue) != Case_40_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_40_cns(TestType.MinValue, TestType.MaxValue) != Case_40_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_41_cns(0, 0) != Case_41_var(0, 0)) failures++; + if (Case_41_cns(42, 42) != Case_41_var(42, 42)) failures++; + if (Case_41_cns(TestType.MinValue, TestType.MinValue) != Case_41_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_41_cns(TestType.MaxValue, TestType.MaxValue) != Case_41_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_41_cns(TestType.MaxValue, TestType.MinValue) != Case_41_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_41_cns(TestType.MinValue, TestType.MaxValue) != Case_41_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_42_cns(0, 0) != Case_42_var(0, 0)) failures++; + if (Case_42_cns(42, 42) != Case_42_var(42, 42)) failures++; + if (Case_42_cns(TestType.MinValue, TestType.MinValue) != Case_42_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_42_cns(TestType.MaxValue, TestType.MaxValue) != Case_42_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_42_cns(TestType.MaxValue, TestType.MinValue) != Case_42_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_42_cns(TestType.MinValue, TestType.MaxValue) != Case_42_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_43_cns(0, 0) != Case_43_var(0, 0)) failures++; + if (Case_43_cns(42, 42) != Case_43_var(42, 42)) failures++; + if (Case_43_cns(TestType.MinValue, TestType.MinValue) != Case_43_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_43_cns(TestType.MaxValue, TestType.MaxValue) != Case_43_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_43_cns(TestType.MaxValue, TestType.MinValue) != Case_43_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_43_cns(TestType.MinValue, TestType.MaxValue) != Case_43_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_44_cns(0, 0) != Case_44_var(0, 0)) failures++; + if (Case_44_cns(42, 42) != Case_44_var(42, 42)) failures++; + if (Case_44_cns(TestType.MinValue, TestType.MinValue) != Case_44_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_44_cns(TestType.MaxValue, TestType.MaxValue) != Case_44_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_44_cns(TestType.MaxValue, TestType.MinValue) != Case_44_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_44_cns(TestType.MinValue, TestType.MaxValue) != Case_44_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_45_cns(0, 0) != Case_45_var(0, 0)) failures++; + if (Case_45_cns(42, 42) != Case_45_var(42, 42)) failures++; + if (Case_45_cns(TestType.MinValue, TestType.MinValue) != Case_45_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_45_cns(TestType.MaxValue, TestType.MaxValue) != Case_45_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_45_cns(TestType.MaxValue, TestType.MinValue) != Case_45_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_45_cns(TestType.MinValue, TestType.MaxValue) != Case_45_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_46_cns(0, 0) != Case_46_var(0, 0)) failures++; + if (Case_46_cns(42, 42) != Case_46_var(42, 42)) failures++; + if (Case_46_cns(TestType.MinValue, TestType.MinValue) != Case_46_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_46_cns(TestType.MaxValue, TestType.MaxValue) != Case_46_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_46_cns(TestType.MaxValue, TestType.MinValue) != Case_46_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_46_cns(TestType.MinValue, TestType.MaxValue) != Case_46_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_47_cns(0, 0) != Case_47_var(0, 0)) failures++; + if (Case_47_cns(42, 42) != Case_47_var(42, 42)) failures++; + if (Case_47_cns(TestType.MinValue, TestType.MinValue) != Case_47_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_47_cns(TestType.MaxValue, TestType.MaxValue) != Case_47_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_47_cns(TestType.MaxValue, TestType.MinValue) != Case_47_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_47_cns(TestType.MinValue, TestType.MaxValue) != Case_47_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_48_cns(0, 0) != Case_48_var(0, 0)) failures++; + if (Case_48_cns(42, 42) != Case_48_var(42, 42)) failures++; + if (Case_48_cns(TestType.MinValue, TestType.MinValue) != Case_48_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_48_cns(TestType.MaxValue, TestType.MaxValue) != Case_48_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_48_cns(TestType.MaxValue, TestType.MinValue) != Case_48_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_48_cns(TestType.MinValue, TestType.MaxValue) != Case_48_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_49_cns(0, 0) != Case_49_var(0, 0)) failures++; + if (Case_49_cns(42, 42) != Case_49_var(42, 42)) failures++; + if (Case_49_cns(TestType.MinValue, TestType.MinValue) != Case_49_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_49_cns(TestType.MaxValue, TestType.MaxValue) != Case_49_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_49_cns(TestType.MaxValue, TestType.MinValue) != Case_49_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_49_cns(TestType.MinValue, TestType.MaxValue) != Case_49_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_50_cns(0, 0) != Case_50_var(0, 0)) failures++; + if (Case_50_cns(42, 42) != Case_50_var(42, 42)) failures++; + if (Case_50_cns(TestType.MinValue, TestType.MinValue) != Case_50_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_50_cns(TestType.MaxValue, TestType.MaxValue) != Case_50_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_50_cns(TestType.MaxValue, TestType.MinValue) != Case_50_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_50_cns(TestType.MinValue, TestType.MaxValue) != Case_50_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_51_cns(0, 0) != Case_51_var(0, 0)) failures++; + if (Case_51_cns(42, 42) != Case_51_var(42, 42)) failures++; + if (Case_51_cns(TestType.MinValue, TestType.MinValue) != Case_51_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_51_cns(TestType.MaxValue, TestType.MaxValue) != Case_51_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_51_cns(TestType.MaxValue, TestType.MinValue) != Case_51_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_51_cns(TestType.MinValue, TestType.MaxValue) != Case_51_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_52_cns(0, 0) != Case_52_var(0, 0)) failures++; + if (Case_52_cns(42, 42) != Case_52_var(42, 42)) failures++; + if (Case_52_cns(TestType.MinValue, TestType.MinValue) != Case_52_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_52_cns(TestType.MaxValue, TestType.MaxValue) != Case_52_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_52_cns(TestType.MaxValue, TestType.MinValue) != Case_52_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_52_cns(TestType.MinValue, TestType.MaxValue) != Case_52_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_53_cns(0, 0) != Case_53_var(0, 0)) failures++; + if (Case_53_cns(42, 42) != Case_53_var(42, 42)) failures++; + if (Case_53_cns(TestType.MinValue, TestType.MinValue) != Case_53_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_53_cns(TestType.MaxValue, TestType.MaxValue) != Case_53_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_53_cns(TestType.MaxValue, TestType.MinValue) != Case_53_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_53_cns(TestType.MinValue, TestType.MaxValue) != Case_53_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_54_cns(0, 0) != Case_54_var(0, 0)) failures++; + if (Case_54_cns(42, 42) != Case_54_var(42, 42)) failures++; + if (Case_54_cns(TestType.MinValue, TestType.MinValue) != Case_54_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_54_cns(TestType.MaxValue, TestType.MaxValue) != Case_54_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_54_cns(TestType.MaxValue, TestType.MinValue) != Case_54_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_54_cns(TestType.MinValue, TestType.MaxValue) != Case_54_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_55_cns(0, 0) != Case_55_var(0, 0)) failures++; + if (Case_55_cns(42, 42) != Case_55_var(42, 42)) failures++; + if (Case_55_cns(TestType.MinValue, TestType.MinValue) != Case_55_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_55_cns(TestType.MaxValue, TestType.MaxValue) != Case_55_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_55_cns(TestType.MaxValue, TestType.MinValue) != Case_55_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_55_cns(TestType.MinValue, TestType.MaxValue) != Case_55_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_56_cns(0, 0) != Case_56_var(0, 0)) failures++; + if (Case_56_cns(42, 42) != Case_56_var(42, 42)) failures++; + if (Case_56_cns(TestType.MinValue, TestType.MinValue) != Case_56_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_56_cns(TestType.MaxValue, TestType.MaxValue) != Case_56_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_56_cns(TestType.MaxValue, TestType.MinValue) != Case_56_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_56_cns(TestType.MinValue, TestType.MaxValue) != Case_56_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_57_cns(0, 0) != Case_57_var(0, 0)) failures++; + if (Case_57_cns(42, 42) != Case_57_var(42, 42)) failures++; + if (Case_57_cns(TestType.MinValue, TestType.MinValue) != Case_57_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_57_cns(TestType.MaxValue, TestType.MaxValue) != Case_57_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_57_cns(TestType.MaxValue, TestType.MinValue) != Case_57_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_57_cns(TestType.MinValue, TestType.MaxValue) != Case_57_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_58_cns(0, 0) != Case_58_var(0, 0)) failures++; + if (Case_58_cns(42, 42) != Case_58_var(42, 42)) failures++; + if (Case_58_cns(TestType.MinValue, TestType.MinValue) != Case_58_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_58_cns(TestType.MaxValue, TestType.MaxValue) != Case_58_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_58_cns(TestType.MaxValue, TestType.MinValue) != Case_58_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_58_cns(TestType.MinValue, TestType.MaxValue) != Case_58_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_59_cns(0, 0) != Case_59_var(0, 0)) failures++; + if (Case_59_cns(42, 42) != Case_59_var(42, 42)) failures++; + if (Case_59_cns(TestType.MinValue, TestType.MinValue) != Case_59_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_59_cns(TestType.MaxValue, TestType.MaxValue) != Case_59_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_59_cns(TestType.MaxValue, TestType.MinValue) != Case_59_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_59_cns(TestType.MinValue, TestType.MaxValue) != Case_59_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_60_cns(0, 0) != Case_60_var(0, 0)) failures++; + if (Case_60_cns(42, 42) != Case_60_var(42, 42)) failures++; + if (Case_60_cns(TestType.MinValue, TestType.MinValue) != Case_60_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_60_cns(TestType.MaxValue, TestType.MaxValue) != Case_60_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_60_cns(TestType.MaxValue, TestType.MinValue) != Case_60_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_60_cns(TestType.MinValue, TestType.MaxValue) != Case_60_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_61_cns(0, 0) != Case_61_var(0, 0)) failures++; + if (Case_61_cns(42, 42) != Case_61_var(42, 42)) failures++; + if (Case_61_cns(TestType.MinValue, TestType.MinValue) != Case_61_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_61_cns(TestType.MaxValue, TestType.MaxValue) != Case_61_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_61_cns(TestType.MaxValue, TestType.MinValue) != Case_61_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_61_cns(TestType.MinValue, TestType.MaxValue) != Case_61_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_62_cns(0, 0) != Case_62_var(0, 0)) failures++; + if (Case_62_cns(42, 42) != Case_62_var(42, 42)) failures++; + if (Case_62_cns(TestType.MinValue, TestType.MinValue) != Case_62_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_62_cns(TestType.MaxValue, TestType.MaxValue) != Case_62_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_62_cns(TestType.MaxValue, TestType.MinValue) != Case_62_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_62_cns(TestType.MinValue, TestType.MaxValue) != Case_62_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_63_cns(0, 0) != Case_63_var(0, 0)) failures++; + if (Case_63_cns(42, 42) != Case_63_var(42, 42)) failures++; + if (Case_63_cns(TestType.MinValue, TestType.MinValue) != Case_63_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_63_cns(TestType.MaxValue, TestType.MaxValue) != Case_63_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_63_cns(TestType.MaxValue, TestType.MinValue) != Case_63_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_63_cns(TestType.MinValue, TestType.MaxValue) != Case_63_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_64_cns(0, 0) != Case_64_var(0, 0)) failures++; + if (Case_64_cns(42, 42) != Case_64_var(42, 42)) failures++; + if (Case_64_cns(TestType.MinValue, TestType.MinValue) != Case_64_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_64_cns(TestType.MaxValue, TestType.MaxValue) != Case_64_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_64_cns(TestType.MaxValue, TestType.MinValue) != Case_64_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_64_cns(TestType.MinValue, TestType.MaxValue) != Case_64_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_65_cns(0, 0) != Case_65_var(0, 0)) failures++; + if (Case_65_cns(42, 42) != Case_65_var(42, 42)) failures++; + if (Case_65_cns(TestType.MinValue, TestType.MinValue) != Case_65_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_65_cns(TestType.MaxValue, TestType.MaxValue) != Case_65_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_65_cns(TestType.MaxValue, TestType.MinValue) != Case_65_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_65_cns(TestType.MinValue, TestType.MaxValue) != Case_65_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_66_cns(0, 0) != Case_66_var(0, 0)) failures++; + if (Case_66_cns(42, 42) != Case_66_var(42, 42)) failures++; + if (Case_66_cns(TestType.MinValue, TestType.MinValue) != Case_66_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_66_cns(TestType.MaxValue, TestType.MaxValue) != Case_66_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_66_cns(TestType.MaxValue, TestType.MinValue) != Case_66_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_66_cns(TestType.MinValue, TestType.MaxValue) != Case_66_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_67_cns(0, 0) != Case_67_var(0, 0)) failures++; + if (Case_67_cns(42, 42) != Case_67_var(42, 42)) failures++; + if (Case_67_cns(TestType.MinValue, TestType.MinValue) != Case_67_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_67_cns(TestType.MaxValue, TestType.MaxValue) != Case_67_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_67_cns(TestType.MaxValue, TestType.MinValue) != Case_67_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_67_cns(TestType.MinValue, TestType.MaxValue) != Case_67_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_68_cns(0, 0) != Case_68_var(0, 0)) failures++; + if (Case_68_cns(42, 42) != Case_68_var(42, 42)) failures++; + if (Case_68_cns(TestType.MinValue, TestType.MinValue) != Case_68_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_68_cns(TestType.MaxValue, TestType.MaxValue) != Case_68_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_68_cns(TestType.MaxValue, TestType.MinValue) != Case_68_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_68_cns(TestType.MinValue, TestType.MaxValue) != Case_68_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_69_cns(0, 0) != Case_69_var(0, 0)) failures++; + if (Case_69_cns(42, 42) != Case_69_var(42, 42)) failures++; + if (Case_69_cns(TestType.MinValue, TestType.MinValue) != Case_69_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_69_cns(TestType.MaxValue, TestType.MaxValue) != Case_69_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_69_cns(TestType.MaxValue, TestType.MinValue) != Case_69_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_69_cns(TestType.MinValue, TestType.MaxValue) != Case_69_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_70_cns(0, 0) != Case_70_var(0, 0)) failures++; + if (Case_70_cns(42, 42) != Case_70_var(42, 42)) failures++; + if (Case_70_cns(TestType.MinValue, TestType.MinValue) != Case_70_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_70_cns(TestType.MaxValue, TestType.MaxValue) != Case_70_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_70_cns(TestType.MaxValue, TestType.MinValue) != Case_70_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_70_cns(TestType.MinValue, TestType.MaxValue) != Case_70_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_71_cns(0, 0) != Case_71_var(0, 0)) failures++; + if (Case_71_cns(42, 42) != Case_71_var(42, 42)) failures++; + if (Case_71_cns(TestType.MinValue, TestType.MinValue) != Case_71_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_71_cns(TestType.MaxValue, TestType.MaxValue) != Case_71_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_71_cns(TestType.MaxValue, TestType.MinValue) != Case_71_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_71_cns(TestType.MinValue, TestType.MaxValue) != Case_71_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_72_cns(0, 0) != Case_72_var(0, 0)) failures++; + if (Case_72_cns(42, 42) != Case_72_var(42, 42)) failures++; + if (Case_72_cns(TestType.MinValue, TestType.MinValue) != Case_72_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_72_cns(TestType.MaxValue, TestType.MaxValue) != Case_72_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_72_cns(TestType.MaxValue, TestType.MinValue) != Case_72_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_72_cns(TestType.MinValue, TestType.MaxValue) != Case_72_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_73_cns(0, 0) != Case_73_var(0, 0)) failures++; + if (Case_73_cns(42, 42) != Case_73_var(42, 42)) failures++; + if (Case_73_cns(TestType.MinValue, TestType.MinValue) != Case_73_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_73_cns(TestType.MaxValue, TestType.MaxValue) != Case_73_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_73_cns(TestType.MaxValue, TestType.MinValue) != Case_73_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_73_cns(TestType.MinValue, TestType.MaxValue) != Case_73_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_74_cns(0, 0) != Case_74_var(0, 0)) failures++; + if (Case_74_cns(42, 42) != Case_74_var(42, 42)) failures++; + if (Case_74_cns(TestType.MinValue, TestType.MinValue) != Case_74_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_74_cns(TestType.MaxValue, TestType.MaxValue) != Case_74_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_74_cns(TestType.MaxValue, TestType.MinValue) != Case_74_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_74_cns(TestType.MinValue, TestType.MaxValue) != Case_74_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_75_cns(0, 0) != Case_75_var(0, 0)) failures++; + if (Case_75_cns(42, 42) != Case_75_var(42, 42)) failures++; + if (Case_75_cns(TestType.MinValue, TestType.MinValue) != Case_75_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_75_cns(TestType.MaxValue, TestType.MaxValue) != Case_75_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_75_cns(TestType.MaxValue, TestType.MinValue) != Case_75_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_75_cns(TestType.MinValue, TestType.MaxValue) != Case_75_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_76_cns(0, 0) != Case_76_var(0, 0)) failures++; + if (Case_76_cns(42, 42) != Case_76_var(42, 42)) failures++; + if (Case_76_cns(TestType.MinValue, TestType.MinValue) != Case_76_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_76_cns(TestType.MaxValue, TestType.MaxValue) != Case_76_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_76_cns(TestType.MaxValue, TestType.MinValue) != Case_76_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_76_cns(TestType.MinValue, TestType.MaxValue) != Case_76_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_77_cns(0, 0) != Case_77_var(0, 0)) failures++; + if (Case_77_cns(42, 42) != Case_77_var(42, 42)) failures++; + if (Case_77_cns(TestType.MinValue, TestType.MinValue) != Case_77_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_77_cns(TestType.MaxValue, TestType.MaxValue) != Case_77_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_77_cns(TestType.MaxValue, TestType.MinValue) != Case_77_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_77_cns(TestType.MinValue, TestType.MaxValue) != Case_77_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_78_cns(0, 0) != Case_78_var(0, 0)) failures++; + if (Case_78_cns(42, 42) != Case_78_var(42, 42)) failures++; + if (Case_78_cns(TestType.MinValue, TestType.MinValue) != Case_78_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_78_cns(TestType.MaxValue, TestType.MaxValue) != Case_78_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_78_cns(TestType.MaxValue, TestType.MinValue) != Case_78_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_78_cns(TestType.MinValue, TestType.MaxValue) != Case_78_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_79_cns(0, 0) != Case_79_var(0, 0)) failures++; + if (Case_79_cns(42, 42) != Case_79_var(42, 42)) failures++; + if (Case_79_cns(TestType.MinValue, TestType.MinValue) != Case_79_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_79_cns(TestType.MaxValue, TestType.MaxValue) != Case_79_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_79_cns(TestType.MaxValue, TestType.MinValue) != Case_79_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_79_cns(TestType.MinValue, TestType.MaxValue) != Case_79_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_80_cns(0, 0) != Case_80_var(0, 0)) failures++; + if (Case_80_cns(42, 42) != Case_80_var(42, 42)) failures++; + if (Case_80_cns(TestType.MinValue, TestType.MinValue) != Case_80_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_80_cns(TestType.MaxValue, TestType.MaxValue) != Case_80_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_80_cns(TestType.MaxValue, TestType.MinValue) != Case_80_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_80_cns(TestType.MinValue, TestType.MaxValue) != Case_80_var(TestType.MinValue, TestType.MaxValue)) failures++; + if (Case_81_cns(0, 0) != Case_81_var(0, 0)) failures++; + if (Case_81_cns(42, 42) != Case_81_var(42, 42)) failures++; + if (Case_81_cns(TestType.MinValue, TestType.MinValue) != Case_81_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_81_cns(TestType.MaxValue, TestType.MaxValue) != Case_81_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_81_cns(TestType.MaxValue, TestType.MinValue) != Case_81_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_81_cns(TestType.MinValue, TestType.MaxValue) != Case_81_var(TestType.MinValue, TestType.MaxValue)) failures++; + return failures; + } +} \ No newline at end of file diff --git a/src/coreclr/tests/src/JIT/opt/InstructionCombining/ConstantFolding_TestGen.tt b/src/coreclr/tests/src/JIT/opt/InstructionCombining/ConstantFolding_TestGen.tt new file mode 100644 index 00000000000000..4e04954230d90a --- /dev/null +++ b/src/coreclr/tests/src/JIT/opt/InstructionCombining/ConstantFolding_TestGen.tt @@ -0,0 +1,120 @@ +<#@ template language="C#" #> +using System.Runtime.CompilerServices; +using TestType = System.Int32; + +public class ConstantFoldingTestsBase +{ + public const TestType Const1 = 8; + public const TestType Const2 = 1027; + + [MethodImpl(MethodImplOptions.NoInlining)] public TestType GetConst1() => Const1; + [MethodImpl(MethodImplOptions.NoInlining)] public TestType GetConst2() => Const2; +} + +// ((x op icon1) op icon2) +public class ConstantFoldingTests1 : ConstantFoldingTestsBase +{ +<# +int groupIndex = 0; +string[] ops = {"+", "-", "&", "|", "^", ">>", "<<", "*", "/" }; +for (int i = 0; i < ops.Length; i++) +{ + for (int j = 0; j < ops.Length; j++) + { + groupIndex++; +#> + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_<#=groupIndex#>_cns(TestType x) => ((x <#=ops[i]#> Const1) <#=ops[j]#> Const2); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_<#=groupIndex#>_var(TestType x) => ((x <#=ops[i]#> GetConst1()) <#=ops[j]#> GetConst2()); + +<# + } +} +#> + public int RunTests() + { + int failures = 0; +<# +for (int i = 1; i < groupIndex + 1; i++) +{ +#> + if (Case_<#=i#>_cns(0) != Case_<#=i#>_var(0)) failures++; + if (Case_<#=i#>_cns(42) != Case_<#=i#>_var(42)) failures++; + if (Case_<#=i#>_cns(TestType.MinValue) != Case_<#=i#>_var(TestType.MinValue)) failures++; + if (Case_<#=i#>_cns(TestType.MaxValue) != Case_<#=i#>_var(TestType.MaxValue)) failures++; +<# +} +#> + return failures; + } +} + +// x op icon1==icon2 +public class ConstantFoldingTests2 : ConstantFoldingTestsBase +{ +<# +groupIndex = 0; +for (int i = 0; i < ops.Length; i++) +{ + groupIndex++; +#> + [MethodImpl(MethodImplOptions.NoInlining)] bool Case_<#=groupIndex#>_cns(TestType x) => ((x <#=ops[i]#> Const1) == Const2); + [MethodImpl(MethodImplOptions.NoInlining)] bool Case_<#=groupIndex#>_var(TestType x) => ((x <#=ops[i]#> GetConst1()) == GetConst2()); + +<# +} +#> + public int RunTests() + { + int failures = 0; +<# +for (int i = 1; i < groupIndex + 1; i++) +{ +#> + if (Case_<#=i#>_cns(0) != Case_<#=i#>_var(0)) failures++; + if (Case_<#=i#>_cns(42) != Case_<#=i#>_var(42)) failures++; + if (Case_<#=i#>_cns(TestType.MinValue) != Case_<#=i#>_var(TestType.MinValue)) failures++; + if (Case_<#=i#>_cns(TestType.MaxValue) != Case_<#=i#>_var(TestType.MaxValue)) failures++; +<# +} +#> + return failures; + } +} + +// ((x+icon1)+(y+icon2)) +public class ConstantFoldingTests3 : ConstantFoldingTestsBase +{ +<# +groupIndex = 0; +for (int i = 0; i < ops.Length; i++) +{ + for (int j = 0; j < ops.Length; j++) + { + groupIndex++; +#> + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_<#=groupIndex#>_cns(TestType x, TestType y) => ((x <#=ops[i]#> Const1) + (y <#=ops[j]#> Const2)); + [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_<#=groupIndex#>_var(TestType x, TestType y) => ((x <#=ops[i]#> GetConst1()) + (y <#=ops[j]#> GetConst2())); + +<# + } +} +#> + public int RunTests() + { + int failures = 0; +<# +for (int i = 1; i < groupIndex + 1; i++) +{ +#> + if (Case_<#=i#>_cns(0, 0) != Case_<#=i#>_var(0, 0)) failures++; + if (Case_<#=i#>_cns(42, 42) != Case_<#=i#>_var(42, 42)) failures++; + if (Case_<#=i#>_cns(TestType.MinValue, TestType.MinValue) != Case_<#=i#>_var(TestType.MinValue, TestType.MinValue)) failures++; + if (Case_<#=i#>_cns(TestType.MaxValue, TestType.MaxValue) != Case_<#=i#>_var(TestType.MaxValue, TestType.MaxValue)) failures++; + if (Case_<#=i#>_cns(TestType.MaxValue, TestType.MinValue) != Case_<#=i#>_var(TestType.MaxValue, TestType.MinValue)) failures++; + if (Case_<#=i#>_cns(TestType.MinValue, TestType.MaxValue) != Case_<#=i#>_var(TestType.MinValue, TestType.MaxValue)) failures++; +<# +} +#> + return failures; + } +} \ No newline at end of file From 960dab6ab0b9351a1d2dccb570dea06fcd75d460 Mon Sep 17 00:00:00 2001 From: EgorBo Date: Sat, 7 Dec 2019 05:54:42 +0300 Subject: [PATCH 3/9] Fix code format --- src/coreclr/src/jit/morph.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/coreclr/src/jit/morph.cpp b/src/coreclr/src/jit/morph.cpp index 524ba8701059d3..7727aa26eb184a 100644 --- a/src/coreclr/src/jit/morph.cpp +++ b/src/coreclr/src/jit/morph.cpp @@ -12529,8 +12529,8 @@ GenTree* Compiler::fgMorphSmpOp(GenTree* tree, MorphAddrContext* mac) if (!varTypeIsGC(op1->AsOp()->gtGetOp1()->TypeGet()) && !varTypeIsGC(op2->AsOp()->gtGetOp1()->TypeGet())) { - cns1 = op1->AsOp()->gtGetOp2(); - cns2 = op2->AsOp()->gtGetOp2(); + cns1 = op1->AsOp()->gtGetOp2(); + cns2 = op2->AsOp()->gtGetOp2(); ssize_t icon1 = cns1->AsIntCon()->IconValue(); ssize_t icon2 = cns2->AsIntCon()->IconValue(); @@ -12588,7 +12588,7 @@ GenTree* Compiler::fgMorphSmpOp(GenTree* tree, MorphAddrContext* mac) (op1->AsOp()->gtGetOp2()->TypeGet() != TYP_REF) && // Don't fold REFs (op2->TypeGet() != TYP_REF)) // Don't fold REFs { - cns1 = op1->AsOp()->gtGetOp2(); + cns1 = op1->AsOp()->gtGetOp2(); ssize_t icon1 = cns1->AsIntConCommon()->IconValue(); ssize_t icon2 = op2->AsIntConCommon()->IconValue(); From a6a1afc0d9bf1bb3668187ecc862672a050d4cab Mon Sep 17 00:00:00 2001 From: EgorBo Date: Sun, 8 Dec 2019 00:23:55 +0300 Subject: [PATCH 4/9] Remove tests --- .../InstructionCombining/ConstantFolding.cs | 15 - .../ConstantFolding.csproj | 25 - .../ConstantFolding_TestGen.cs | 1400 ----------------- .../ConstantFolding_TestGen.tt | 120 -- 4 files changed, 1560 deletions(-) delete mode 100644 src/coreclr/tests/src/JIT/opt/InstructionCombining/ConstantFolding.cs delete mode 100644 src/coreclr/tests/src/JIT/opt/InstructionCombining/ConstantFolding.csproj delete mode 100644 src/coreclr/tests/src/JIT/opt/InstructionCombining/ConstantFolding_TestGen.cs delete mode 100644 src/coreclr/tests/src/JIT/opt/InstructionCombining/ConstantFolding_TestGen.tt diff --git a/src/coreclr/tests/src/JIT/opt/InstructionCombining/ConstantFolding.cs b/src/coreclr/tests/src/JIT/opt/InstructionCombining/ConstantFolding.cs deleted file mode 100644 index f088c403a0d6f7..00000000000000 --- a/src/coreclr/tests/src/JIT/opt/InstructionCombining/ConstantFolding.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -public class Program -{ - public static int Main(string[] args) - { - int failures = 0; - failures += new ConstantFoldingTests1().RunTests(); - failures += new ConstantFoldingTests2().RunTests(); - failures += new ConstantFoldingTests3().RunTests(); - return 100 + failures; - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/JIT/opt/InstructionCombining/ConstantFolding.csproj b/src/coreclr/tests/src/JIT/opt/InstructionCombining/ConstantFolding.csproj deleted file mode 100644 index 9d10922a84fcde..00000000000000 --- a/src/coreclr/tests/src/JIT/opt/InstructionCombining/ConstantFolding.csproj +++ /dev/null @@ -1,25 +0,0 @@ - - - Exe - - - None - True - - - - - - - TextTemplatingFileGenerator - ConstantFolding_TestGen.cs - - - - - True - True - ConstantFolding_TestGen.tt - - - diff --git a/src/coreclr/tests/src/JIT/opt/InstructionCombining/ConstantFolding_TestGen.cs b/src/coreclr/tests/src/JIT/opt/InstructionCombining/ConstantFolding_TestGen.cs deleted file mode 100644 index 9a0b620b450dd8..00000000000000 --- a/src/coreclr/tests/src/JIT/opt/InstructionCombining/ConstantFolding_TestGen.cs +++ /dev/null @@ -1,1400 +0,0 @@ -using System.Runtime.CompilerServices; -using TestType = System.Int32; - -public class ConstantFoldingTestsBase -{ - public const TestType Const1 = 8; - public const TestType Const2 = 1027; - - [MethodImpl(MethodImplOptions.NoInlining)] public TestType GetConst1() => Const1; - [MethodImpl(MethodImplOptions.NoInlining)] public TestType GetConst2() => Const2; -} - -// ((x op icon1) op icon2) -public class ConstantFoldingTests1 : ConstantFoldingTestsBase -{ - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_1_cns(TestType x) => ((x + Const1) + Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_1_var(TestType x) => ((x + GetConst1()) + GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_2_cns(TestType x) => ((x + Const1) - Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_2_var(TestType x) => ((x + GetConst1()) - GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_3_cns(TestType x) => ((x + Const1) & Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_3_var(TestType x) => ((x + GetConst1()) & GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_4_cns(TestType x) => ((x + Const1) | Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_4_var(TestType x) => ((x + GetConst1()) | GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_5_cns(TestType x) => ((x + Const1) ^ Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_5_var(TestType x) => ((x + GetConst1()) ^ GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_6_cns(TestType x) => ((x + Const1) >> Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_6_var(TestType x) => ((x + GetConst1()) >> GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_7_cns(TestType x) => ((x + Const1) << Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_7_var(TestType x) => ((x + GetConst1()) << GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_8_cns(TestType x) => ((x + Const1) * Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_8_var(TestType x) => ((x + GetConst1()) * GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_9_cns(TestType x) => ((x + Const1) / Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_9_var(TestType x) => ((x + GetConst1()) / GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_10_cns(TestType x) => ((x - Const1) + Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_10_var(TestType x) => ((x - GetConst1()) + GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_11_cns(TestType x) => ((x - Const1) - Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_11_var(TestType x) => ((x - GetConst1()) - GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_12_cns(TestType x) => ((x - Const1) & Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_12_var(TestType x) => ((x - GetConst1()) & GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_13_cns(TestType x) => ((x - Const1) | Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_13_var(TestType x) => ((x - GetConst1()) | GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_14_cns(TestType x) => ((x - Const1) ^ Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_14_var(TestType x) => ((x - GetConst1()) ^ GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_15_cns(TestType x) => ((x - Const1) >> Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_15_var(TestType x) => ((x - GetConst1()) >> GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_16_cns(TestType x) => ((x - Const1) << Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_16_var(TestType x) => ((x - GetConst1()) << GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_17_cns(TestType x) => ((x - Const1) * Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_17_var(TestType x) => ((x - GetConst1()) * GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_18_cns(TestType x) => ((x - Const1) / Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_18_var(TestType x) => ((x - GetConst1()) / GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_19_cns(TestType x) => ((x & Const1) + Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_19_var(TestType x) => ((x & GetConst1()) + GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_20_cns(TestType x) => ((x & Const1) - Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_20_var(TestType x) => ((x & GetConst1()) - GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_21_cns(TestType x) => ((x & Const1) & Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_21_var(TestType x) => ((x & GetConst1()) & GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_22_cns(TestType x) => ((x & Const1) | Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_22_var(TestType x) => ((x & GetConst1()) | GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_23_cns(TestType x) => ((x & Const1) ^ Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_23_var(TestType x) => ((x & GetConst1()) ^ GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_24_cns(TestType x) => ((x & Const1) >> Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_24_var(TestType x) => ((x & GetConst1()) >> GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_25_cns(TestType x) => ((x & Const1) << Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_25_var(TestType x) => ((x & GetConst1()) << GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_26_cns(TestType x) => ((x & Const1) * Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_26_var(TestType x) => ((x & GetConst1()) * GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_27_cns(TestType x) => ((x & Const1) / Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_27_var(TestType x) => ((x & GetConst1()) / GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_28_cns(TestType x) => ((x | Const1) + Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_28_var(TestType x) => ((x | GetConst1()) + GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_29_cns(TestType x) => ((x | Const1) - Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_29_var(TestType x) => ((x | GetConst1()) - GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_30_cns(TestType x) => ((x | Const1) & Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_30_var(TestType x) => ((x | GetConst1()) & GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_31_cns(TestType x) => ((x | Const1) | Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_31_var(TestType x) => ((x | GetConst1()) | GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_32_cns(TestType x) => ((x | Const1) ^ Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_32_var(TestType x) => ((x | GetConst1()) ^ GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_33_cns(TestType x) => ((x | Const1) >> Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_33_var(TestType x) => ((x | GetConst1()) >> GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_34_cns(TestType x) => ((x | Const1) << Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_34_var(TestType x) => ((x | GetConst1()) << GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_35_cns(TestType x) => ((x | Const1) * Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_35_var(TestType x) => ((x | GetConst1()) * GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_36_cns(TestType x) => ((x | Const1) / Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_36_var(TestType x) => ((x | GetConst1()) / GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_37_cns(TestType x) => ((x ^ Const1) + Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_37_var(TestType x) => ((x ^ GetConst1()) + GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_38_cns(TestType x) => ((x ^ Const1) - Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_38_var(TestType x) => ((x ^ GetConst1()) - GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_39_cns(TestType x) => ((x ^ Const1) & Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_39_var(TestType x) => ((x ^ GetConst1()) & GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_40_cns(TestType x) => ((x ^ Const1) | Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_40_var(TestType x) => ((x ^ GetConst1()) | GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_41_cns(TestType x) => ((x ^ Const1) ^ Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_41_var(TestType x) => ((x ^ GetConst1()) ^ GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_42_cns(TestType x) => ((x ^ Const1) >> Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_42_var(TestType x) => ((x ^ GetConst1()) >> GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_43_cns(TestType x) => ((x ^ Const1) << Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_43_var(TestType x) => ((x ^ GetConst1()) << GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_44_cns(TestType x) => ((x ^ Const1) * Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_44_var(TestType x) => ((x ^ GetConst1()) * GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_45_cns(TestType x) => ((x ^ Const1) / Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_45_var(TestType x) => ((x ^ GetConst1()) / GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_46_cns(TestType x) => ((x >> Const1) + Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_46_var(TestType x) => ((x >> GetConst1()) + GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_47_cns(TestType x) => ((x >> Const1) - Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_47_var(TestType x) => ((x >> GetConst1()) - GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_48_cns(TestType x) => ((x >> Const1) & Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_48_var(TestType x) => ((x >> GetConst1()) & GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_49_cns(TestType x) => ((x >> Const1) | Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_49_var(TestType x) => ((x >> GetConst1()) | GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_50_cns(TestType x) => ((x >> Const1) ^ Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_50_var(TestType x) => ((x >> GetConst1()) ^ GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_51_cns(TestType x) => ((x >> Const1) >> Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_51_var(TestType x) => ((x >> GetConst1()) >> GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_52_cns(TestType x) => ((x >> Const1) << Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_52_var(TestType x) => ((x >> GetConst1()) << GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_53_cns(TestType x) => ((x >> Const1) * Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_53_var(TestType x) => ((x >> GetConst1()) * GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_54_cns(TestType x) => ((x >> Const1) / Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_54_var(TestType x) => ((x >> GetConst1()) / GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_55_cns(TestType x) => ((x << Const1) + Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_55_var(TestType x) => ((x << GetConst1()) + GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_56_cns(TestType x) => ((x << Const1) - Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_56_var(TestType x) => ((x << GetConst1()) - GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_57_cns(TestType x) => ((x << Const1) & Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_57_var(TestType x) => ((x << GetConst1()) & GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_58_cns(TestType x) => ((x << Const1) | Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_58_var(TestType x) => ((x << GetConst1()) | GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_59_cns(TestType x) => ((x << Const1) ^ Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_59_var(TestType x) => ((x << GetConst1()) ^ GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_60_cns(TestType x) => ((x << Const1) >> Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_60_var(TestType x) => ((x << GetConst1()) >> GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_61_cns(TestType x) => ((x << Const1) << Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_61_var(TestType x) => ((x << GetConst1()) << GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_62_cns(TestType x) => ((x << Const1) * Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_62_var(TestType x) => ((x << GetConst1()) * GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_63_cns(TestType x) => ((x << Const1) / Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_63_var(TestType x) => ((x << GetConst1()) / GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_64_cns(TestType x) => ((x * Const1) + Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_64_var(TestType x) => ((x * GetConst1()) + GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_65_cns(TestType x) => ((x * Const1) - Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_65_var(TestType x) => ((x * GetConst1()) - GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_66_cns(TestType x) => ((x * Const1) & Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_66_var(TestType x) => ((x * GetConst1()) & GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_67_cns(TestType x) => ((x * Const1) | Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_67_var(TestType x) => ((x * GetConst1()) | GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_68_cns(TestType x) => ((x * Const1) ^ Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_68_var(TestType x) => ((x * GetConst1()) ^ GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_69_cns(TestType x) => ((x * Const1) >> Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_69_var(TestType x) => ((x * GetConst1()) >> GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_70_cns(TestType x) => ((x * Const1) << Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_70_var(TestType x) => ((x * GetConst1()) << GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_71_cns(TestType x) => ((x * Const1) * Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_71_var(TestType x) => ((x * GetConst1()) * GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_72_cns(TestType x) => ((x * Const1) / Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_72_var(TestType x) => ((x * GetConst1()) / GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_73_cns(TestType x) => ((x / Const1) + Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_73_var(TestType x) => ((x / GetConst1()) + GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_74_cns(TestType x) => ((x / Const1) - Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_74_var(TestType x) => ((x / GetConst1()) - GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_75_cns(TestType x) => ((x / Const1) & Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_75_var(TestType x) => ((x / GetConst1()) & GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_76_cns(TestType x) => ((x / Const1) | Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_76_var(TestType x) => ((x / GetConst1()) | GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_77_cns(TestType x) => ((x / Const1) ^ Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_77_var(TestType x) => ((x / GetConst1()) ^ GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_78_cns(TestType x) => ((x / Const1) >> Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_78_var(TestType x) => ((x / GetConst1()) >> GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_79_cns(TestType x) => ((x / Const1) << Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_79_var(TestType x) => ((x / GetConst1()) << GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_80_cns(TestType x) => ((x / Const1) * Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_80_var(TestType x) => ((x / GetConst1()) * GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_81_cns(TestType x) => ((x / Const1) / Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_81_var(TestType x) => ((x / GetConst1()) / GetConst2()); - - public int RunTests() - { - int failures = 0; - if (Case_1_cns(0) != Case_1_var(0)) failures++; - if (Case_1_cns(42) != Case_1_var(42)) failures++; - if (Case_1_cns(TestType.MinValue) != Case_1_var(TestType.MinValue)) failures++; - if (Case_1_cns(TestType.MaxValue) != Case_1_var(TestType.MaxValue)) failures++; - if (Case_2_cns(0) != Case_2_var(0)) failures++; - if (Case_2_cns(42) != Case_2_var(42)) failures++; - if (Case_2_cns(TestType.MinValue) != Case_2_var(TestType.MinValue)) failures++; - if (Case_2_cns(TestType.MaxValue) != Case_2_var(TestType.MaxValue)) failures++; - if (Case_3_cns(0) != Case_3_var(0)) failures++; - if (Case_3_cns(42) != Case_3_var(42)) failures++; - if (Case_3_cns(TestType.MinValue) != Case_3_var(TestType.MinValue)) failures++; - if (Case_3_cns(TestType.MaxValue) != Case_3_var(TestType.MaxValue)) failures++; - if (Case_4_cns(0) != Case_4_var(0)) failures++; - if (Case_4_cns(42) != Case_4_var(42)) failures++; - if (Case_4_cns(TestType.MinValue) != Case_4_var(TestType.MinValue)) failures++; - if (Case_4_cns(TestType.MaxValue) != Case_4_var(TestType.MaxValue)) failures++; - if (Case_5_cns(0) != Case_5_var(0)) failures++; - if (Case_5_cns(42) != Case_5_var(42)) failures++; - if (Case_5_cns(TestType.MinValue) != Case_5_var(TestType.MinValue)) failures++; - if (Case_5_cns(TestType.MaxValue) != Case_5_var(TestType.MaxValue)) failures++; - if (Case_6_cns(0) != Case_6_var(0)) failures++; - if (Case_6_cns(42) != Case_6_var(42)) failures++; - if (Case_6_cns(TestType.MinValue) != Case_6_var(TestType.MinValue)) failures++; - if (Case_6_cns(TestType.MaxValue) != Case_6_var(TestType.MaxValue)) failures++; - if (Case_7_cns(0) != Case_7_var(0)) failures++; - if (Case_7_cns(42) != Case_7_var(42)) failures++; - if (Case_7_cns(TestType.MinValue) != Case_7_var(TestType.MinValue)) failures++; - if (Case_7_cns(TestType.MaxValue) != Case_7_var(TestType.MaxValue)) failures++; - if (Case_8_cns(0) != Case_8_var(0)) failures++; - if (Case_8_cns(42) != Case_8_var(42)) failures++; - if (Case_8_cns(TestType.MinValue) != Case_8_var(TestType.MinValue)) failures++; - if (Case_8_cns(TestType.MaxValue) != Case_8_var(TestType.MaxValue)) failures++; - if (Case_9_cns(0) != Case_9_var(0)) failures++; - if (Case_9_cns(42) != Case_9_var(42)) failures++; - if (Case_9_cns(TestType.MinValue) != Case_9_var(TestType.MinValue)) failures++; - if (Case_9_cns(TestType.MaxValue) != Case_9_var(TestType.MaxValue)) failures++; - if (Case_10_cns(0) != Case_10_var(0)) failures++; - if (Case_10_cns(42) != Case_10_var(42)) failures++; - if (Case_10_cns(TestType.MinValue) != Case_10_var(TestType.MinValue)) failures++; - if (Case_10_cns(TestType.MaxValue) != Case_10_var(TestType.MaxValue)) failures++; - if (Case_11_cns(0) != Case_11_var(0)) failures++; - if (Case_11_cns(42) != Case_11_var(42)) failures++; - if (Case_11_cns(TestType.MinValue) != Case_11_var(TestType.MinValue)) failures++; - if (Case_11_cns(TestType.MaxValue) != Case_11_var(TestType.MaxValue)) failures++; - if (Case_12_cns(0) != Case_12_var(0)) failures++; - if (Case_12_cns(42) != Case_12_var(42)) failures++; - if (Case_12_cns(TestType.MinValue) != Case_12_var(TestType.MinValue)) failures++; - if (Case_12_cns(TestType.MaxValue) != Case_12_var(TestType.MaxValue)) failures++; - if (Case_13_cns(0) != Case_13_var(0)) failures++; - if (Case_13_cns(42) != Case_13_var(42)) failures++; - if (Case_13_cns(TestType.MinValue) != Case_13_var(TestType.MinValue)) failures++; - if (Case_13_cns(TestType.MaxValue) != Case_13_var(TestType.MaxValue)) failures++; - if (Case_14_cns(0) != Case_14_var(0)) failures++; - if (Case_14_cns(42) != Case_14_var(42)) failures++; - if (Case_14_cns(TestType.MinValue) != Case_14_var(TestType.MinValue)) failures++; - if (Case_14_cns(TestType.MaxValue) != Case_14_var(TestType.MaxValue)) failures++; - if (Case_15_cns(0) != Case_15_var(0)) failures++; - if (Case_15_cns(42) != Case_15_var(42)) failures++; - if (Case_15_cns(TestType.MinValue) != Case_15_var(TestType.MinValue)) failures++; - if (Case_15_cns(TestType.MaxValue) != Case_15_var(TestType.MaxValue)) failures++; - if (Case_16_cns(0) != Case_16_var(0)) failures++; - if (Case_16_cns(42) != Case_16_var(42)) failures++; - if (Case_16_cns(TestType.MinValue) != Case_16_var(TestType.MinValue)) failures++; - if (Case_16_cns(TestType.MaxValue) != Case_16_var(TestType.MaxValue)) failures++; - if (Case_17_cns(0) != Case_17_var(0)) failures++; - if (Case_17_cns(42) != Case_17_var(42)) failures++; - if (Case_17_cns(TestType.MinValue) != Case_17_var(TestType.MinValue)) failures++; - if (Case_17_cns(TestType.MaxValue) != Case_17_var(TestType.MaxValue)) failures++; - if (Case_18_cns(0) != Case_18_var(0)) failures++; - if (Case_18_cns(42) != Case_18_var(42)) failures++; - if (Case_18_cns(TestType.MinValue) != Case_18_var(TestType.MinValue)) failures++; - if (Case_18_cns(TestType.MaxValue) != Case_18_var(TestType.MaxValue)) failures++; - if (Case_19_cns(0) != Case_19_var(0)) failures++; - if (Case_19_cns(42) != Case_19_var(42)) failures++; - if (Case_19_cns(TestType.MinValue) != Case_19_var(TestType.MinValue)) failures++; - if (Case_19_cns(TestType.MaxValue) != Case_19_var(TestType.MaxValue)) failures++; - if (Case_20_cns(0) != Case_20_var(0)) failures++; - if (Case_20_cns(42) != Case_20_var(42)) failures++; - if (Case_20_cns(TestType.MinValue) != Case_20_var(TestType.MinValue)) failures++; - if (Case_20_cns(TestType.MaxValue) != Case_20_var(TestType.MaxValue)) failures++; - if (Case_21_cns(0) != Case_21_var(0)) failures++; - if (Case_21_cns(42) != Case_21_var(42)) failures++; - if (Case_21_cns(TestType.MinValue) != Case_21_var(TestType.MinValue)) failures++; - if (Case_21_cns(TestType.MaxValue) != Case_21_var(TestType.MaxValue)) failures++; - if (Case_22_cns(0) != Case_22_var(0)) failures++; - if (Case_22_cns(42) != Case_22_var(42)) failures++; - if (Case_22_cns(TestType.MinValue) != Case_22_var(TestType.MinValue)) failures++; - if (Case_22_cns(TestType.MaxValue) != Case_22_var(TestType.MaxValue)) failures++; - if (Case_23_cns(0) != Case_23_var(0)) failures++; - if (Case_23_cns(42) != Case_23_var(42)) failures++; - if (Case_23_cns(TestType.MinValue) != Case_23_var(TestType.MinValue)) failures++; - if (Case_23_cns(TestType.MaxValue) != Case_23_var(TestType.MaxValue)) failures++; - if (Case_24_cns(0) != Case_24_var(0)) failures++; - if (Case_24_cns(42) != Case_24_var(42)) failures++; - if (Case_24_cns(TestType.MinValue) != Case_24_var(TestType.MinValue)) failures++; - if (Case_24_cns(TestType.MaxValue) != Case_24_var(TestType.MaxValue)) failures++; - if (Case_25_cns(0) != Case_25_var(0)) failures++; - if (Case_25_cns(42) != Case_25_var(42)) failures++; - if (Case_25_cns(TestType.MinValue) != Case_25_var(TestType.MinValue)) failures++; - if (Case_25_cns(TestType.MaxValue) != Case_25_var(TestType.MaxValue)) failures++; - if (Case_26_cns(0) != Case_26_var(0)) failures++; - if (Case_26_cns(42) != Case_26_var(42)) failures++; - if (Case_26_cns(TestType.MinValue) != Case_26_var(TestType.MinValue)) failures++; - if (Case_26_cns(TestType.MaxValue) != Case_26_var(TestType.MaxValue)) failures++; - if (Case_27_cns(0) != Case_27_var(0)) failures++; - if (Case_27_cns(42) != Case_27_var(42)) failures++; - if (Case_27_cns(TestType.MinValue) != Case_27_var(TestType.MinValue)) failures++; - if (Case_27_cns(TestType.MaxValue) != Case_27_var(TestType.MaxValue)) failures++; - if (Case_28_cns(0) != Case_28_var(0)) failures++; - if (Case_28_cns(42) != Case_28_var(42)) failures++; - if (Case_28_cns(TestType.MinValue) != Case_28_var(TestType.MinValue)) failures++; - if (Case_28_cns(TestType.MaxValue) != Case_28_var(TestType.MaxValue)) failures++; - if (Case_29_cns(0) != Case_29_var(0)) failures++; - if (Case_29_cns(42) != Case_29_var(42)) failures++; - if (Case_29_cns(TestType.MinValue) != Case_29_var(TestType.MinValue)) failures++; - if (Case_29_cns(TestType.MaxValue) != Case_29_var(TestType.MaxValue)) failures++; - if (Case_30_cns(0) != Case_30_var(0)) failures++; - if (Case_30_cns(42) != Case_30_var(42)) failures++; - if (Case_30_cns(TestType.MinValue) != Case_30_var(TestType.MinValue)) failures++; - if (Case_30_cns(TestType.MaxValue) != Case_30_var(TestType.MaxValue)) failures++; - if (Case_31_cns(0) != Case_31_var(0)) failures++; - if (Case_31_cns(42) != Case_31_var(42)) failures++; - if (Case_31_cns(TestType.MinValue) != Case_31_var(TestType.MinValue)) failures++; - if (Case_31_cns(TestType.MaxValue) != Case_31_var(TestType.MaxValue)) failures++; - if (Case_32_cns(0) != Case_32_var(0)) failures++; - if (Case_32_cns(42) != Case_32_var(42)) failures++; - if (Case_32_cns(TestType.MinValue) != Case_32_var(TestType.MinValue)) failures++; - if (Case_32_cns(TestType.MaxValue) != Case_32_var(TestType.MaxValue)) failures++; - if (Case_33_cns(0) != Case_33_var(0)) failures++; - if (Case_33_cns(42) != Case_33_var(42)) failures++; - if (Case_33_cns(TestType.MinValue) != Case_33_var(TestType.MinValue)) failures++; - if (Case_33_cns(TestType.MaxValue) != Case_33_var(TestType.MaxValue)) failures++; - if (Case_34_cns(0) != Case_34_var(0)) failures++; - if (Case_34_cns(42) != Case_34_var(42)) failures++; - if (Case_34_cns(TestType.MinValue) != Case_34_var(TestType.MinValue)) failures++; - if (Case_34_cns(TestType.MaxValue) != Case_34_var(TestType.MaxValue)) failures++; - if (Case_35_cns(0) != Case_35_var(0)) failures++; - if (Case_35_cns(42) != Case_35_var(42)) failures++; - if (Case_35_cns(TestType.MinValue) != Case_35_var(TestType.MinValue)) failures++; - if (Case_35_cns(TestType.MaxValue) != Case_35_var(TestType.MaxValue)) failures++; - if (Case_36_cns(0) != Case_36_var(0)) failures++; - if (Case_36_cns(42) != Case_36_var(42)) failures++; - if (Case_36_cns(TestType.MinValue) != Case_36_var(TestType.MinValue)) failures++; - if (Case_36_cns(TestType.MaxValue) != Case_36_var(TestType.MaxValue)) failures++; - if (Case_37_cns(0) != Case_37_var(0)) failures++; - if (Case_37_cns(42) != Case_37_var(42)) failures++; - if (Case_37_cns(TestType.MinValue) != Case_37_var(TestType.MinValue)) failures++; - if (Case_37_cns(TestType.MaxValue) != Case_37_var(TestType.MaxValue)) failures++; - if (Case_38_cns(0) != Case_38_var(0)) failures++; - if (Case_38_cns(42) != Case_38_var(42)) failures++; - if (Case_38_cns(TestType.MinValue) != Case_38_var(TestType.MinValue)) failures++; - if (Case_38_cns(TestType.MaxValue) != Case_38_var(TestType.MaxValue)) failures++; - if (Case_39_cns(0) != Case_39_var(0)) failures++; - if (Case_39_cns(42) != Case_39_var(42)) failures++; - if (Case_39_cns(TestType.MinValue) != Case_39_var(TestType.MinValue)) failures++; - if (Case_39_cns(TestType.MaxValue) != Case_39_var(TestType.MaxValue)) failures++; - if (Case_40_cns(0) != Case_40_var(0)) failures++; - if (Case_40_cns(42) != Case_40_var(42)) failures++; - if (Case_40_cns(TestType.MinValue) != Case_40_var(TestType.MinValue)) failures++; - if (Case_40_cns(TestType.MaxValue) != Case_40_var(TestType.MaxValue)) failures++; - if (Case_41_cns(0) != Case_41_var(0)) failures++; - if (Case_41_cns(42) != Case_41_var(42)) failures++; - if (Case_41_cns(TestType.MinValue) != Case_41_var(TestType.MinValue)) failures++; - if (Case_41_cns(TestType.MaxValue) != Case_41_var(TestType.MaxValue)) failures++; - if (Case_42_cns(0) != Case_42_var(0)) failures++; - if (Case_42_cns(42) != Case_42_var(42)) failures++; - if (Case_42_cns(TestType.MinValue) != Case_42_var(TestType.MinValue)) failures++; - if (Case_42_cns(TestType.MaxValue) != Case_42_var(TestType.MaxValue)) failures++; - if (Case_43_cns(0) != Case_43_var(0)) failures++; - if (Case_43_cns(42) != Case_43_var(42)) failures++; - if (Case_43_cns(TestType.MinValue) != Case_43_var(TestType.MinValue)) failures++; - if (Case_43_cns(TestType.MaxValue) != Case_43_var(TestType.MaxValue)) failures++; - if (Case_44_cns(0) != Case_44_var(0)) failures++; - if (Case_44_cns(42) != Case_44_var(42)) failures++; - if (Case_44_cns(TestType.MinValue) != Case_44_var(TestType.MinValue)) failures++; - if (Case_44_cns(TestType.MaxValue) != Case_44_var(TestType.MaxValue)) failures++; - if (Case_45_cns(0) != Case_45_var(0)) failures++; - if (Case_45_cns(42) != Case_45_var(42)) failures++; - if (Case_45_cns(TestType.MinValue) != Case_45_var(TestType.MinValue)) failures++; - if (Case_45_cns(TestType.MaxValue) != Case_45_var(TestType.MaxValue)) failures++; - if (Case_46_cns(0) != Case_46_var(0)) failures++; - if (Case_46_cns(42) != Case_46_var(42)) failures++; - if (Case_46_cns(TestType.MinValue) != Case_46_var(TestType.MinValue)) failures++; - if (Case_46_cns(TestType.MaxValue) != Case_46_var(TestType.MaxValue)) failures++; - if (Case_47_cns(0) != Case_47_var(0)) failures++; - if (Case_47_cns(42) != Case_47_var(42)) failures++; - if (Case_47_cns(TestType.MinValue) != Case_47_var(TestType.MinValue)) failures++; - if (Case_47_cns(TestType.MaxValue) != Case_47_var(TestType.MaxValue)) failures++; - if (Case_48_cns(0) != Case_48_var(0)) failures++; - if (Case_48_cns(42) != Case_48_var(42)) failures++; - if (Case_48_cns(TestType.MinValue) != Case_48_var(TestType.MinValue)) failures++; - if (Case_48_cns(TestType.MaxValue) != Case_48_var(TestType.MaxValue)) failures++; - if (Case_49_cns(0) != Case_49_var(0)) failures++; - if (Case_49_cns(42) != Case_49_var(42)) failures++; - if (Case_49_cns(TestType.MinValue) != Case_49_var(TestType.MinValue)) failures++; - if (Case_49_cns(TestType.MaxValue) != Case_49_var(TestType.MaxValue)) failures++; - if (Case_50_cns(0) != Case_50_var(0)) failures++; - if (Case_50_cns(42) != Case_50_var(42)) failures++; - if (Case_50_cns(TestType.MinValue) != Case_50_var(TestType.MinValue)) failures++; - if (Case_50_cns(TestType.MaxValue) != Case_50_var(TestType.MaxValue)) failures++; - if (Case_51_cns(0) != Case_51_var(0)) failures++; - if (Case_51_cns(42) != Case_51_var(42)) failures++; - if (Case_51_cns(TestType.MinValue) != Case_51_var(TestType.MinValue)) failures++; - if (Case_51_cns(TestType.MaxValue) != Case_51_var(TestType.MaxValue)) failures++; - if (Case_52_cns(0) != Case_52_var(0)) failures++; - if (Case_52_cns(42) != Case_52_var(42)) failures++; - if (Case_52_cns(TestType.MinValue) != Case_52_var(TestType.MinValue)) failures++; - if (Case_52_cns(TestType.MaxValue) != Case_52_var(TestType.MaxValue)) failures++; - if (Case_53_cns(0) != Case_53_var(0)) failures++; - if (Case_53_cns(42) != Case_53_var(42)) failures++; - if (Case_53_cns(TestType.MinValue) != Case_53_var(TestType.MinValue)) failures++; - if (Case_53_cns(TestType.MaxValue) != Case_53_var(TestType.MaxValue)) failures++; - if (Case_54_cns(0) != Case_54_var(0)) failures++; - if (Case_54_cns(42) != Case_54_var(42)) failures++; - if (Case_54_cns(TestType.MinValue) != Case_54_var(TestType.MinValue)) failures++; - if (Case_54_cns(TestType.MaxValue) != Case_54_var(TestType.MaxValue)) failures++; - if (Case_55_cns(0) != Case_55_var(0)) failures++; - if (Case_55_cns(42) != Case_55_var(42)) failures++; - if (Case_55_cns(TestType.MinValue) != Case_55_var(TestType.MinValue)) failures++; - if (Case_55_cns(TestType.MaxValue) != Case_55_var(TestType.MaxValue)) failures++; - if (Case_56_cns(0) != Case_56_var(0)) failures++; - if (Case_56_cns(42) != Case_56_var(42)) failures++; - if (Case_56_cns(TestType.MinValue) != Case_56_var(TestType.MinValue)) failures++; - if (Case_56_cns(TestType.MaxValue) != Case_56_var(TestType.MaxValue)) failures++; - if (Case_57_cns(0) != Case_57_var(0)) failures++; - if (Case_57_cns(42) != Case_57_var(42)) failures++; - if (Case_57_cns(TestType.MinValue) != Case_57_var(TestType.MinValue)) failures++; - if (Case_57_cns(TestType.MaxValue) != Case_57_var(TestType.MaxValue)) failures++; - if (Case_58_cns(0) != Case_58_var(0)) failures++; - if (Case_58_cns(42) != Case_58_var(42)) failures++; - if (Case_58_cns(TestType.MinValue) != Case_58_var(TestType.MinValue)) failures++; - if (Case_58_cns(TestType.MaxValue) != Case_58_var(TestType.MaxValue)) failures++; - if (Case_59_cns(0) != Case_59_var(0)) failures++; - if (Case_59_cns(42) != Case_59_var(42)) failures++; - if (Case_59_cns(TestType.MinValue) != Case_59_var(TestType.MinValue)) failures++; - if (Case_59_cns(TestType.MaxValue) != Case_59_var(TestType.MaxValue)) failures++; - if (Case_60_cns(0) != Case_60_var(0)) failures++; - if (Case_60_cns(42) != Case_60_var(42)) failures++; - if (Case_60_cns(TestType.MinValue) != Case_60_var(TestType.MinValue)) failures++; - if (Case_60_cns(TestType.MaxValue) != Case_60_var(TestType.MaxValue)) failures++; - if (Case_61_cns(0) != Case_61_var(0)) failures++; - if (Case_61_cns(42) != Case_61_var(42)) failures++; - if (Case_61_cns(TestType.MinValue) != Case_61_var(TestType.MinValue)) failures++; - if (Case_61_cns(TestType.MaxValue) != Case_61_var(TestType.MaxValue)) failures++; - if (Case_62_cns(0) != Case_62_var(0)) failures++; - if (Case_62_cns(42) != Case_62_var(42)) failures++; - if (Case_62_cns(TestType.MinValue) != Case_62_var(TestType.MinValue)) failures++; - if (Case_62_cns(TestType.MaxValue) != Case_62_var(TestType.MaxValue)) failures++; - if (Case_63_cns(0) != Case_63_var(0)) failures++; - if (Case_63_cns(42) != Case_63_var(42)) failures++; - if (Case_63_cns(TestType.MinValue) != Case_63_var(TestType.MinValue)) failures++; - if (Case_63_cns(TestType.MaxValue) != Case_63_var(TestType.MaxValue)) failures++; - if (Case_64_cns(0) != Case_64_var(0)) failures++; - if (Case_64_cns(42) != Case_64_var(42)) failures++; - if (Case_64_cns(TestType.MinValue) != Case_64_var(TestType.MinValue)) failures++; - if (Case_64_cns(TestType.MaxValue) != Case_64_var(TestType.MaxValue)) failures++; - if (Case_65_cns(0) != Case_65_var(0)) failures++; - if (Case_65_cns(42) != Case_65_var(42)) failures++; - if (Case_65_cns(TestType.MinValue) != Case_65_var(TestType.MinValue)) failures++; - if (Case_65_cns(TestType.MaxValue) != Case_65_var(TestType.MaxValue)) failures++; - if (Case_66_cns(0) != Case_66_var(0)) failures++; - if (Case_66_cns(42) != Case_66_var(42)) failures++; - if (Case_66_cns(TestType.MinValue) != Case_66_var(TestType.MinValue)) failures++; - if (Case_66_cns(TestType.MaxValue) != Case_66_var(TestType.MaxValue)) failures++; - if (Case_67_cns(0) != Case_67_var(0)) failures++; - if (Case_67_cns(42) != Case_67_var(42)) failures++; - if (Case_67_cns(TestType.MinValue) != Case_67_var(TestType.MinValue)) failures++; - if (Case_67_cns(TestType.MaxValue) != Case_67_var(TestType.MaxValue)) failures++; - if (Case_68_cns(0) != Case_68_var(0)) failures++; - if (Case_68_cns(42) != Case_68_var(42)) failures++; - if (Case_68_cns(TestType.MinValue) != Case_68_var(TestType.MinValue)) failures++; - if (Case_68_cns(TestType.MaxValue) != Case_68_var(TestType.MaxValue)) failures++; - if (Case_69_cns(0) != Case_69_var(0)) failures++; - if (Case_69_cns(42) != Case_69_var(42)) failures++; - if (Case_69_cns(TestType.MinValue) != Case_69_var(TestType.MinValue)) failures++; - if (Case_69_cns(TestType.MaxValue) != Case_69_var(TestType.MaxValue)) failures++; - if (Case_70_cns(0) != Case_70_var(0)) failures++; - if (Case_70_cns(42) != Case_70_var(42)) failures++; - if (Case_70_cns(TestType.MinValue) != Case_70_var(TestType.MinValue)) failures++; - if (Case_70_cns(TestType.MaxValue) != Case_70_var(TestType.MaxValue)) failures++; - if (Case_71_cns(0) != Case_71_var(0)) failures++; - if (Case_71_cns(42) != Case_71_var(42)) failures++; - if (Case_71_cns(TestType.MinValue) != Case_71_var(TestType.MinValue)) failures++; - if (Case_71_cns(TestType.MaxValue) != Case_71_var(TestType.MaxValue)) failures++; - if (Case_72_cns(0) != Case_72_var(0)) failures++; - if (Case_72_cns(42) != Case_72_var(42)) failures++; - if (Case_72_cns(TestType.MinValue) != Case_72_var(TestType.MinValue)) failures++; - if (Case_72_cns(TestType.MaxValue) != Case_72_var(TestType.MaxValue)) failures++; - if (Case_73_cns(0) != Case_73_var(0)) failures++; - if (Case_73_cns(42) != Case_73_var(42)) failures++; - if (Case_73_cns(TestType.MinValue) != Case_73_var(TestType.MinValue)) failures++; - if (Case_73_cns(TestType.MaxValue) != Case_73_var(TestType.MaxValue)) failures++; - if (Case_74_cns(0) != Case_74_var(0)) failures++; - if (Case_74_cns(42) != Case_74_var(42)) failures++; - if (Case_74_cns(TestType.MinValue) != Case_74_var(TestType.MinValue)) failures++; - if (Case_74_cns(TestType.MaxValue) != Case_74_var(TestType.MaxValue)) failures++; - if (Case_75_cns(0) != Case_75_var(0)) failures++; - if (Case_75_cns(42) != Case_75_var(42)) failures++; - if (Case_75_cns(TestType.MinValue) != Case_75_var(TestType.MinValue)) failures++; - if (Case_75_cns(TestType.MaxValue) != Case_75_var(TestType.MaxValue)) failures++; - if (Case_76_cns(0) != Case_76_var(0)) failures++; - if (Case_76_cns(42) != Case_76_var(42)) failures++; - if (Case_76_cns(TestType.MinValue) != Case_76_var(TestType.MinValue)) failures++; - if (Case_76_cns(TestType.MaxValue) != Case_76_var(TestType.MaxValue)) failures++; - if (Case_77_cns(0) != Case_77_var(0)) failures++; - if (Case_77_cns(42) != Case_77_var(42)) failures++; - if (Case_77_cns(TestType.MinValue) != Case_77_var(TestType.MinValue)) failures++; - if (Case_77_cns(TestType.MaxValue) != Case_77_var(TestType.MaxValue)) failures++; - if (Case_78_cns(0) != Case_78_var(0)) failures++; - if (Case_78_cns(42) != Case_78_var(42)) failures++; - if (Case_78_cns(TestType.MinValue) != Case_78_var(TestType.MinValue)) failures++; - if (Case_78_cns(TestType.MaxValue) != Case_78_var(TestType.MaxValue)) failures++; - if (Case_79_cns(0) != Case_79_var(0)) failures++; - if (Case_79_cns(42) != Case_79_var(42)) failures++; - if (Case_79_cns(TestType.MinValue) != Case_79_var(TestType.MinValue)) failures++; - if (Case_79_cns(TestType.MaxValue) != Case_79_var(TestType.MaxValue)) failures++; - if (Case_80_cns(0) != Case_80_var(0)) failures++; - if (Case_80_cns(42) != Case_80_var(42)) failures++; - if (Case_80_cns(TestType.MinValue) != Case_80_var(TestType.MinValue)) failures++; - if (Case_80_cns(TestType.MaxValue) != Case_80_var(TestType.MaxValue)) failures++; - if (Case_81_cns(0) != Case_81_var(0)) failures++; - if (Case_81_cns(42) != Case_81_var(42)) failures++; - if (Case_81_cns(TestType.MinValue) != Case_81_var(TestType.MinValue)) failures++; - if (Case_81_cns(TestType.MaxValue) != Case_81_var(TestType.MaxValue)) failures++; - return failures; - } -} - -// x op icon1==icon2 -public class ConstantFoldingTests2 : ConstantFoldingTestsBase -{ - [MethodImpl(MethodImplOptions.NoInlining)] bool Case_1_cns(TestType x) => ((x + Const1) == Const2); - [MethodImpl(MethodImplOptions.NoInlining)] bool Case_1_var(TestType x) => ((x + GetConst1()) == GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] bool Case_2_cns(TestType x) => ((x - Const1) == Const2); - [MethodImpl(MethodImplOptions.NoInlining)] bool Case_2_var(TestType x) => ((x - GetConst1()) == GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] bool Case_3_cns(TestType x) => ((x & Const1) == Const2); - [MethodImpl(MethodImplOptions.NoInlining)] bool Case_3_var(TestType x) => ((x & GetConst1()) == GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] bool Case_4_cns(TestType x) => ((x | Const1) == Const2); - [MethodImpl(MethodImplOptions.NoInlining)] bool Case_4_var(TestType x) => ((x | GetConst1()) == GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] bool Case_5_cns(TestType x) => ((x ^ Const1) == Const2); - [MethodImpl(MethodImplOptions.NoInlining)] bool Case_5_var(TestType x) => ((x ^ GetConst1()) == GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] bool Case_6_cns(TestType x) => ((x >> Const1) == Const2); - [MethodImpl(MethodImplOptions.NoInlining)] bool Case_6_var(TestType x) => ((x >> GetConst1()) == GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] bool Case_7_cns(TestType x) => ((x << Const1) == Const2); - [MethodImpl(MethodImplOptions.NoInlining)] bool Case_7_var(TestType x) => ((x << GetConst1()) == GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] bool Case_8_cns(TestType x) => ((x * Const1) == Const2); - [MethodImpl(MethodImplOptions.NoInlining)] bool Case_8_var(TestType x) => ((x * GetConst1()) == GetConst2()); - - [MethodImpl(MethodImplOptions.NoInlining)] bool Case_9_cns(TestType x) => ((x / Const1) == Const2); - [MethodImpl(MethodImplOptions.NoInlining)] bool Case_9_var(TestType x) => ((x / GetConst1()) == GetConst2()); - - public int RunTests() - { - int failures = 0; - if (Case_1_cns(0) != Case_1_var(0)) failures++; - if (Case_1_cns(42) != Case_1_var(42)) failures++; - if (Case_1_cns(TestType.MinValue) != Case_1_var(TestType.MinValue)) failures++; - if (Case_1_cns(TestType.MaxValue) != Case_1_var(TestType.MaxValue)) failures++; - if (Case_2_cns(0) != Case_2_var(0)) failures++; - if (Case_2_cns(42) != Case_2_var(42)) failures++; - if (Case_2_cns(TestType.MinValue) != Case_2_var(TestType.MinValue)) failures++; - if (Case_2_cns(TestType.MaxValue) != Case_2_var(TestType.MaxValue)) failures++; - if (Case_3_cns(0) != Case_3_var(0)) failures++; - if (Case_3_cns(42) != Case_3_var(42)) failures++; - if (Case_3_cns(TestType.MinValue) != Case_3_var(TestType.MinValue)) failures++; - if (Case_3_cns(TestType.MaxValue) != Case_3_var(TestType.MaxValue)) failures++; - if (Case_4_cns(0) != Case_4_var(0)) failures++; - if (Case_4_cns(42) != Case_4_var(42)) failures++; - if (Case_4_cns(TestType.MinValue) != Case_4_var(TestType.MinValue)) failures++; - if (Case_4_cns(TestType.MaxValue) != Case_4_var(TestType.MaxValue)) failures++; - if (Case_5_cns(0) != Case_5_var(0)) failures++; - if (Case_5_cns(42) != Case_5_var(42)) failures++; - if (Case_5_cns(TestType.MinValue) != Case_5_var(TestType.MinValue)) failures++; - if (Case_5_cns(TestType.MaxValue) != Case_5_var(TestType.MaxValue)) failures++; - if (Case_6_cns(0) != Case_6_var(0)) failures++; - if (Case_6_cns(42) != Case_6_var(42)) failures++; - if (Case_6_cns(TestType.MinValue) != Case_6_var(TestType.MinValue)) failures++; - if (Case_6_cns(TestType.MaxValue) != Case_6_var(TestType.MaxValue)) failures++; - if (Case_7_cns(0) != Case_7_var(0)) failures++; - if (Case_7_cns(42) != Case_7_var(42)) failures++; - if (Case_7_cns(TestType.MinValue) != Case_7_var(TestType.MinValue)) failures++; - if (Case_7_cns(TestType.MaxValue) != Case_7_var(TestType.MaxValue)) failures++; - if (Case_8_cns(0) != Case_8_var(0)) failures++; - if (Case_8_cns(42) != Case_8_var(42)) failures++; - if (Case_8_cns(TestType.MinValue) != Case_8_var(TestType.MinValue)) failures++; - if (Case_8_cns(TestType.MaxValue) != Case_8_var(TestType.MaxValue)) failures++; - if (Case_9_cns(0) != Case_9_var(0)) failures++; - if (Case_9_cns(42) != Case_9_var(42)) failures++; - if (Case_9_cns(TestType.MinValue) != Case_9_var(TestType.MinValue)) failures++; - if (Case_9_cns(TestType.MaxValue) != Case_9_var(TestType.MaxValue)) failures++; - return failures; - } -} - -// ((x+icon1)+(y+icon2)) -public class ConstantFoldingTests3 : ConstantFoldingTestsBase -{ - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_1_cns(TestType x, TestType y) => ((x + Const1) + (y + Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_1_var(TestType x, TestType y) => ((x + GetConst1()) + (y + GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_2_cns(TestType x, TestType y) => ((x + Const1) + (y - Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_2_var(TestType x, TestType y) => ((x + GetConst1()) + (y - GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_3_cns(TestType x, TestType y) => ((x + Const1) + (y & Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_3_var(TestType x, TestType y) => ((x + GetConst1()) + (y & GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_4_cns(TestType x, TestType y) => ((x + Const1) + (y | Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_4_var(TestType x, TestType y) => ((x + GetConst1()) + (y | GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_5_cns(TestType x, TestType y) => ((x + Const1) + (y ^ Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_5_var(TestType x, TestType y) => ((x + GetConst1()) + (y ^ GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_6_cns(TestType x, TestType y) => ((x + Const1) + (y >> Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_6_var(TestType x, TestType y) => ((x + GetConst1()) + (y >> GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_7_cns(TestType x, TestType y) => ((x + Const1) + (y << Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_7_var(TestType x, TestType y) => ((x + GetConst1()) + (y << GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_8_cns(TestType x, TestType y) => ((x + Const1) + (y * Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_8_var(TestType x, TestType y) => ((x + GetConst1()) + (y * GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_9_cns(TestType x, TestType y) => ((x + Const1) + (y / Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_9_var(TestType x, TestType y) => ((x + GetConst1()) + (y / GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_10_cns(TestType x, TestType y) => ((x - Const1) + (y + Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_10_var(TestType x, TestType y) => ((x - GetConst1()) + (y + GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_11_cns(TestType x, TestType y) => ((x - Const1) + (y - Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_11_var(TestType x, TestType y) => ((x - GetConst1()) + (y - GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_12_cns(TestType x, TestType y) => ((x - Const1) + (y & Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_12_var(TestType x, TestType y) => ((x - GetConst1()) + (y & GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_13_cns(TestType x, TestType y) => ((x - Const1) + (y | Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_13_var(TestType x, TestType y) => ((x - GetConst1()) + (y | GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_14_cns(TestType x, TestType y) => ((x - Const1) + (y ^ Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_14_var(TestType x, TestType y) => ((x - GetConst1()) + (y ^ GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_15_cns(TestType x, TestType y) => ((x - Const1) + (y >> Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_15_var(TestType x, TestType y) => ((x - GetConst1()) + (y >> GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_16_cns(TestType x, TestType y) => ((x - Const1) + (y << Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_16_var(TestType x, TestType y) => ((x - GetConst1()) + (y << GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_17_cns(TestType x, TestType y) => ((x - Const1) + (y * Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_17_var(TestType x, TestType y) => ((x - GetConst1()) + (y * GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_18_cns(TestType x, TestType y) => ((x - Const1) + (y / Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_18_var(TestType x, TestType y) => ((x - GetConst1()) + (y / GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_19_cns(TestType x, TestType y) => ((x & Const1) + (y + Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_19_var(TestType x, TestType y) => ((x & GetConst1()) + (y + GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_20_cns(TestType x, TestType y) => ((x & Const1) + (y - Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_20_var(TestType x, TestType y) => ((x & GetConst1()) + (y - GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_21_cns(TestType x, TestType y) => ((x & Const1) + (y & Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_21_var(TestType x, TestType y) => ((x & GetConst1()) + (y & GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_22_cns(TestType x, TestType y) => ((x & Const1) + (y | Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_22_var(TestType x, TestType y) => ((x & GetConst1()) + (y | GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_23_cns(TestType x, TestType y) => ((x & Const1) + (y ^ Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_23_var(TestType x, TestType y) => ((x & GetConst1()) + (y ^ GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_24_cns(TestType x, TestType y) => ((x & Const1) + (y >> Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_24_var(TestType x, TestType y) => ((x & GetConst1()) + (y >> GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_25_cns(TestType x, TestType y) => ((x & Const1) + (y << Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_25_var(TestType x, TestType y) => ((x & GetConst1()) + (y << GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_26_cns(TestType x, TestType y) => ((x & Const1) + (y * Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_26_var(TestType x, TestType y) => ((x & GetConst1()) + (y * GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_27_cns(TestType x, TestType y) => ((x & Const1) + (y / Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_27_var(TestType x, TestType y) => ((x & GetConst1()) + (y / GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_28_cns(TestType x, TestType y) => ((x | Const1) + (y + Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_28_var(TestType x, TestType y) => ((x | GetConst1()) + (y + GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_29_cns(TestType x, TestType y) => ((x | Const1) + (y - Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_29_var(TestType x, TestType y) => ((x | GetConst1()) + (y - GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_30_cns(TestType x, TestType y) => ((x | Const1) + (y & Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_30_var(TestType x, TestType y) => ((x | GetConst1()) + (y & GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_31_cns(TestType x, TestType y) => ((x | Const1) + (y | Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_31_var(TestType x, TestType y) => ((x | GetConst1()) + (y | GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_32_cns(TestType x, TestType y) => ((x | Const1) + (y ^ Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_32_var(TestType x, TestType y) => ((x | GetConst1()) + (y ^ GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_33_cns(TestType x, TestType y) => ((x | Const1) + (y >> Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_33_var(TestType x, TestType y) => ((x | GetConst1()) + (y >> GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_34_cns(TestType x, TestType y) => ((x | Const1) + (y << Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_34_var(TestType x, TestType y) => ((x | GetConst1()) + (y << GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_35_cns(TestType x, TestType y) => ((x | Const1) + (y * Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_35_var(TestType x, TestType y) => ((x | GetConst1()) + (y * GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_36_cns(TestType x, TestType y) => ((x | Const1) + (y / Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_36_var(TestType x, TestType y) => ((x | GetConst1()) + (y / GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_37_cns(TestType x, TestType y) => ((x ^ Const1) + (y + Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_37_var(TestType x, TestType y) => ((x ^ GetConst1()) + (y + GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_38_cns(TestType x, TestType y) => ((x ^ Const1) + (y - Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_38_var(TestType x, TestType y) => ((x ^ GetConst1()) + (y - GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_39_cns(TestType x, TestType y) => ((x ^ Const1) + (y & Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_39_var(TestType x, TestType y) => ((x ^ GetConst1()) + (y & GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_40_cns(TestType x, TestType y) => ((x ^ Const1) + (y | Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_40_var(TestType x, TestType y) => ((x ^ GetConst1()) + (y | GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_41_cns(TestType x, TestType y) => ((x ^ Const1) + (y ^ Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_41_var(TestType x, TestType y) => ((x ^ GetConst1()) + (y ^ GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_42_cns(TestType x, TestType y) => ((x ^ Const1) + (y >> Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_42_var(TestType x, TestType y) => ((x ^ GetConst1()) + (y >> GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_43_cns(TestType x, TestType y) => ((x ^ Const1) + (y << Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_43_var(TestType x, TestType y) => ((x ^ GetConst1()) + (y << GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_44_cns(TestType x, TestType y) => ((x ^ Const1) + (y * Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_44_var(TestType x, TestType y) => ((x ^ GetConst1()) + (y * GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_45_cns(TestType x, TestType y) => ((x ^ Const1) + (y / Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_45_var(TestType x, TestType y) => ((x ^ GetConst1()) + (y / GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_46_cns(TestType x, TestType y) => ((x >> Const1) + (y + Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_46_var(TestType x, TestType y) => ((x >> GetConst1()) + (y + GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_47_cns(TestType x, TestType y) => ((x >> Const1) + (y - Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_47_var(TestType x, TestType y) => ((x >> GetConst1()) + (y - GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_48_cns(TestType x, TestType y) => ((x >> Const1) + (y & Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_48_var(TestType x, TestType y) => ((x >> GetConst1()) + (y & GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_49_cns(TestType x, TestType y) => ((x >> Const1) + (y | Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_49_var(TestType x, TestType y) => ((x >> GetConst1()) + (y | GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_50_cns(TestType x, TestType y) => ((x >> Const1) + (y ^ Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_50_var(TestType x, TestType y) => ((x >> GetConst1()) + (y ^ GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_51_cns(TestType x, TestType y) => ((x >> Const1) + (y >> Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_51_var(TestType x, TestType y) => ((x >> GetConst1()) + (y >> GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_52_cns(TestType x, TestType y) => ((x >> Const1) + (y << Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_52_var(TestType x, TestType y) => ((x >> GetConst1()) + (y << GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_53_cns(TestType x, TestType y) => ((x >> Const1) + (y * Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_53_var(TestType x, TestType y) => ((x >> GetConst1()) + (y * GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_54_cns(TestType x, TestType y) => ((x >> Const1) + (y / Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_54_var(TestType x, TestType y) => ((x >> GetConst1()) + (y / GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_55_cns(TestType x, TestType y) => ((x << Const1) + (y + Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_55_var(TestType x, TestType y) => ((x << GetConst1()) + (y + GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_56_cns(TestType x, TestType y) => ((x << Const1) + (y - Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_56_var(TestType x, TestType y) => ((x << GetConst1()) + (y - GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_57_cns(TestType x, TestType y) => ((x << Const1) + (y & Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_57_var(TestType x, TestType y) => ((x << GetConst1()) + (y & GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_58_cns(TestType x, TestType y) => ((x << Const1) + (y | Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_58_var(TestType x, TestType y) => ((x << GetConst1()) + (y | GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_59_cns(TestType x, TestType y) => ((x << Const1) + (y ^ Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_59_var(TestType x, TestType y) => ((x << GetConst1()) + (y ^ GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_60_cns(TestType x, TestType y) => ((x << Const1) + (y >> Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_60_var(TestType x, TestType y) => ((x << GetConst1()) + (y >> GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_61_cns(TestType x, TestType y) => ((x << Const1) + (y << Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_61_var(TestType x, TestType y) => ((x << GetConst1()) + (y << GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_62_cns(TestType x, TestType y) => ((x << Const1) + (y * Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_62_var(TestType x, TestType y) => ((x << GetConst1()) + (y * GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_63_cns(TestType x, TestType y) => ((x << Const1) + (y / Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_63_var(TestType x, TestType y) => ((x << GetConst1()) + (y / GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_64_cns(TestType x, TestType y) => ((x * Const1) + (y + Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_64_var(TestType x, TestType y) => ((x * GetConst1()) + (y + GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_65_cns(TestType x, TestType y) => ((x * Const1) + (y - Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_65_var(TestType x, TestType y) => ((x * GetConst1()) + (y - GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_66_cns(TestType x, TestType y) => ((x * Const1) + (y & Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_66_var(TestType x, TestType y) => ((x * GetConst1()) + (y & GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_67_cns(TestType x, TestType y) => ((x * Const1) + (y | Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_67_var(TestType x, TestType y) => ((x * GetConst1()) + (y | GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_68_cns(TestType x, TestType y) => ((x * Const1) + (y ^ Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_68_var(TestType x, TestType y) => ((x * GetConst1()) + (y ^ GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_69_cns(TestType x, TestType y) => ((x * Const1) + (y >> Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_69_var(TestType x, TestType y) => ((x * GetConst1()) + (y >> GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_70_cns(TestType x, TestType y) => ((x * Const1) + (y << Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_70_var(TestType x, TestType y) => ((x * GetConst1()) + (y << GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_71_cns(TestType x, TestType y) => ((x * Const1) + (y * Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_71_var(TestType x, TestType y) => ((x * GetConst1()) + (y * GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_72_cns(TestType x, TestType y) => ((x * Const1) + (y / Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_72_var(TestType x, TestType y) => ((x * GetConst1()) + (y / GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_73_cns(TestType x, TestType y) => ((x / Const1) + (y + Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_73_var(TestType x, TestType y) => ((x / GetConst1()) + (y + GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_74_cns(TestType x, TestType y) => ((x / Const1) + (y - Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_74_var(TestType x, TestType y) => ((x / GetConst1()) + (y - GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_75_cns(TestType x, TestType y) => ((x / Const1) + (y & Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_75_var(TestType x, TestType y) => ((x / GetConst1()) + (y & GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_76_cns(TestType x, TestType y) => ((x / Const1) + (y | Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_76_var(TestType x, TestType y) => ((x / GetConst1()) + (y | GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_77_cns(TestType x, TestType y) => ((x / Const1) + (y ^ Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_77_var(TestType x, TestType y) => ((x / GetConst1()) + (y ^ GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_78_cns(TestType x, TestType y) => ((x / Const1) + (y >> Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_78_var(TestType x, TestType y) => ((x / GetConst1()) + (y >> GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_79_cns(TestType x, TestType y) => ((x / Const1) + (y << Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_79_var(TestType x, TestType y) => ((x / GetConst1()) + (y << GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_80_cns(TestType x, TestType y) => ((x / Const1) + (y * Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_80_var(TestType x, TestType y) => ((x / GetConst1()) + (y * GetConst2())); - - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_81_cns(TestType x, TestType y) => ((x / Const1) + (y / Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_81_var(TestType x, TestType y) => ((x / GetConst1()) + (y / GetConst2())); - - public int RunTests() - { - int failures = 0; - if (Case_1_cns(0, 0) != Case_1_var(0, 0)) failures++; - if (Case_1_cns(42, 42) != Case_1_var(42, 42)) failures++; - if (Case_1_cns(TestType.MinValue, TestType.MinValue) != Case_1_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_1_cns(TestType.MaxValue, TestType.MaxValue) != Case_1_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_1_cns(TestType.MaxValue, TestType.MinValue) != Case_1_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_1_cns(TestType.MinValue, TestType.MaxValue) != Case_1_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_2_cns(0, 0) != Case_2_var(0, 0)) failures++; - if (Case_2_cns(42, 42) != Case_2_var(42, 42)) failures++; - if (Case_2_cns(TestType.MinValue, TestType.MinValue) != Case_2_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_2_cns(TestType.MaxValue, TestType.MaxValue) != Case_2_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_2_cns(TestType.MaxValue, TestType.MinValue) != Case_2_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_2_cns(TestType.MinValue, TestType.MaxValue) != Case_2_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_3_cns(0, 0) != Case_3_var(0, 0)) failures++; - if (Case_3_cns(42, 42) != Case_3_var(42, 42)) failures++; - if (Case_3_cns(TestType.MinValue, TestType.MinValue) != Case_3_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_3_cns(TestType.MaxValue, TestType.MaxValue) != Case_3_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_3_cns(TestType.MaxValue, TestType.MinValue) != Case_3_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_3_cns(TestType.MinValue, TestType.MaxValue) != Case_3_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_4_cns(0, 0) != Case_4_var(0, 0)) failures++; - if (Case_4_cns(42, 42) != Case_4_var(42, 42)) failures++; - if (Case_4_cns(TestType.MinValue, TestType.MinValue) != Case_4_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_4_cns(TestType.MaxValue, TestType.MaxValue) != Case_4_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_4_cns(TestType.MaxValue, TestType.MinValue) != Case_4_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_4_cns(TestType.MinValue, TestType.MaxValue) != Case_4_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_5_cns(0, 0) != Case_5_var(0, 0)) failures++; - if (Case_5_cns(42, 42) != Case_5_var(42, 42)) failures++; - if (Case_5_cns(TestType.MinValue, TestType.MinValue) != Case_5_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_5_cns(TestType.MaxValue, TestType.MaxValue) != Case_5_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_5_cns(TestType.MaxValue, TestType.MinValue) != Case_5_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_5_cns(TestType.MinValue, TestType.MaxValue) != Case_5_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_6_cns(0, 0) != Case_6_var(0, 0)) failures++; - if (Case_6_cns(42, 42) != Case_6_var(42, 42)) failures++; - if (Case_6_cns(TestType.MinValue, TestType.MinValue) != Case_6_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_6_cns(TestType.MaxValue, TestType.MaxValue) != Case_6_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_6_cns(TestType.MaxValue, TestType.MinValue) != Case_6_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_6_cns(TestType.MinValue, TestType.MaxValue) != Case_6_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_7_cns(0, 0) != Case_7_var(0, 0)) failures++; - if (Case_7_cns(42, 42) != Case_7_var(42, 42)) failures++; - if (Case_7_cns(TestType.MinValue, TestType.MinValue) != Case_7_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_7_cns(TestType.MaxValue, TestType.MaxValue) != Case_7_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_7_cns(TestType.MaxValue, TestType.MinValue) != Case_7_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_7_cns(TestType.MinValue, TestType.MaxValue) != Case_7_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_8_cns(0, 0) != Case_8_var(0, 0)) failures++; - if (Case_8_cns(42, 42) != Case_8_var(42, 42)) failures++; - if (Case_8_cns(TestType.MinValue, TestType.MinValue) != Case_8_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_8_cns(TestType.MaxValue, TestType.MaxValue) != Case_8_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_8_cns(TestType.MaxValue, TestType.MinValue) != Case_8_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_8_cns(TestType.MinValue, TestType.MaxValue) != Case_8_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_9_cns(0, 0) != Case_9_var(0, 0)) failures++; - if (Case_9_cns(42, 42) != Case_9_var(42, 42)) failures++; - if (Case_9_cns(TestType.MinValue, TestType.MinValue) != Case_9_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_9_cns(TestType.MaxValue, TestType.MaxValue) != Case_9_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_9_cns(TestType.MaxValue, TestType.MinValue) != Case_9_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_9_cns(TestType.MinValue, TestType.MaxValue) != Case_9_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_10_cns(0, 0) != Case_10_var(0, 0)) failures++; - if (Case_10_cns(42, 42) != Case_10_var(42, 42)) failures++; - if (Case_10_cns(TestType.MinValue, TestType.MinValue) != Case_10_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_10_cns(TestType.MaxValue, TestType.MaxValue) != Case_10_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_10_cns(TestType.MaxValue, TestType.MinValue) != Case_10_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_10_cns(TestType.MinValue, TestType.MaxValue) != Case_10_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_11_cns(0, 0) != Case_11_var(0, 0)) failures++; - if (Case_11_cns(42, 42) != Case_11_var(42, 42)) failures++; - if (Case_11_cns(TestType.MinValue, TestType.MinValue) != Case_11_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_11_cns(TestType.MaxValue, TestType.MaxValue) != Case_11_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_11_cns(TestType.MaxValue, TestType.MinValue) != Case_11_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_11_cns(TestType.MinValue, TestType.MaxValue) != Case_11_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_12_cns(0, 0) != Case_12_var(0, 0)) failures++; - if (Case_12_cns(42, 42) != Case_12_var(42, 42)) failures++; - if (Case_12_cns(TestType.MinValue, TestType.MinValue) != Case_12_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_12_cns(TestType.MaxValue, TestType.MaxValue) != Case_12_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_12_cns(TestType.MaxValue, TestType.MinValue) != Case_12_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_12_cns(TestType.MinValue, TestType.MaxValue) != Case_12_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_13_cns(0, 0) != Case_13_var(0, 0)) failures++; - if (Case_13_cns(42, 42) != Case_13_var(42, 42)) failures++; - if (Case_13_cns(TestType.MinValue, TestType.MinValue) != Case_13_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_13_cns(TestType.MaxValue, TestType.MaxValue) != Case_13_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_13_cns(TestType.MaxValue, TestType.MinValue) != Case_13_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_13_cns(TestType.MinValue, TestType.MaxValue) != Case_13_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_14_cns(0, 0) != Case_14_var(0, 0)) failures++; - if (Case_14_cns(42, 42) != Case_14_var(42, 42)) failures++; - if (Case_14_cns(TestType.MinValue, TestType.MinValue) != Case_14_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_14_cns(TestType.MaxValue, TestType.MaxValue) != Case_14_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_14_cns(TestType.MaxValue, TestType.MinValue) != Case_14_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_14_cns(TestType.MinValue, TestType.MaxValue) != Case_14_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_15_cns(0, 0) != Case_15_var(0, 0)) failures++; - if (Case_15_cns(42, 42) != Case_15_var(42, 42)) failures++; - if (Case_15_cns(TestType.MinValue, TestType.MinValue) != Case_15_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_15_cns(TestType.MaxValue, TestType.MaxValue) != Case_15_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_15_cns(TestType.MaxValue, TestType.MinValue) != Case_15_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_15_cns(TestType.MinValue, TestType.MaxValue) != Case_15_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_16_cns(0, 0) != Case_16_var(0, 0)) failures++; - if (Case_16_cns(42, 42) != Case_16_var(42, 42)) failures++; - if (Case_16_cns(TestType.MinValue, TestType.MinValue) != Case_16_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_16_cns(TestType.MaxValue, TestType.MaxValue) != Case_16_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_16_cns(TestType.MaxValue, TestType.MinValue) != Case_16_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_16_cns(TestType.MinValue, TestType.MaxValue) != Case_16_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_17_cns(0, 0) != Case_17_var(0, 0)) failures++; - if (Case_17_cns(42, 42) != Case_17_var(42, 42)) failures++; - if (Case_17_cns(TestType.MinValue, TestType.MinValue) != Case_17_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_17_cns(TestType.MaxValue, TestType.MaxValue) != Case_17_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_17_cns(TestType.MaxValue, TestType.MinValue) != Case_17_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_17_cns(TestType.MinValue, TestType.MaxValue) != Case_17_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_18_cns(0, 0) != Case_18_var(0, 0)) failures++; - if (Case_18_cns(42, 42) != Case_18_var(42, 42)) failures++; - if (Case_18_cns(TestType.MinValue, TestType.MinValue) != Case_18_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_18_cns(TestType.MaxValue, TestType.MaxValue) != Case_18_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_18_cns(TestType.MaxValue, TestType.MinValue) != Case_18_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_18_cns(TestType.MinValue, TestType.MaxValue) != Case_18_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_19_cns(0, 0) != Case_19_var(0, 0)) failures++; - if (Case_19_cns(42, 42) != Case_19_var(42, 42)) failures++; - if (Case_19_cns(TestType.MinValue, TestType.MinValue) != Case_19_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_19_cns(TestType.MaxValue, TestType.MaxValue) != Case_19_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_19_cns(TestType.MaxValue, TestType.MinValue) != Case_19_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_19_cns(TestType.MinValue, TestType.MaxValue) != Case_19_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_20_cns(0, 0) != Case_20_var(0, 0)) failures++; - if (Case_20_cns(42, 42) != Case_20_var(42, 42)) failures++; - if (Case_20_cns(TestType.MinValue, TestType.MinValue) != Case_20_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_20_cns(TestType.MaxValue, TestType.MaxValue) != Case_20_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_20_cns(TestType.MaxValue, TestType.MinValue) != Case_20_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_20_cns(TestType.MinValue, TestType.MaxValue) != Case_20_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_21_cns(0, 0) != Case_21_var(0, 0)) failures++; - if (Case_21_cns(42, 42) != Case_21_var(42, 42)) failures++; - if (Case_21_cns(TestType.MinValue, TestType.MinValue) != Case_21_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_21_cns(TestType.MaxValue, TestType.MaxValue) != Case_21_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_21_cns(TestType.MaxValue, TestType.MinValue) != Case_21_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_21_cns(TestType.MinValue, TestType.MaxValue) != Case_21_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_22_cns(0, 0) != Case_22_var(0, 0)) failures++; - if (Case_22_cns(42, 42) != Case_22_var(42, 42)) failures++; - if (Case_22_cns(TestType.MinValue, TestType.MinValue) != Case_22_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_22_cns(TestType.MaxValue, TestType.MaxValue) != Case_22_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_22_cns(TestType.MaxValue, TestType.MinValue) != Case_22_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_22_cns(TestType.MinValue, TestType.MaxValue) != Case_22_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_23_cns(0, 0) != Case_23_var(0, 0)) failures++; - if (Case_23_cns(42, 42) != Case_23_var(42, 42)) failures++; - if (Case_23_cns(TestType.MinValue, TestType.MinValue) != Case_23_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_23_cns(TestType.MaxValue, TestType.MaxValue) != Case_23_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_23_cns(TestType.MaxValue, TestType.MinValue) != Case_23_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_23_cns(TestType.MinValue, TestType.MaxValue) != Case_23_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_24_cns(0, 0) != Case_24_var(0, 0)) failures++; - if (Case_24_cns(42, 42) != Case_24_var(42, 42)) failures++; - if (Case_24_cns(TestType.MinValue, TestType.MinValue) != Case_24_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_24_cns(TestType.MaxValue, TestType.MaxValue) != Case_24_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_24_cns(TestType.MaxValue, TestType.MinValue) != Case_24_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_24_cns(TestType.MinValue, TestType.MaxValue) != Case_24_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_25_cns(0, 0) != Case_25_var(0, 0)) failures++; - if (Case_25_cns(42, 42) != Case_25_var(42, 42)) failures++; - if (Case_25_cns(TestType.MinValue, TestType.MinValue) != Case_25_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_25_cns(TestType.MaxValue, TestType.MaxValue) != Case_25_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_25_cns(TestType.MaxValue, TestType.MinValue) != Case_25_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_25_cns(TestType.MinValue, TestType.MaxValue) != Case_25_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_26_cns(0, 0) != Case_26_var(0, 0)) failures++; - if (Case_26_cns(42, 42) != Case_26_var(42, 42)) failures++; - if (Case_26_cns(TestType.MinValue, TestType.MinValue) != Case_26_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_26_cns(TestType.MaxValue, TestType.MaxValue) != Case_26_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_26_cns(TestType.MaxValue, TestType.MinValue) != Case_26_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_26_cns(TestType.MinValue, TestType.MaxValue) != Case_26_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_27_cns(0, 0) != Case_27_var(0, 0)) failures++; - if (Case_27_cns(42, 42) != Case_27_var(42, 42)) failures++; - if (Case_27_cns(TestType.MinValue, TestType.MinValue) != Case_27_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_27_cns(TestType.MaxValue, TestType.MaxValue) != Case_27_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_27_cns(TestType.MaxValue, TestType.MinValue) != Case_27_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_27_cns(TestType.MinValue, TestType.MaxValue) != Case_27_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_28_cns(0, 0) != Case_28_var(0, 0)) failures++; - if (Case_28_cns(42, 42) != Case_28_var(42, 42)) failures++; - if (Case_28_cns(TestType.MinValue, TestType.MinValue) != Case_28_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_28_cns(TestType.MaxValue, TestType.MaxValue) != Case_28_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_28_cns(TestType.MaxValue, TestType.MinValue) != Case_28_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_28_cns(TestType.MinValue, TestType.MaxValue) != Case_28_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_29_cns(0, 0) != Case_29_var(0, 0)) failures++; - if (Case_29_cns(42, 42) != Case_29_var(42, 42)) failures++; - if (Case_29_cns(TestType.MinValue, TestType.MinValue) != Case_29_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_29_cns(TestType.MaxValue, TestType.MaxValue) != Case_29_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_29_cns(TestType.MaxValue, TestType.MinValue) != Case_29_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_29_cns(TestType.MinValue, TestType.MaxValue) != Case_29_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_30_cns(0, 0) != Case_30_var(0, 0)) failures++; - if (Case_30_cns(42, 42) != Case_30_var(42, 42)) failures++; - if (Case_30_cns(TestType.MinValue, TestType.MinValue) != Case_30_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_30_cns(TestType.MaxValue, TestType.MaxValue) != Case_30_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_30_cns(TestType.MaxValue, TestType.MinValue) != Case_30_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_30_cns(TestType.MinValue, TestType.MaxValue) != Case_30_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_31_cns(0, 0) != Case_31_var(0, 0)) failures++; - if (Case_31_cns(42, 42) != Case_31_var(42, 42)) failures++; - if (Case_31_cns(TestType.MinValue, TestType.MinValue) != Case_31_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_31_cns(TestType.MaxValue, TestType.MaxValue) != Case_31_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_31_cns(TestType.MaxValue, TestType.MinValue) != Case_31_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_31_cns(TestType.MinValue, TestType.MaxValue) != Case_31_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_32_cns(0, 0) != Case_32_var(0, 0)) failures++; - if (Case_32_cns(42, 42) != Case_32_var(42, 42)) failures++; - if (Case_32_cns(TestType.MinValue, TestType.MinValue) != Case_32_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_32_cns(TestType.MaxValue, TestType.MaxValue) != Case_32_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_32_cns(TestType.MaxValue, TestType.MinValue) != Case_32_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_32_cns(TestType.MinValue, TestType.MaxValue) != Case_32_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_33_cns(0, 0) != Case_33_var(0, 0)) failures++; - if (Case_33_cns(42, 42) != Case_33_var(42, 42)) failures++; - if (Case_33_cns(TestType.MinValue, TestType.MinValue) != Case_33_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_33_cns(TestType.MaxValue, TestType.MaxValue) != Case_33_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_33_cns(TestType.MaxValue, TestType.MinValue) != Case_33_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_33_cns(TestType.MinValue, TestType.MaxValue) != Case_33_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_34_cns(0, 0) != Case_34_var(0, 0)) failures++; - if (Case_34_cns(42, 42) != Case_34_var(42, 42)) failures++; - if (Case_34_cns(TestType.MinValue, TestType.MinValue) != Case_34_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_34_cns(TestType.MaxValue, TestType.MaxValue) != Case_34_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_34_cns(TestType.MaxValue, TestType.MinValue) != Case_34_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_34_cns(TestType.MinValue, TestType.MaxValue) != Case_34_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_35_cns(0, 0) != Case_35_var(0, 0)) failures++; - if (Case_35_cns(42, 42) != Case_35_var(42, 42)) failures++; - if (Case_35_cns(TestType.MinValue, TestType.MinValue) != Case_35_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_35_cns(TestType.MaxValue, TestType.MaxValue) != Case_35_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_35_cns(TestType.MaxValue, TestType.MinValue) != Case_35_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_35_cns(TestType.MinValue, TestType.MaxValue) != Case_35_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_36_cns(0, 0) != Case_36_var(0, 0)) failures++; - if (Case_36_cns(42, 42) != Case_36_var(42, 42)) failures++; - if (Case_36_cns(TestType.MinValue, TestType.MinValue) != Case_36_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_36_cns(TestType.MaxValue, TestType.MaxValue) != Case_36_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_36_cns(TestType.MaxValue, TestType.MinValue) != Case_36_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_36_cns(TestType.MinValue, TestType.MaxValue) != Case_36_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_37_cns(0, 0) != Case_37_var(0, 0)) failures++; - if (Case_37_cns(42, 42) != Case_37_var(42, 42)) failures++; - if (Case_37_cns(TestType.MinValue, TestType.MinValue) != Case_37_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_37_cns(TestType.MaxValue, TestType.MaxValue) != Case_37_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_37_cns(TestType.MaxValue, TestType.MinValue) != Case_37_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_37_cns(TestType.MinValue, TestType.MaxValue) != Case_37_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_38_cns(0, 0) != Case_38_var(0, 0)) failures++; - if (Case_38_cns(42, 42) != Case_38_var(42, 42)) failures++; - if (Case_38_cns(TestType.MinValue, TestType.MinValue) != Case_38_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_38_cns(TestType.MaxValue, TestType.MaxValue) != Case_38_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_38_cns(TestType.MaxValue, TestType.MinValue) != Case_38_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_38_cns(TestType.MinValue, TestType.MaxValue) != Case_38_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_39_cns(0, 0) != Case_39_var(0, 0)) failures++; - if (Case_39_cns(42, 42) != Case_39_var(42, 42)) failures++; - if (Case_39_cns(TestType.MinValue, TestType.MinValue) != Case_39_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_39_cns(TestType.MaxValue, TestType.MaxValue) != Case_39_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_39_cns(TestType.MaxValue, TestType.MinValue) != Case_39_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_39_cns(TestType.MinValue, TestType.MaxValue) != Case_39_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_40_cns(0, 0) != Case_40_var(0, 0)) failures++; - if (Case_40_cns(42, 42) != Case_40_var(42, 42)) failures++; - if (Case_40_cns(TestType.MinValue, TestType.MinValue) != Case_40_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_40_cns(TestType.MaxValue, TestType.MaxValue) != Case_40_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_40_cns(TestType.MaxValue, TestType.MinValue) != Case_40_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_40_cns(TestType.MinValue, TestType.MaxValue) != Case_40_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_41_cns(0, 0) != Case_41_var(0, 0)) failures++; - if (Case_41_cns(42, 42) != Case_41_var(42, 42)) failures++; - if (Case_41_cns(TestType.MinValue, TestType.MinValue) != Case_41_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_41_cns(TestType.MaxValue, TestType.MaxValue) != Case_41_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_41_cns(TestType.MaxValue, TestType.MinValue) != Case_41_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_41_cns(TestType.MinValue, TestType.MaxValue) != Case_41_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_42_cns(0, 0) != Case_42_var(0, 0)) failures++; - if (Case_42_cns(42, 42) != Case_42_var(42, 42)) failures++; - if (Case_42_cns(TestType.MinValue, TestType.MinValue) != Case_42_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_42_cns(TestType.MaxValue, TestType.MaxValue) != Case_42_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_42_cns(TestType.MaxValue, TestType.MinValue) != Case_42_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_42_cns(TestType.MinValue, TestType.MaxValue) != Case_42_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_43_cns(0, 0) != Case_43_var(0, 0)) failures++; - if (Case_43_cns(42, 42) != Case_43_var(42, 42)) failures++; - if (Case_43_cns(TestType.MinValue, TestType.MinValue) != Case_43_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_43_cns(TestType.MaxValue, TestType.MaxValue) != Case_43_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_43_cns(TestType.MaxValue, TestType.MinValue) != Case_43_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_43_cns(TestType.MinValue, TestType.MaxValue) != Case_43_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_44_cns(0, 0) != Case_44_var(0, 0)) failures++; - if (Case_44_cns(42, 42) != Case_44_var(42, 42)) failures++; - if (Case_44_cns(TestType.MinValue, TestType.MinValue) != Case_44_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_44_cns(TestType.MaxValue, TestType.MaxValue) != Case_44_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_44_cns(TestType.MaxValue, TestType.MinValue) != Case_44_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_44_cns(TestType.MinValue, TestType.MaxValue) != Case_44_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_45_cns(0, 0) != Case_45_var(0, 0)) failures++; - if (Case_45_cns(42, 42) != Case_45_var(42, 42)) failures++; - if (Case_45_cns(TestType.MinValue, TestType.MinValue) != Case_45_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_45_cns(TestType.MaxValue, TestType.MaxValue) != Case_45_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_45_cns(TestType.MaxValue, TestType.MinValue) != Case_45_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_45_cns(TestType.MinValue, TestType.MaxValue) != Case_45_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_46_cns(0, 0) != Case_46_var(0, 0)) failures++; - if (Case_46_cns(42, 42) != Case_46_var(42, 42)) failures++; - if (Case_46_cns(TestType.MinValue, TestType.MinValue) != Case_46_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_46_cns(TestType.MaxValue, TestType.MaxValue) != Case_46_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_46_cns(TestType.MaxValue, TestType.MinValue) != Case_46_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_46_cns(TestType.MinValue, TestType.MaxValue) != Case_46_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_47_cns(0, 0) != Case_47_var(0, 0)) failures++; - if (Case_47_cns(42, 42) != Case_47_var(42, 42)) failures++; - if (Case_47_cns(TestType.MinValue, TestType.MinValue) != Case_47_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_47_cns(TestType.MaxValue, TestType.MaxValue) != Case_47_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_47_cns(TestType.MaxValue, TestType.MinValue) != Case_47_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_47_cns(TestType.MinValue, TestType.MaxValue) != Case_47_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_48_cns(0, 0) != Case_48_var(0, 0)) failures++; - if (Case_48_cns(42, 42) != Case_48_var(42, 42)) failures++; - if (Case_48_cns(TestType.MinValue, TestType.MinValue) != Case_48_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_48_cns(TestType.MaxValue, TestType.MaxValue) != Case_48_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_48_cns(TestType.MaxValue, TestType.MinValue) != Case_48_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_48_cns(TestType.MinValue, TestType.MaxValue) != Case_48_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_49_cns(0, 0) != Case_49_var(0, 0)) failures++; - if (Case_49_cns(42, 42) != Case_49_var(42, 42)) failures++; - if (Case_49_cns(TestType.MinValue, TestType.MinValue) != Case_49_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_49_cns(TestType.MaxValue, TestType.MaxValue) != Case_49_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_49_cns(TestType.MaxValue, TestType.MinValue) != Case_49_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_49_cns(TestType.MinValue, TestType.MaxValue) != Case_49_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_50_cns(0, 0) != Case_50_var(0, 0)) failures++; - if (Case_50_cns(42, 42) != Case_50_var(42, 42)) failures++; - if (Case_50_cns(TestType.MinValue, TestType.MinValue) != Case_50_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_50_cns(TestType.MaxValue, TestType.MaxValue) != Case_50_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_50_cns(TestType.MaxValue, TestType.MinValue) != Case_50_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_50_cns(TestType.MinValue, TestType.MaxValue) != Case_50_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_51_cns(0, 0) != Case_51_var(0, 0)) failures++; - if (Case_51_cns(42, 42) != Case_51_var(42, 42)) failures++; - if (Case_51_cns(TestType.MinValue, TestType.MinValue) != Case_51_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_51_cns(TestType.MaxValue, TestType.MaxValue) != Case_51_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_51_cns(TestType.MaxValue, TestType.MinValue) != Case_51_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_51_cns(TestType.MinValue, TestType.MaxValue) != Case_51_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_52_cns(0, 0) != Case_52_var(0, 0)) failures++; - if (Case_52_cns(42, 42) != Case_52_var(42, 42)) failures++; - if (Case_52_cns(TestType.MinValue, TestType.MinValue) != Case_52_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_52_cns(TestType.MaxValue, TestType.MaxValue) != Case_52_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_52_cns(TestType.MaxValue, TestType.MinValue) != Case_52_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_52_cns(TestType.MinValue, TestType.MaxValue) != Case_52_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_53_cns(0, 0) != Case_53_var(0, 0)) failures++; - if (Case_53_cns(42, 42) != Case_53_var(42, 42)) failures++; - if (Case_53_cns(TestType.MinValue, TestType.MinValue) != Case_53_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_53_cns(TestType.MaxValue, TestType.MaxValue) != Case_53_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_53_cns(TestType.MaxValue, TestType.MinValue) != Case_53_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_53_cns(TestType.MinValue, TestType.MaxValue) != Case_53_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_54_cns(0, 0) != Case_54_var(0, 0)) failures++; - if (Case_54_cns(42, 42) != Case_54_var(42, 42)) failures++; - if (Case_54_cns(TestType.MinValue, TestType.MinValue) != Case_54_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_54_cns(TestType.MaxValue, TestType.MaxValue) != Case_54_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_54_cns(TestType.MaxValue, TestType.MinValue) != Case_54_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_54_cns(TestType.MinValue, TestType.MaxValue) != Case_54_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_55_cns(0, 0) != Case_55_var(0, 0)) failures++; - if (Case_55_cns(42, 42) != Case_55_var(42, 42)) failures++; - if (Case_55_cns(TestType.MinValue, TestType.MinValue) != Case_55_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_55_cns(TestType.MaxValue, TestType.MaxValue) != Case_55_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_55_cns(TestType.MaxValue, TestType.MinValue) != Case_55_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_55_cns(TestType.MinValue, TestType.MaxValue) != Case_55_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_56_cns(0, 0) != Case_56_var(0, 0)) failures++; - if (Case_56_cns(42, 42) != Case_56_var(42, 42)) failures++; - if (Case_56_cns(TestType.MinValue, TestType.MinValue) != Case_56_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_56_cns(TestType.MaxValue, TestType.MaxValue) != Case_56_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_56_cns(TestType.MaxValue, TestType.MinValue) != Case_56_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_56_cns(TestType.MinValue, TestType.MaxValue) != Case_56_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_57_cns(0, 0) != Case_57_var(0, 0)) failures++; - if (Case_57_cns(42, 42) != Case_57_var(42, 42)) failures++; - if (Case_57_cns(TestType.MinValue, TestType.MinValue) != Case_57_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_57_cns(TestType.MaxValue, TestType.MaxValue) != Case_57_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_57_cns(TestType.MaxValue, TestType.MinValue) != Case_57_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_57_cns(TestType.MinValue, TestType.MaxValue) != Case_57_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_58_cns(0, 0) != Case_58_var(0, 0)) failures++; - if (Case_58_cns(42, 42) != Case_58_var(42, 42)) failures++; - if (Case_58_cns(TestType.MinValue, TestType.MinValue) != Case_58_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_58_cns(TestType.MaxValue, TestType.MaxValue) != Case_58_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_58_cns(TestType.MaxValue, TestType.MinValue) != Case_58_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_58_cns(TestType.MinValue, TestType.MaxValue) != Case_58_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_59_cns(0, 0) != Case_59_var(0, 0)) failures++; - if (Case_59_cns(42, 42) != Case_59_var(42, 42)) failures++; - if (Case_59_cns(TestType.MinValue, TestType.MinValue) != Case_59_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_59_cns(TestType.MaxValue, TestType.MaxValue) != Case_59_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_59_cns(TestType.MaxValue, TestType.MinValue) != Case_59_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_59_cns(TestType.MinValue, TestType.MaxValue) != Case_59_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_60_cns(0, 0) != Case_60_var(0, 0)) failures++; - if (Case_60_cns(42, 42) != Case_60_var(42, 42)) failures++; - if (Case_60_cns(TestType.MinValue, TestType.MinValue) != Case_60_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_60_cns(TestType.MaxValue, TestType.MaxValue) != Case_60_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_60_cns(TestType.MaxValue, TestType.MinValue) != Case_60_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_60_cns(TestType.MinValue, TestType.MaxValue) != Case_60_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_61_cns(0, 0) != Case_61_var(0, 0)) failures++; - if (Case_61_cns(42, 42) != Case_61_var(42, 42)) failures++; - if (Case_61_cns(TestType.MinValue, TestType.MinValue) != Case_61_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_61_cns(TestType.MaxValue, TestType.MaxValue) != Case_61_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_61_cns(TestType.MaxValue, TestType.MinValue) != Case_61_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_61_cns(TestType.MinValue, TestType.MaxValue) != Case_61_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_62_cns(0, 0) != Case_62_var(0, 0)) failures++; - if (Case_62_cns(42, 42) != Case_62_var(42, 42)) failures++; - if (Case_62_cns(TestType.MinValue, TestType.MinValue) != Case_62_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_62_cns(TestType.MaxValue, TestType.MaxValue) != Case_62_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_62_cns(TestType.MaxValue, TestType.MinValue) != Case_62_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_62_cns(TestType.MinValue, TestType.MaxValue) != Case_62_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_63_cns(0, 0) != Case_63_var(0, 0)) failures++; - if (Case_63_cns(42, 42) != Case_63_var(42, 42)) failures++; - if (Case_63_cns(TestType.MinValue, TestType.MinValue) != Case_63_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_63_cns(TestType.MaxValue, TestType.MaxValue) != Case_63_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_63_cns(TestType.MaxValue, TestType.MinValue) != Case_63_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_63_cns(TestType.MinValue, TestType.MaxValue) != Case_63_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_64_cns(0, 0) != Case_64_var(0, 0)) failures++; - if (Case_64_cns(42, 42) != Case_64_var(42, 42)) failures++; - if (Case_64_cns(TestType.MinValue, TestType.MinValue) != Case_64_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_64_cns(TestType.MaxValue, TestType.MaxValue) != Case_64_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_64_cns(TestType.MaxValue, TestType.MinValue) != Case_64_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_64_cns(TestType.MinValue, TestType.MaxValue) != Case_64_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_65_cns(0, 0) != Case_65_var(0, 0)) failures++; - if (Case_65_cns(42, 42) != Case_65_var(42, 42)) failures++; - if (Case_65_cns(TestType.MinValue, TestType.MinValue) != Case_65_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_65_cns(TestType.MaxValue, TestType.MaxValue) != Case_65_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_65_cns(TestType.MaxValue, TestType.MinValue) != Case_65_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_65_cns(TestType.MinValue, TestType.MaxValue) != Case_65_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_66_cns(0, 0) != Case_66_var(0, 0)) failures++; - if (Case_66_cns(42, 42) != Case_66_var(42, 42)) failures++; - if (Case_66_cns(TestType.MinValue, TestType.MinValue) != Case_66_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_66_cns(TestType.MaxValue, TestType.MaxValue) != Case_66_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_66_cns(TestType.MaxValue, TestType.MinValue) != Case_66_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_66_cns(TestType.MinValue, TestType.MaxValue) != Case_66_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_67_cns(0, 0) != Case_67_var(0, 0)) failures++; - if (Case_67_cns(42, 42) != Case_67_var(42, 42)) failures++; - if (Case_67_cns(TestType.MinValue, TestType.MinValue) != Case_67_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_67_cns(TestType.MaxValue, TestType.MaxValue) != Case_67_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_67_cns(TestType.MaxValue, TestType.MinValue) != Case_67_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_67_cns(TestType.MinValue, TestType.MaxValue) != Case_67_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_68_cns(0, 0) != Case_68_var(0, 0)) failures++; - if (Case_68_cns(42, 42) != Case_68_var(42, 42)) failures++; - if (Case_68_cns(TestType.MinValue, TestType.MinValue) != Case_68_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_68_cns(TestType.MaxValue, TestType.MaxValue) != Case_68_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_68_cns(TestType.MaxValue, TestType.MinValue) != Case_68_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_68_cns(TestType.MinValue, TestType.MaxValue) != Case_68_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_69_cns(0, 0) != Case_69_var(0, 0)) failures++; - if (Case_69_cns(42, 42) != Case_69_var(42, 42)) failures++; - if (Case_69_cns(TestType.MinValue, TestType.MinValue) != Case_69_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_69_cns(TestType.MaxValue, TestType.MaxValue) != Case_69_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_69_cns(TestType.MaxValue, TestType.MinValue) != Case_69_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_69_cns(TestType.MinValue, TestType.MaxValue) != Case_69_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_70_cns(0, 0) != Case_70_var(0, 0)) failures++; - if (Case_70_cns(42, 42) != Case_70_var(42, 42)) failures++; - if (Case_70_cns(TestType.MinValue, TestType.MinValue) != Case_70_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_70_cns(TestType.MaxValue, TestType.MaxValue) != Case_70_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_70_cns(TestType.MaxValue, TestType.MinValue) != Case_70_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_70_cns(TestType.MinValue, TestType.MaxValue) != Case_70_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_71_cns(0, 0) != Case_71_var(0, 0)) failures++; - if (Case_71_cns(42, 42) != Case_71_var(42, 42)) failures++; - if (Case_71_cns(TestType.MinValue, TestType.MinValue) != Case_71_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_71_cns(TestType.MaxValue, TestType.MaxValue) != Case_71_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_71_cns(TestType.MaxValue, TestType.MinValue) != Case_71_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_71_cns(TestType.MinValue, TestType.MaxValue) != Case_71_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_72_cns(0, 0) != Case_72_var(0, 0)) failures++; - if (Case_72_cns(42, 42) != Case_72_var(42, 42)) failures++; - if (Case_72_cns(TestType.MinValue, TestType.MinValue) != Case_72_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_72_cns(TestType.MaxValue, TestType.MaxValue) != Case_72_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_72_cns(TestType.MaxValue, TestType.MinValue) != Case_72_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_72_cns(TestType.MinValue, TestType.MaxValue) != Case_72_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_73_cns(0, 0) != Case_73_var(0, 0)) failures++; - if (Case_73_cns(42, 42) != Case_73_var(42, 42)) failures++; - if (Case_73_cns(TestType.MinValue, TestType.MinValue) != Case_73_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_73_cns(TestType.MaxValue, TestType.MaxValue) != Case_73_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_73_cns(TestType.MaxValue, TestType.MinValue) != Case_73_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_73_cns(TestType.MinValue, TestType.MaxValue) != Case_73_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_74_cns(0, 0) != Case_74_var(0, 0)) failures++; - if (Case_74_cns(42, 42) != Case_74_var(42, 42)) failures++; - if (Case_74_cns(TestType.MinValue, TestType.MinValue) != Case_74_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_74_cns(TestType.MaxValue, TestType.MaxValue) != Case_74_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_74_cns(TestType.MaxValue, TestType.MinValue) != Case_74_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_74_cns(TestType.MinValue, TestType.MaxValue) != Case_74_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_75_cns(0, 0) != Case_75_var(0, 0)) failures++; - if (Case_75_cns(42, 42) != Case_75_var(42, 42)) failures++; - if (Case_75_cns(TestType.MinValue, TestType.MinValue) != Case_75_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_75_cns(TestType.MaxValue, TestType.MaxValue) != Case_75_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_75_cns(TestType.MaxValue, TestType.MinValue) != Case_75_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_75_cns(TestType.MinValue, TestType.MaxValue) != Case_75_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_76_cns(0, 0) != Case_76_var(0, 0)) failures++; - if (Case_76_cns(42, 42) != Case_76_var(42, 42)) failures++; - if (Case_76_cns(TestType.MinValue, TestType.MinValue) != Case_76_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_76_cns(TestType.MaxValue, TestType.MaxValue) != Case_76_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_76_cns(TestType.MaxValue, TestType.MinValue) != Case_76_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_76_cns(TestType.MinValue, TestType.MaxValue) != Case_76_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_77_cns(0, 0) != Case_77_var(0, 0)) failures++; - if (Case_77_cns(42, 42) != Case_77_var(42, 42)) failures++; - if (Case_77_cns(TestType.MinValue, TestType.MinValue) != Case_77_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_77_cns(TestType.MaxValue, TestType.MaxValue) != Case_77_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_77_cns(TestType.MaxValue, TestType.MinValue) != Case_77_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_77_cns(TestType.MinValue, TestType.MaxValue) != Case_77_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_78_cns(0, 0) != Case_78_var(0, 0)) failures++; - if (Case_78_cns(42, 42) != Case_78_var(42, 42)) failures++; - if (Case_78_cns(TestType.MinValue, TestType.MinValue) != Case_78_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_78_cns(TestType.MaxValue, TestType.MaxValue) != Case_78_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_78_cns(TestType.MaxValue, TestType.MinValue) != Case_78_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_78_cns(TestType.MinValue, TestType.MaxValue) != Case_78_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_79_cns(0, 0) != Case_79_var(0, 0)) failures++; - if (Case_79_cns(42, 42) != Case_79_var(42, 42)) failures++; - if (Case_79_cns(TestType.MinValue, TestType.MinValue) != Case_79_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_79_cns(TestType.MaxValue, TestType.MaxValue) != Case_79_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_79_cns(TestType.MaxValue, TestType.MinValue) != Case_79_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_79_cns(TestType.MinValue, TestType.MaxValue) != Case_79_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_80_cns(0, 0) != Case_80_var(0, 0)) failures++; - if (Case_80_cns(42, 42) != Case_80_var(42, 42)) failures++; - if (Case_80_cns(TestType.MinValue, TestType.MinValue) != Case_80_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_80_cns(TestType.MaxValue, TestType.MaxValue) != Case_80_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_80_cns(TestType.MaxValue, TestType.MinValue) != Case_80_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_80_cns(TestType.MinValue, TestType.MaxValue) != Case_80_var(TestType.MinValue, TestType.MaxValue)) failures++; - if (Case_81_cns(0, 0) != Case_81_var(0, 0)) failures++; - if (Case_81_cns(42, 42) != Case_81_var(42, 42)) failures++; - if (Case_81_cns(TestType.MinValue, TestType.MinValue) != Case_81_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_81_cns(TestType.MaxValue, TestType.MaxValue) != Case_81_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_81_cns(TestType.MaxValue, TestType.MinValue) != Case_81_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_81_cns(TestType.MinValue, TestType.MaxValue) != Case_81_var(TestType.MinValue, TestType.MaxValue)) failures++; - return failures; - } -} \ No newline at end of file diff --git a/src/coreclr/tests/src/JIT/opt/InstructionCombining/ConstantFolding_TestGen.tt b/src/coreclr/tests/src/JIT/opt/InstructionCombining/ConstantFolding_TestGen.tt deleted file mode 100644 index 4e04954230d90a..00000000000000 --- a/src/coreclr/tests/src/JIT/opt/InstructionCombining/ConstantFolding_TestGen.tt +++ /dev/null @@ -1,120 +0,0 @@ -<#@ template language="C#" #> -using System.Runtime.CompilerServices; -using TestType = System.Int32; - -public class ConstantFoldingTestsBase -{ - public const TestType Const1 = 8; - public const TestType Const2 = 1027; - - [MethodImpl(MethodImplOptions.NoInlining)] public TestType GetConst1() => Const1; - [MethodImpl(MethodImplOptions.NoInlining)] public TestType GetConst2() => Const2; -} - -// ((x op icon1) op icon2) -public class ConstantFoldingTests1 : ConstantFoldingTestsBase -{ -<# -int groupIndex = 0; -string[] ops = {"+", "-", "&", "|", "^", ">>", "<<", "*", "/" }; -for (int i = 0; i < ops.Length; i++) -{ - for (int j = 0; j < ops.Length; j++) - { - groupIndex++; -#> - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_<#=groupIndex#>_cns(TestType x) => ((x <#=ops[i]#> Const1) <#=ops[j]#> Const2); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_<#=groupIndex#>_var(TestType x) => ((x <#=ops[i]#> GetConst1()) <#=ops[j]#> GetConst2()); - -<# - } -} -#> - public int RunTests() - { - int failures = 0; -<# -for (int i = 1; i < groupIndex + 1; i++) -{ -#> - if (Case_<#=i#>_cns(0) != Case_<#=i#>_var(0)) failures++; - if (Case_<#=i#>_cns(42) != Case_<#=i#>_var(42)) failures++; - if (Case_<#=i#>_cns(TestType.MinValue) != Case_<#=i#>_var(TestType.MinValue)) failures++; - if (Case_<#=i#>_cns(TestType.MaxValue) != Case_<#=i#>_var(TestType.MaxValue)) failures++; -<# -} -#> - return failures; - } -} - -// x op icon1==icon2 -public class ConstantFoldingTests2 : ConstantFoldingTestsBase -{ -<# -groupIndex = 0; -for (int i = 0; i < ops.Length; i++) -{ - groupIndex++; -#> - [MethodImpl(MethodImplOptions.NoInlining)] bool Case_<#=groupIndex#>_cns(TestType x) => ((x <#=ops[i]#> Const1) == Const2); - [MethodImpl(MethodImplOptions.NoInlining)] bool Case_<#=groupIndex#>_var(TestType x) => ((x <#=ops[i]#> GetConst1()) == GetConst2()); - -<# -} -#> - public int RunTests() - { - int failures = 0; -<# -for (int i = 1; i < groupIndex + 1; i++) -{ -#> - if (Case_<#=i#>_cns(0) != Case_<#=i#>_var(0)) failures++; - if (Case_<#=i#>_cns(42) != Case_<#=i#>_var(42)) failures++; - if (Case_<#=i#>_cns(TestType.MinValue) != Case_<#=i#>_var(TestType.MinValue)) failures++; - if (Case_<#=i#>_cns(TestType.MaxValue) != Case_<#=i#>_var(TestType.MaxValue)) failures++; -<# -} -#> - return failures; - } -} - -// ((x+icon1)+(y+icon2)) -public class ConstantFoldingTests3 : ConstantFoldingTestsBase -{ -<# -groupIndex = 0; -for (int i = 0; i < ops.Length; i++) -{ - for (int j = 0; j < ops.Length; j++) - { - groupIndex++; -#> - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_<#=groupIndex#>_cns(TestType x, TestType y) => ((x <#=ops[i]#> Const1) + (y <#=ops[j]#> Const2)); - [MethodImpl(MethodImplOptions.NoInlining)] TestType Case_<#=groupIndex#>_var(TestType x, TestType y) => ((x <#=ops[i]#> GetConst1()) + (y <#=ops[j]#> GetConst2())); - -<# - } -} -#> - public int RunTests() - { - int failures = 0; -<# -for (int i = 1; i < groupIndex + 1; i++) -{ -#> - if (Case_<#=i#>_cns(0, 0) != Case_<#=i#>_var(0, 0)) failures++; - if (Case_<#=i#>_cns(42, 42) != Case_<#=i#>_var(42, 42)) failures++; - if (Case_<#=i#>_cns(TestType.MinValue, TestType.MinValue) != Case_<#=i#>_var(TestType.MinValue, TestType.MinValue)) failures++; - if (Case_<#=i#>_cns(TestType.MaxValue, TestType.MaxValue) != Case_<#=i#>_var(TestType.MaxValue, TestType.MaxValue)) failures++; - if (Case_<#=i#>_cns(TestType.MaxValue, TestType.MinValue) != Case_<#=i#>_var(TestType.MaxValue, TestType.MinValue)) failures++; - if (Case_<#=i#>_cns(TestType.MinValue, TestType.MaxValue) != Case_<#=i#>_var(TestType.MinValue, TestType.MaxValue)) failures++; -<# -} -#> - return failures; - } -} \ No newline at end of file From 16754e36800d387b15640ed70fe1f5bed17a0e63 Mon Sep 17 00:00:00 2001 From: EgorBo Date: Sun, 12 Jan 2020 01:19:40 +0300 Subject: [PATCH 5/9] Address feedback --- src/coreclr/src/jit/compiler.h | 1 + src/coreclr/src/jit/morph.cpp | 341 ++++++++++++++++++--------------- 2 files changed, 186 insertions(+), 156 deletions(-) diff --git a/src/coreclr/src/jit/compiler.h b/src/coreclr/src/jit/compiler.h index 2bc6a1756755e3..a1c3f09b1f8375 100644 --- a/src/coreclr/src/jit/compiler.h +++ b/src/coreclr/src/jit/compiler.h @@ -5437,6 +5437,7 @@ class Compiler GenTree* fgMorphBlockOperand(GenTree* tree, var_types asgType, unsigned blockWidth, bool isDest); GenTree* fgMorphCopyBlock(GenTree* tree); GenTree* fgMorphForRegisterFP(GenTree* tree); + GenTree* fgMorphCommutative(GenTreeOp* tree); GenTree* fgMorphSmpOp(GenTree* tree, MorphAddrContext* mac = nullptr); GenTree* fgMorphModToSubMulDiv(GenTreeOp* tree); GenTree* fgMorphSmpOpOptional(GenTreeOp* tree); diff --git a/src/coreclr/src/jit/morph.cpp b/src/coreclr/src/jit/morph.cpp index 00c4fbadb8b5f2..f73343784d2e93 100644 --- a/src/coreclr/src/jit/morph.cpp +++ b/src/coreclr/src/jit/morph.cpp @@ -10830,6 +10830,183 @@ GenTree* Compiler::fgMorphFieldAssignToSIMDIntrinsicSet(GenTree* tree) #endif // FEATURE_SIMD + //------------------------------------------------------------------------ + // fgMorphCommutative: Fold constants in a tree with commutative operators (|, ^, &, +) + // + // Arguments: + // tree - This node will be checked for patterns where constants can be folded. + // + // Return Value: + // A GenTree* which points to the new tree with folded constants. + // + +GenTree* Compiler::fgMorphCommutative(GenTreeOp* tree) +{ + assert(tree->OperIs(GT_OR, GT_XOR, GT_AND, GT_ADD)); + + GenTree* op1 = tree->gtGetOp1(); + GenTree* op2 = tree->gtGetOp2(); + genTreeOps oper = tree->OperGet(); + + // Fold "((x icon1) (y icon2))" to "((x y) (icon1 icon2))" + if (op1->OperIs(op2->OperGet()) && op1->OperIs(oper) && !gtIsActiveCSE_Candidate(op2) && + op1->AsOp()->gtGetOp2()->IsCnsIntOrI() && op2->AsOp()->gtGetOp2()->IsCnsIntOrI()) + { + // Don't create a byref pointer that may point outside of the ref object. + // If a GC happens, the byref won't get updated. This can happen if one + // of the int components is negative. It also requires the address generation + // be in a fully-interruptible code region. + if (!varTypeIsGC(op1->AsOp()->gtGetOp1()->TypeGet()) && + !varTypeIsGC(op2->AsOp()->gtGetOp1()->TypeGet())) + { + GenTreeIntCon* cns1 = op1->AsOp()->gtGetOp2()->AsIntCon(); + GenTreeIntCon* cns2 = op2->AsOp()->gtGetOp2()->AsIntCon(); + const ssize_t icon1 = cns1->IconValue(); + const ssize_t icon2 = cns2->IconValue(); + + if (oper == GT_ADD) + { + if (tree->gtOverflow() || op1->gtOverflow() || op2->gtOverflow()) + { + return tree; + } + cns1->SetIconValue(icon1 + icon2); + } + else if (oper == GT_OR) + { + cns1->SetIconValue(icon1 | icon2); + } + else if (oper == GT_XOR) + { + cns1->SetIconValue(icon1 ^ icon2); + } + else if (oper == GT_AND) + { + cns1->SetIconValue(icon1 & icon2); + } + else + { + noway_assert(!"unexpected operator"); + } +#ifdef _TARGET_64BIT_ + if (cns1->TypeGet() == TYP_INT) + { + // we need to properly re-sign-extend or truncate after adding two int constants above + cns1->TruncateOrSignExtend32(); + } +#endif //_TARGET_64BIT_ + + tree->gtOp2 = cns1; + DEBUG_DESTROY_NODE(cns2); + + op1->AsOp()->gtOp2 = op2->AsOp()->gtOp1; + op1->gtFlags |= (op1->AsOp()->gtOp2->gtFlags & GTF_ALL_EFFECT); + DEBUG_DESTROY_NODE(op2); + op2 = tree->gtOp2; + } + } + + if (op2->IsCnsIntOrI() && varTypeIsIntegralOrI(tree->TypeGet())) + { + // Fold "((x icon1) icon2) to (x (icon1 icon2))" + if (op1->OperIs(oper) && + !gtIsActiveCSE_Candidate(op1) && + op1->AsOp()->gtGetOp2()->IsCnsIntOrI() && + (op1->AsOp()->gtGetOp2()->OperGet() == op2->OperGet()) && + !varTypeIsGC(op1->AsOp()->gtGetOp2()->TypeGet()) && + !varTypeIsGC(op2->TypeGet())) + { + GenTreeIntConCommon* cns1 = op1->AsOp()->gtGetOp2()->AsIntConCommon(); + GenTreeIntConCommon* cns2 = op2->AsIntConCommon(); + const ssize_t icon1 = cns1->IconValue(); + const ssize_t icon2 = cns2->IconValue(); + + if (oper == GT_ADD) + { + if (tree->gtOverflow() || op1->gtOverflow()) + { + return tree; + } + cns2->SetIconValue(icon1 + icon2); + } + else if (oper == GT_OR) + { + cns2->SetIconValue(icon1 | icon2); + } + else if (oper == GT_XOR) + { + cns2->SetIconValue(icon1 ^ icon2); + } + else if (oper == GT_AND) + { + cns2->SetIconValue(icon1 & icon2); + } + else + { + noway_assert(!"unexpected operator"); + } +#ifdef _TARGET_64BIT_ + if (op2->TypeGet() == TYP_INT) + { + // we need to properly re-sign-extend or truncate after folding two int constants above + op2->AsIntCon()->TruncateOrSignExtend32(); + } +#endif //_TARGET_64BIT_ + + if (cns1->OperGet() == GT_CNS_INT) + { + op2->AsIntCon()->gtFieldSeq = + GetFieldSeqStore()->Append(cns1->AsIntCon()->gtFieldSeq, op2->AsIntCon()->gtFieldSeq); + } + DEBUG_DESTROY_NODE(cns1); + + tree->gtOp1 = op1->AsOp()->gtOp1; + DEBUG_DESTROY_NODE(op1); + op1 = tree->gtOp1; + } + + // Fold (x 0) for GT_ADD, GT_OR and GT_XOR. + if (tree->OperIs(GT_ADD, GT_OR, GT_XOR) && (op2->AsIntConCommon()->IconValue() == 0) && + !gtIsActiveCSE_Candidate(tree)) + { + + // If this addition is adding an offset to a null pointer, + // avoid the work and yield the null pointer immediately. + // Dereferencing the pointer in either case will have the + // same effect. + + if (!optValnumCSE_phase && varTypeIsGC(op2->TypeGet()) && + ((op1->gtFlags & GTF_ALL_EFFECT) == 0)) + { + op2->gtType = tree->gtType; + DEBUG_DESTROY_NODE(op1); + DEBUG_DESTROY_NODE(tree); + return op2; + } + + // Remove the addition if it won't change the tree type + // to TYP_REF. + + if (!gtIsActiveCSE_Candidate(op2) && + ((op1->TypeGet() == tree->TypeGet()) || (op1->TypeGet() != TYP_REF))) + { + if (fgGlobalMorph && (op2->OperGet() == GT_CNS_INT) && + (op2->AsIntCon()->gtFieldSeq != nullptr) && + (op2->AsIntCon()->gtFieldSeq != FieldSeqStore::NotAField())) + { + fgAddFieldSeqForZeroOffset(op1, op2->AsIntCon()->gtFieldSeq); + } + + DEBUG_DESTROY_NODE(op2); + DEBUG_DESTROY_NODE(tree); + return op1; + } + } + } + + return tree; +} + /***************************************************************************** * * Transform the given GTK_SMPOP tree for code generation. @@ -11871,7 +12048,6 @@ GenTree* Compiler::fgMorphSmpOp(GenTree* tree, MorphAddrContext* mac) */ GenTree* temp; - GenTree* cns1; GenTree* cns2; size_t ival1, ival2; GenTree* lclVarTree; @@ -12527,164 +12703,17 @@ GenTree* Compiler::fgMorphSmpOp(GenTree* tree, MorphAddrContext* mac) // See if we can fold constants for commutative operators. if (tree->OperIs(GT_OR, GT_XOR, GT_AND, GT_ADD)) { - // Fold "((x icon1) (y icon2))" to "((x y) (icon1 icon2))" - if (op1->OperIs(op2->OperGet()) && op1->OperIs(oper) && !gtIsActiveCSE_Candidate(op2) && - op1->AsOp()->gtGetOp2()->IsCnsIntOrI() && op2->AsOp()->gtGetOp2()->IsCnsIntOrI()) + tree = fgMorphCommutative(tree->AsOp()); + if (!tree->OperIsBinary()) // e.g. fgMorphCommutative optimized `x + 0` into `x` { - // Don't create a byref pointer that may point outside of the ref object. - // If a GC happens, the byref won't get updated. This can happen if one - // of the int components is negative. It also requires the address generation - // be in a fully-interruptible code region. - if (!varTypeIsGC(op1->AsOp()->gtGetOp1()->TypeGet()) && - !varTypeIsGC(op2->AsOp()->gtGetOp1()->TypeGet())) - { - cns1 = op1->AsOp()->gtGetOp2(); - cns2 = op2->AsOp()->gtGetOp2(); - ssize_t icon1 = cns1->AsIntCon()->IconValue(); - ssize_t icon2 = cns2->AsIntCon()->IconValue(); - - if (oper == GT_ADD) - { - if (op1->gtOverflow() || op2->gtOverflow()) - { - break; - } - cns1->AsIntCon()->SetIconValue(icon1 + icon2); - } - else if (oper == GT_OR) - { - cns1->AsIntCon()->SetIconValue(icon1 | icon2); - } - else if (oper == GT_XOR) - { - cns1->AsIntCon()->SetIconValue(icon1 ^ icon2); - } - else if (oper == GT_AND) - { - cns1->AsIntCon()->SetIconValue(icon1 & icon2); - } - else - { - noway_assert(!"unexpected operator"); - } -#ifdef _TARGET_64BIT_ - if (cns1->TypeGet() == TYP_INT) - { - // we need to properly re-sign-extend or truncate after adding two int constants above - cns1->AsIntCon()->TruncateOrSignExtend32(); - } -#endif //_TARGET_64BIT_ - - tree->AsOp()->gtOp2 = cns1; - DEBUG_DESTROY_NODE(cns2); - - op1->AsOp()->gtOp2 = op2->AsOp()->gtOp1; - op1->gtFlags |= (op1->AsOp()->gtOp2->gtFlags & GTF_ALL_EFFECT); - DEBUG_DESTROY_NODE(op2); - op2 = tree->AsOp()->gtOp2; - } - } - - if (op2->IsCnsIntOrI() && varTypeIsIntegralOrI(typ)) - { - // Fold "((x icon1) icon2) to (x (icon1 icon2))" - CLANG_FORMAT_COMMENT_ANCHOR; - - if (op1->OperIs(oper) && // - !gtIsActiveCSE_Candidate(op1) && // - op1->AsOp()->gtGetOp2()->IsCnsIntOrI() && // - (op1->AsOp()->gtGetOp2()->OperGet() == op2->OperGet()) && // - (op1->AsOp()->gtGetOp2()->TypeGet() != TYP_REF) && // Don't fold REFs - (op2->TypeGet() != TYP_REF)) // Don't fold REFs - { - cns1 = op1->AsOp()->gtGetOp2(); - ssize_t icon1 = cns1->AsIntConCommon()->IconValue(); - ssize_t icon2 = op2->AsIntConCommon()->IconValue(); - - if (oper == GT_ADD) - { - if (op1->gtOverflow()) - { - break; - } - op2->AsIntConCommon()->SetIconValue(icon1 + icon2); - } - else if (oper == GT_OR) - { - op2->AsIntConCommon()->SetIconValue(icon1 | icon2); - } - else if (oper == GT_XOR) - { - op2->AsIntConCommon()->SetIconValue(icon1 ^ icon2); - } - else if (oper == GT_AND) - { - op2->AsIntConCommon()->SetIconValue(icon1 & icon2); - } - else - { - noway_assert(!"unexpected operator"); - } -#ifdef _TARGET_64BIT_ - if (op2->TypeGet() == TYP_INT) - { - // we need to properly re-sign-extend or truncate after adding two int constants above - op2->AsIntCon()->TruncateOrSignExtend32(); - } -#endif //_TARGET_64BIT_ - - if (cns1->OperGet() == GT_CNS_INT) - { - op2->AsIntCon()->gtFieldSeq = - GetFieldSeqStore()->Append(cns1->AsIntCon()->gtFieldSeq, op2->AsIntCon()->gtFieldSeq); - } - DEBUG_DESTROY_NODE(cns1); - - tree->AsOp()->gtOp1 = op1->AsOp()->gtOp1; - DEBUG_DESTROY_NODE(op1); - op1 = tree->AsOp()->gtOp1; - } - - // Fold (x 0) for GT_ADD, GT_OR and GT_XOR. - if (tree->OperIs(GT_ADD, GT_OR, GT_XOR) && (op2->AsIntConCommon()->IconValue() == 0) && - !gtIsActiveCSE_Candidate(tree)) - { - - // If this addition is adding an offset to a null pointer, - // avoid the work and yield the null pointer immediately. - // Dereferencing the pointer in either case will have the - // same effect. - - if (!optValnumCSE_phase && varTypeIsGC(op2->TypeGet()) && - ((op1->gtFlags & GTF_ALL_EFFECT) == 0)) - { - op2->gtType = tree->gtType; - DEBUG_DESTROY_NODE(op1); - DEBUG_DESTROY_NODE(tree); - return op2; - } - - // Remove the addition iff it won't change the tree type - // to TYP_REF. - - if (!gtIsActiveCSE_Candidate(op2) && - ((op1->TypeGet() == tree->TypeGet()) || (op1->TypeGet() != TYP_REF))) - { - if (fgGlobalMorph && (op2->OperGet() == GT_CNS_INT) && - (op2->AsIntCon()->gtFieldSeq != nullptr) && - (op2->AsIntCon()->gtFieldSeq != FieldSeqStore::NotAField())) - { - fgAddFieldSeqForZeroOffset(op1, op2->AsIntCon()->gtFieldSeq); - } - - DEBUG_DESTROY_NODE(op2); - DEBUG_DESTROY_NODE(tree); - - return op1; - } - } + return tree; } + op1 = tree->gtGetOp1(); + op2 = tree->AsOp()->gtGetOp2(); + oper = tree->OperGet(); + typ = tree->TypeGet(); } + /* See if we can fold GT_MUL by const nodes */ else if (oper == GT_MUL && op2->IsCnsIntOrI() && !optValnumCSE_phase) { From e16225a1fe4883cf4eb26ab5e47fd1e6b729bb72 Mon Sep 17 00:00:00 2001 From: EgorBo Date: Sun, 12 Jan 2020 03:04:26 +0300 Subject: [PATCH 6/9] Add tests --- .../InstructionCombining/MorphCommutative.cs | 1043 +++++++++++++++++ .../MorphCommutative.csproj | 22 + 2 files changed, 1065 insertions(+) create mode 100644 src/coreclr/tests/src/JIT/opt/InstructionCombining/MorphCommutative.cs create mode 100644 src/coreclr/tests/src/JIT/opt/InstructionCombining/MorphCommutative.csproj diff --git a/src/coreclr/tests/src/JIT/opt/InstructionCombining/MorphCommutative.cs b/src/coreclr/tests/src/JIT/opt/InstructionCombining/MorphCommutative.cs new file mode 100644 index 00000000000000..785884c10ff993 --- /dev/null +++ b/src/coreclr/tests/src/JIT/opt/InstructionCombining/MorphCommutative.cs @@ -0,0 +1,1043 @@ +using System; +using System.Linq; +using System.Reflection; + +// Test constant folding for the following patterns: +// 1) (x cns1) (y cns2) +// 2) (x cns1) cns2 + +class Program +{ + static int Main(string[] args) + { + int errors = 0; + + int[] intTestValues = { int.MinValue, int.MinValue / 2, int.MinValue / 2 - 1, -10, 0, 1, 10, int.MaxValue / 2, int.MaxValue / 2 + 1, int.MaxValue }; + ulong[] ulongTestValues = { 0, 1, 10, ulong.MaxValue / 2 - 1, ulong.MaxValue / 2, ulong.MaxValue / 2 + 1, ulong.MaxValue - 1, ulong.MaxValue }; + + var obj1 = new TestPattern1_int(); + foreach (MethodInfo method in typeof(TestPattern1_int).GetMethods().Where(m => m.Name.EndsWith("_cns"))) + { + foreach (int testValue in intTestValues) + { + if (!(bool) method.Invoke(obj1, new object[] {testValue})) + { + errors++; + } + } + } + + var obj2 = new TestPattern1_ulong(); + foreach (MethodInfo method in typeof(TestPattern1_ulong).GetMethods().Where(m => m.Name.EndsWith("_cns"))) + { + foreach (ulong testValue in ulongTestValues) + { + if (!(bool)method.Invoke(obj2, new object[] { testValue })) + { + errors++; + } + } + } + + var obj3 = new TestPattern2_int(); + foreach (MethodInfo method in typeof(TestPattern2_int).GetMethods().Where(m => m.Name.EndsWith("_cns"))) + { + foreach (int testValue1 in intTestValues) + { + foreach (int testValue2 in intTestValues) + { + if (!(bool)method.Invoke(obj3, new object[] { testValue1, testValue2 })) + { + errors++; + } + } + } + } + + + var obj4 = new TestPattern2_ulong(); + foreach (MethodInfo method in typeof(TestPattern2_ulong).GetMethods().Where(m => m.Name.EndsWith("_cns"))) + { + foreach (ulong testValue1 in ulongTestValues) + { + foreach (ulong testValue2 in ulongTestValues) + { + if (!(bool)method.Invoke(obj4, new object[] { testValue1, testValue2 })) + { + errors++; + } + } + } + } + + new OverflowTests().Test(); + + return 100 + errors; + } +} + +// Test constant folding for +// "(x cns1) cns2" pattern +public class TestPattern1_int +{ + public bool Test1_cns(int x) => ((x + 3) + 5) == Test1_var(x); + public int Test1_var(int x) => (x + ToVar(3)) + ToVar(5); + + public bool Test2_cns(int x) => ((x + 3) - 5) == Test2_var(x); + public int Test2_var(int x) => (x + ToVar(3)) - ToVar(5); + + public bool Test3_cns(int x) => ((x + 3) | 5) == Test3_var(x); + public int Test3_var(int x) => (x + ToVar(3)) | ToVar(5); + + public bool Test4_cns(int x) => ((x + 3) & 5) == Test4_var(x); + public int Test4_var(int x) => (x + ToVar(3)) & ToVar(5); + + public bool Test5_cns(int x) => ((x + 3) ^ 5) == Test5_var(x); + public int Test5_var(int x) => (x + ToVar(3)) ^ ToVar(5); + + public bool Test6_cns(int x) => ((x - 3) + 5) == Test6_var(x); + public int Test6_var(int x) => (x - ToVar(3)) + ToVar(5); + + public bool Test7_cns(int x) => ((x - 3) - 5) == Test7_var(x); + public int Test7_var(int x) => (x - ToVar(3)) - ToVar(5); + + public bool Test8_cns(int x) => ((x - 3) | 5) == Test8_var(x); + public int Test8_var(int x) => (x - ToVar(3)) | ToVar(5); + + public bool Test9_cns(int x) => ((x - 3) & 5) == Test9_var(x); + public int Test9_var(int x) => (x - ToVar(3)) & ToVar(5); + + public bool Test10_cns(int x) => ((x - 3) ^ 5) == Test10_var(x); + public int Test10_var(int x) => (x - ToVar(3)) ^ ToVar(5); + + public bool Test11_cns(int x) => ((x | 3) + 5) == Test11_var(x); + public int Test11_var(int x) => (x | ToVar(3)) + ToVar(5); + + public bool Test12_cns(int x) => ((x | 3) - 5) == Test12_var(x); + public int Test12_var(int x) => (x | ToVar(3)) - ToVar(5); + + public bool Test13_cns(int x) => ((x | 3) | 5) == Test13_var(x); + public int Test13_var(int x) => (x | ToVar(3)) | ToVar(5); + + public bool Test14_cns(int x) => ((x | 3) & 5) == Test14_var(x); + public int Test14_var(int x) => (x | ToVar(3)) & ToVar(5); + + public bool Test15_cns(int x) => ((x | 3) ^ 5) == Test15_var(x); + public int Test15_var(int x) => (x | ToVar(3)) ^ ToVar(5); + + public bool Test16_cns(int x) => ((x & 3) + 5) == Test16_var(x); + public int Test16_var(int x) => (x & ToVar(3)) + ToVar(5); + + public bool Test17_cns(int x) => ((x & 3) - 5) == Test17_var(x); + public int Test17_var(int x) => (x & ToVar(3)) - ToVar(5); + + public bool Test18_cns(int x) => ((x & 3) | 5) == Test18_var(x); + public int Test18_var(int x) => (x & ToVar(3)) | ToVar(5); + + public bool Test19_cns(int x) => ((x & 3) & 5) == Test19_var(x); + public int Test19_var(int x) => (x & ToVar(3)) & ToVar(5); + + public bool Test20_cns(int x) => ((x & 3) ^ 5) == Test20_var(x); + public int Test20_var(int x) => (x & ToVar(3)) ^ ToVar(5); + + public bool Test21_cns(int x) => ((x ^ 3) + 5) == Test21_var(x); + public int Test21_var(int x) => (x ^ ToVar(3)) + ToVar(5); + + public bool Test22_cns(int x) => ((x ^ 3) - 5) == Test22_var(x); + public int Test22_var(int x) => (x ^ ToVar(3)) - ToVar(5); + + public bool Test23_cns(int x) => ((x ^ 3) | 5) == Test23_var(x); + public int Test23_var(int x) => (x ^ ToVar(3)) | ToVar(5); + + public bool Test24_cns(int x) => ((x ^ 3) & 5) == Test24_var(x); + public int Test24_var(int x) => (x ^ ToVar(3)) & ToVar(5); + + public bool Test25_cns(int x) => ((x ^ 3) ^ 5) == Test25_var(x); + public int Test25_var(int x) => (x ^ ToVar(3)) ^ ToVar(5); + + public static T ToVar(T v) => v; +} + +// Test constant folding for +// "(x cns1) cns2" pattern +public class TestPattern1_ulong +{ + public bool Test1_cns(ulong x) => ((x + 49UL) + 1024UL) == Test1_var(x); + public ulong Test1_var(ulong x) => (x + ToVar(49UL)) + ToVar(1024UL); + + public bool Test2_cns(ulong x) => ((x + 49UL) - 1024UL) == Test2_var(x); + public ulong Test2_var(ulong x) => (x + ToVar(49UL)) - ToVar(1024UL); + + public bool Test3_cns(ulong x) => ((x + 49UL) | 1024UL) == Test3_var(x); + public ulong Test3_var(ulong x) => (x + ToVar(49UL)) | ToVar(1024UL); + + public bool Test4_cns(ulong x) => ((x + 49UL) & 1024UL) == Test4_var(x); + public ulong Test4_var(ulong x) => (x + ToVar(49UL)) & ToVar(1024UL); + + public bool Test5_cns(ulong x) => ((x + 49UL) ^ 1024UL) == Test5_var(x); + public ulong Test5_var(ulong x) => (x + ToVar(49UL)) ^ ToVar(1024UL); + + public bool Test6_cns(ulong x) => ((x - 49UL) + 1024UL) == Test6_var(x); + public ulong Test6_var(ulong x) => (x - ToVar(49UL)) + ToVar(1024UL); + + public bool Test7_cns(ulong x) => ((x - 49UL) - 1024UL) == Test7_var(x); + public ulong Test7_var(ulong x) => (x - ToVar(49UL)) - ToVar(1024UL); + + public bool Test8_cns(ulong x) => ((x - 49UL) | 1024UL) == Test8_var(x); + public ulong Test8_var(ulong x) => (x - ToVar(49UL)) | ToVar(1024UL); + + public bool Test9_cns(ulong x) => ((x - 49UL) & 1024UL) == Test9_var(x); + public ulong Test9_var(ulong x) => (x - ToVar(49UL)) & ToVar(1024UL); + + public bool Test10_cns(ulong x) => ((x - 49UL) ^ 1024UL) == Test10_var(x); + public ulong Test10_var(ulong x) => (x - ToVar(49UL)) ^ ToVar(1024UL); + + public bool Test11_cns(ulong x) => ((x | 49UL) + 1024UL) == Test11_var(x); + public ulong Test11_var(ulong x) => (x | ToVar(49UL)) + ToVar(1024UL); + + public bool Test12_cns(ulong x) => ((x | 49UL) - 1024UL) == Test12_var(x); + public ulong Test12_var(ulong x) => (x | ToVar(49UL)) - ToVar(1024UL); + + public bool Test13_cns(ulong x) => ((x | 49UL) | 1024UL) == Test13_var(x); + public ulong Test13_var(ulong x) => (x | ToVar(49UL)) | ToVar(1024UL); + + public bool Test14_cns(ulong x) => ((x | 49UL) & 1024UL) == Test14_var(x); + public ulong Test14_var(ulong x) => (x | ToVar(49UL)) & ToVar(1024UL); + + public bool Test15_cns(ulong x) => ((x | 49UL) ^ 1024UL) == Test15_var(x); + public ulong Test15_var(ulong x) => (x | ToVar(49UL)) ^ ToVar(1024UL); + + public bool Test16_cns(ulong x) => ((x & 49UL) + 1024UL) == Test16_var(x); + public ulong Test16_var(ulong x) => (x & ToVar(49UL)) + ToVar(1024UL); + + public bool Test17_cns(ulong x) => ((x & 49UL) - 1024UL) == Test17_var(x); + public ulong Test17_var(ulong x) => (x & ToVar(49UL)) - ToVar(1024UL); + + public bool Test18_cns(ulong x) => ((x & 49UL) | 1024UL) == Test18_var(x); + public ulong Test18_var(ulong x) => (x & ToVar(49UL)) | ToVar(1024UL); + + public bool Test19_cns(ulong x) => ((x & 49UL) & 1024UL) == Test19_var(x); + public ulong Test19_var(ulong x) => (x & ToVar(49UL)) & ToVar(1024UL); + + public bool Test20_cns(ulong x) => ((x & 49UL) ^ 1024UL) == Test20_var(x); + public ulong Test20_var(ulong x) => (x & ToVar(49UL)) ^ ToVar(1024UL); + + public bool Test21_cns(ulong x) => ((x ^ 49UL) + 1024UL) == Test21_var(x); + public ulong Test21_var(ulong x) => (x ^ ToVar(49UL)) + ToVar(1024UL); + + public bool Test22_cns(ulong x) => ((x ^ 49UL) - 1024UL) == Test22_var(x); + public ulong Test22_var(ulong x) => (x ^ ToVar(49UL)) - ToVar(1024UL); + + public bool Test23_cns(ulong x) => ((x ^ 49UL) | 1024UL) == Test23_var(x); + public ulong Test23_var(ulong x) => (x ^ ToVar(49UL)) | ToVar(1024UL); + + public bool Test24_cns(ulong x) => ((x ^ 49UL) & 1024UL) == Test24_var(x); + public ulong Test24_var(ulong x) => (x ^ ToVar(49UL)) & ToVar(1024UL); + + public bool Test25_cns(ulong x) => ((x ^ 49UL) ^ 1024UL) == Test25_var(x); + public ulong Test25_var(ulong x) => (x ^ ToVar(49UL)) ^ ToVar(1024UL); + + public static T ToVar(T v) => v; +} + +// Test constant folding for +// "(x cns1) (y cns2)" pattern +public class TestPattern2_int +{ + public bool Test1_cns(int x, int y) => ((x + 3) + (y + 5)) == Test1_var(x, y); + public int Test1_var(int x, int y) => (x + ToVar(3)) + (y + ToVar(5)); + + public bool Test2_cns(int x, int y) => ((x + 3) + (y - 5)) == Test2_var(x, y); + public int Test2_var(int x, int y) => (x + ToVar(3)) + (y - ToVar(5)); + + public bool Test3_cns(int x, int y) => ((x + 3) + (y | 5)) == Test3_var(x, y); + public int Test3_var(int x, int y) => (x + ToVar(3)) + (y | ToVar(5)); + + public bool Test4_cns(int x, int y) => ((x + 3) + (y & 5)) == Test4_var(x, y); + public int Test4_var(int x, int y) => (x + ToVar(3)) + (y & ToVar(5)); + + public bool Test5_cns(int x, int y) => ((x + 3) + (y ^ 5)) == Test5_var(x, y); + public int Test5_var(int x, int y) => (x + ToVar(3)) + (y ^ ToVar(5)); + + public bool Test6_cns(int x, int y) => ((x + 3) - (y + 5)) == Test6_var(x, y); + public int Test6_var(int x, int y) => (x + ToVar(3)) - (y + ToVar(5)); + + public bool Test7_cns(int x, int y) => ((x + 3) - (y - 5)) == Test7_var(x, y); + public int Test7_var(int x, int y) => (x + ToVar(3)) - (y - ToVar(5)); + + public bool Test8_cns(int x, int y) => ((x + 3) - (y | 5)) == Test8_var(x, y); + public int Test8_var(int x, int y) => (x + ToVar(3)) - (y | ToVar(5)); + + public bool Test9_cns(int x, int y) => ((x + 3) - (y & 5)) == Test9_var(x, y); + public int Test9_var(int x, int y) => (x + ToVar(3)) - (y & ToVar(5)); + + public bool Test10_cns(int x, int y) => ((x + 3) - (y ^ 5)) == Test10_var(x, y); + public int Test10_var(int x, int y) => (x + ToVar(3)) - (y ^ ToVar(5)); + + public bool Test11_cns(int x, int y) => ((x + 3) | (y + 5)) == Test11_var(x, y); + public int Test11_var(int x, int y) => (x + ToVar(3)) | (y + ToVar(5)); + + public bool Test12_cns(int x, int y) => ((x + 3) | (y - 5)) == Test12_var(x, y); + public int Test12_var(int x, int y) => (x + ToVar(3)) | (y - ToVar(5)); + + public bool Test13_cns(int x, int y) => ((x + 3) | (y | 5)) == Test13_var(x, y); + public int Test13_var(int x, int y) => (x + ToVar(3)) | (y | ToVar(5)); + + public bool Test14_cns(int x, int y) => ((x + 3) | (y & 5)) == Test14_var(x, y); + public int Test14_var(int x, int y) => (x + ToVar(3)) | (y & ToVar(5)); + + public bool Test15_cns(int x, int y) => ((x + 3) | (y ^ 5)) == Test15_var(x, y); + public int Test15_var(int x, int y) => (x + ToVar(3)) | (y ^ ToVar(5)); + + public bool Test16_cns(int x, int y) => ((x + 3) & (y + 5)) == Test16_var(x, y); + public int Test16_var(int x, int y) => (x + ToVar(3)) & (y + ToVar(5)); + + public bool Test17_cns(int x, int y) => ((x + 3) & (y - 5)) == Test17_var(x, y); + public int Test17_var(int x, int y) => (x + ToVar(3)) & (y - ToVar(5)); + + public bool Test18_cns(int x, int y) => ((x + 3) & (y | 5)) == Test18_var(x, y); + public int Test18_var(int x, int y) => (x + ToVar(3)) & (y | ToVar(5)); + + public bool Test19_cns(int x, int y) => ((x + 3) & (y & 5)) == Test19_var(x, y); + public int Test19_var(int x, int y) => (x + ToVar(3)) & (y & ToVar(5)); + + public bool Test20_cns(int x, int y) => ((x + 3) & (y ^ 5)) == Test20_var(x, y); + public int Test20_var(int x, int y) => (x + ToVar(3)) & (y ^ ToVar(5)); + + public bool Test21_cns(int x, int y) => ((x + 3) ^ (y + 5)) == Test21_var(x, y); + public int Test21_var(int x, int y) => (x + ToVar(3)) ^ (y + ToVar(5)); + + public bool Test22_cns(int x, int y) => ((x + 3) ^ (y - 5)) == Test22_var(x, y); + public int Test22_var(int x, int y) => (x + ToVar(3)) ^ (y - ToVar(5)); + + public bool Test23_cns(int x, int y) => ((x + 3) ^ (y | 5)) == Test23_var(x, y); + public int Test23_var(int x, int y) => (x + ToVar(3)) ^ (y | ToVar(5)); + + public bool Test24_cns(int x, int y) => ((x + 3) ^ (y & 5)) == Test24_var(x, y); + public int Test24_var(int x, int y) => (x + ToVar(3)) ^ (y & ToVar(5)); + + public bool Test25_cns(int x, int y) => ((x + 3) ^ (y ^ 5)) == Test25_var(x, y); + public int Test25_var(int x, int y) => (x + ToVar(3)) ^ (y ^ ToVar(5)); + + public bool Test26_cns(int x, int y) => ((x - 3) + (y + 5)) == Test26_var(x, y); + public int Test26_var(int x, int y) => (x - ToVar(3)) + (y + ToVar(5)); + + public bool Test27_cns(int x, int y) => ((x - 3) + (y - 5)) == Test27_var(x, y); + public int Test27_var(int x, int y) => (x - ToVar(3)) + (y - ToVar(5)); + + public bool Test28_cns(int x, int y) => ((x - 3) + (y | 5)) == Test28_var(x, y); + public int Test28_var(int x, int y) => (x - ToVar(3)) + (y | ToVar(5)); + + public bool Test29_cns(int x, int y) => ((x - 3) + (y & 5)) == Test29_var(x, y); + public int Test29_var(int x, int y) => (x - ToVar(3)) + (y & ToVar(5)); + + public bool Test30_cns(int x, int y) => ((x - 3) + (y ^ 5)) == Test30_var(x, y); + public int Test30_var(int x, int y) => (x - ToVar(3)) + (y ^ ToVar(5)); + + public bool Test31_cns(int x, int y) => ((x - 3) - (y + 5)) == Test31_var(x, y); + public int Test31_var(int x, int y) => (x - ToVar(3)) - (y + ToVar(5)); + + public bool Test32_cns(int x, int y) => ((x - 3) - (y - 5)) == Test32_var(x, y); + public int Test32_var(int x, int y) => (x - ToVar(3)) - (y - ToVar(5)); + + public bool Test33_cns(int x, int y) => ((x - 3) - (y | 5)) == Test33_var(x, y); + public int Test33_var(int x, int y) => (x - ToVar(3)) - (y | ToVar(5)); + + public bool Test34_cns(int x, int y) => ((x - 3) - (y & 5)) == Test34_var(x, y); + public int Test34_var(int x, int y) => (x - ToVar(3)) - (y & ToVar(5)); + + public bool Test35_cns(int x, int y) => ((x - 3) - (y ^ 5)) == Test35_var(x, y); + public int Test35_var(int x, int y) => (x - ToVar(3)) - (y ^ ToVar(5)); + + public bool Test36_cns(int x, int y) => ((x - 3) | (y + 5)) == Test36_var(x, y); + public int Test36_var(int x, int y) => (x - ToVar(3)) | (y + ToVar(5)); + + public bool Test37_cns(int x, int y) => ((x - 3) | (y - 5)) == Test37_var(x, y); + public int Test37_var(int x, int y) => (x - ToVar(3)) | (y - ToVar(5)); + + public bool Test38_cns(int x, int y) => ((x - 3) | (y | 5)) == Test38_var(x, y); + public int Test38_var(int x, int y) => (x - ToVar(3)) | (y | ToVar(5)); + + public bool Test39_cns(int x, int y) => ((x - 3) | (y & 5)) == Test39_var(x, y); + public int Test39_var(int x, int y) => (x - ToVar(3)) | (y & ToVar(5)); + + public bool Test40_cns(int x, int y) => ((x - 3) | (y ^ 5)) == Test40_var(x, y); + public int Test40_var(int x, int y) => (x - ToVar(3)) | (y ^ ToVar(5)); + + public bool Test41_cns(int x, int y) => ((x - 3) & (y + 5)) == Test41_var(x, y); + public int Test41_var(int x, int y) => (x - ToVar(3)) & (y + ToVar(5)); + + public bool Test42_cns(int x, int y) => ((x - 3) & (y - 5)) == Test42_var(x, y); + public int Test42_var(int x, int y) => (x - ToVar(3)) & (y - ToVar(5)); + + public bool Test43_cns(int x, int y) => ((x - 3) & (y | 5)) == Test43_var(x, y); + public int Test43_var(int x, int y) => (x - ToVar(3)) & (y | ToVar(5)); + + public bool Test44_cns(int x, int y) => ((x - 3) & (y & 5)) == Test44_var(x, y); + public int Test44_var(int x, int y) => (x - ToVar(3)) & (y & ToVar(5)); + + public bool Test45_cns(int x, int y) => ((x - 3) & (y ^ 5)) == Test45_var(x, y); + public int Test45_var(int x, int y) => (x - ToVar(3)) & (y ^ ToVar(5)); + + public bool Test46_cns(int x, int y) => ((x - 3) ^ (y + 5)) == Test46_var(x, y); + public int Test46_var(int x, int y) => (x - ToVar(3)) ^ (y + ToVar(5)); + + public bool Test47_cns(int x, int y) => ((x - 3) ^ (y - 5)) == Test47_var(x, y); + public int Test47_var(int x, int y) => (x - ToVar(3)) ^ (y - ToVar(5)); + + public bool Test48_cns(int x, int y) => ((x - 3) ^ (y | 5)) == Test48_var(x, y); + public int Test48_var(int x, int y) => (x - ToVar(3)) ^ (y | ToVar(5)); + + public bool Test49_cns(int x, int y) => ((x - 3) ^ (y & 5)) == Test49_var(x, y); + public int Test49_var(int x, int y) => (x - ToVar(3)) ^ (y & ToVar(5)); + + public bool Test50_cns(int x, int y) => ((x - 3) ^ (y ^ 5)) == Test50_var(x, y); + public int Test50_var(int x, int y) => (x - ToVar(3)) ^ (y ^ ToVar(5)); + + public bool Test51_cns(int x, int y) => ((x | 3) + (y + 5)) == Test51_var(x, y); + public int Test51_var(int x, int y) => (x | ToVar(3)) + (y + ToVar(5)); + + public bool Test52_cns(int x, int y) => ((x | 3) + (y - 5)) == Test52_var(x, y); + public int Test52_var(int x, int y) => (x | ToVar(3)) + (y - ToVar(5)); + + public bool Test53_cns(int x, int y) => ((x | 3) + (y | 5)) == Test53_var(x, y); + public int Test53_var(int x, int y) => (x | ToVar(3)) + (y | ToVar(5)); + + public bool Test54_cns(int x, int y) => ((x | 3) + (y & 5)) == Test54_var(x, y); + public int Test54_var(int x, int y) => (x | ToVar(3)) + (y & ToVar(5)); + + public bool Test55_cns(int x, int y) => ((x | 3) + (y ^ 5)) == Test55_var(x, y); + public int Test55_var(int x, int y) => (x | ToVar(3)) + (y ^ ToVar(5)); + + public bool Test56_cns(int x, int y) => ((x | 3) - (y + 5)) == Test56_var(x, y); + public int Test56_var(int x, int y) => (x | ToVar(3)) - (y + ToVar(5)); + + public bool Test57_cns(int x, int y) => ((x | 3) - (y - 5)) == Test57_var(x, y); + public int Test57_var(int x, int y) => (x | ToVar(3)) - (y - ToVar(5)); + + public bool Test58_cns(int x, int y) => ((x | 3) - (y | 5)) == Test58_var(x, y); + public int Test58_var(int x, int y) => (x | ToVar(3)) - (y | ToVar(5)); + + public bool Test59_cns(int x, int y) => ((x | 3) - (y & 5)) == Test59_var(x, y); + public int Test59_var(int x, int y) => (x | ToVar(3)) - (y & ToVar(5)); + + public bool Test60_cns(int x, int y) => ((x | 3) - (y ^ 5)) == Test60_var(x, y); + public int Test60_var(int x, int y) => (x | ToVar(3)) - (y ^ ToVar(5)); + + public bool Test61_cns(int x, int y) => ((x | 3) | (y + 5)) == Test61_var(x, y); + public int Test61_var(int x, int y) => (x | ToVar(3)) | (y + ToVar(5)); + + public bool Test62_cns(int x, int y) => ((x | 3) | (y - 5)) == Test62_var(x, y); + public int Test62_var(int x, int y) => (x | ToVar(3)) | (y - ToVar(5)); + + public bool Test63_cns(int x, int y) => ((x | 3) | (y | 5)) == Test63_var(x, y); + public int Test63_var(int x, int y) => (x | ToVar(3)) | (y | ToVar(5)); + + public bool Test64_cns(int x, int y) => ((x | 3) | (y & 5)) == Test64_var(x, y); + public int Test64_var(int x, int y) => (x | ToVar(3)) | (y & ToVar(5)); + + public bool Test65_cns(int x, int y) => ((x | 3) | (y ^ 5)) == Test65_var(x, y); + public int Test65_var(int x, int y) => (x | ToVar(3)) | (y ^ ToVar(5)); + + public bool Test66_cns(int x, int y) => ((x | 3) & (y + 5)) == Test66_var(x, y); + public int Test66_var(int x, int y) => (x | ToVar(3)) & (y + ToVar(5)); + + public bool Test67_cns(int x, int y) => ((x | 3) & (y - 5)) == Test67_var(x, y); + public int Test67_var(int x, int y) => (x | ToVar(3)) & (y - ToVar(5)); + + public bool Test68_cns(int x, int y) => ((x | 3) & (y | 5)) == Test68_var(x, y); + public int Test68_var(int x, int y) => (x | ToVar(3)) & (y | ToVar(5)); + + public bool Test69_cns(int x, int y) => ((x | 3) & (y & 5)) == Test69_var(x, y); + public int Test69_var(int x, int y) => (x | ToVar(3)) & (y & ToVar(5)); + + public bool Test70_cns(int x, int y) => ((x | 3) & (y ^ 5)) == Test70_var(x, y); + public int Test70_var(int x, int y) => (x | ToVar(3)) & (y ^ ToVar(5)); + + public bool Test71_cns(int x, int y) => ((x | 3) ^ (y + 5)) == Test71_var(x, y); + public int Test71_var(int x, int y) => (x | ToVar(3)) ^ (y + ToVar(5)); + + public bool Test72_cns(int x, int y) => ((x | 3) ^ (y - 5)) == Test72_var(x, y); + public int Test72_var(int x, int y) => (x | ToVar(3)) ^ (y - ToVar(5)); + + public bool Test73_cns(int x, int y) => ((x | 3) ^ (y | 5)) == Test73_var(x, y); + public int Test73_var(int x, int y) => (x | ToVar(3)) ^ (y | ToVar(5)); + + public bool Test74_cns(int x, int y) => ((x | 3) ^ (y & 5)) == Test74_var(x, y); + public int Test74_var(int x, int y) => (x | ToVar(3)) ^ (y & ToVar(5)); + + public bool Test75_cns(int x, int y) => ((x | 3) ^ (y ^ 5)) == Test75_var(x, y); + public int Test75_var(int x, int y) => (x | ToVar(3)) ^ (y ^ ToVar(5)); + + public bool Test76_cns(int x, int y) => ((x & 3) + (y + 5)) == Test76_var(x, y); + public int Test76_var(int x, int y) => (x & ToVar(3)) + (y + ToVar(5)); + + public bool Test77_cns(int x, int y) => ((x & 3) + (y - 5)) == Test77_var(x, y); + public int Test77_var(int x, int y) => (x & ToVar(3)) + (y - ToVar(5)); + + public bool Test78_cns(int x, int y) => ((x & 3) + (y | 5)) == Test78_var(x, y); + public int Test78_var(int x, int y) => (x & ToVar(3)) + (y | ToVar(5)); + + public bool Test79_cns(int x, int y) => ((x & 3) + (y & 5)) == Test79_var(x, y); + public int Test79_var(int x, int y) => (x & ToVar(3)) + (y & ToVar(5)); + + public bool Test80_cns(int x, int y) => ((x & 3) + (y ^ 5)) == Test80_var(x, y); + public int Test80_var(int x, int y) => (x & ToVar(3)) + (y ^ ToVar(5)); + + public bool Test81_cns(int x, int y) => ((x & 3) - (y + 5)) == Test81_var(x, y); + public int Test81_var(int x, int y) => (x & ToVar(3)) - (y + ToVar(5)); + + public bool Test82_cns(int x, int y) => ((x & 3) - (y - 5)) == Test82_var(x, y); + public int Test82_var(int x, int y) => (x & ToVar(3)) - (y - ToVar(5)); + + public bool Test83_cns(int x, int y) => ((x & 3) - (y | 5)) == Test83_var(x, y); + public int Test83_var(int x, int y) => (x & ToVar(3)) - (y | ToVar(5)); + + public bool Test84_cns(int x, int y) => ((x & 3) - (y & 5)) == Test84_var(x, y); + public int Test84_var(int x, int y) => (x & ToVar(3)) - (y & ToVar(5)); + + public bool Test85_cns(int x, int y) => ((x & 3) - (y ^ 5)) == Test85_var(x, y); + public int Test85_var(int x, int y) => (x & ToVar(3)) - (y ^ ToVar(5)); + + public bool Test86_cns(int x, int y) => ((x & 3) | (y + 5)) == Test86_var(x, y); + public int Test86_var(int x, int y) => (x & ToVar(3)) | (y + ToVar(5)); + + public bool Test87_cns(int x, int y) => ((x & 3) | (y - 5)) == Test87_var(x, y); + public int Test87_var(int x, int y) => (x & ToVar(3)) | (y - ToVar(5)); + + public bool Test88_cns(int x, int y) => ((x & 3) | (y | 5)) == Test88_var(x, y); + public int Test88_var(int x, int y) => (x & ToVar(3)) | (y | ToVar(5)); + + public bool Test89_cns(int x, int y) => ((x & 3) | (y & 5)) == Test89_var(x, y); + public int Test89_var(int x, int y) => (x & ToVar(3)) | (y & ToVar(5)); + + public bool Test90_cns(int x, int y) => ((x & 3) | (y ^ 5)) == Test90_var(x, y); + public int Test90_var(int x, int y) => (x & ToVar(3)) | (y ^ ToVar(5)); + + public bool Test91_cns(int x, int y) => ((x & 3) & (y + 5)) == Test91_var(x, y); + public int Test91_var(int x, int y) => (x & ToVar(3)) & (y + ToVar(5)); + + public bool Test92_cns(int x, int y) => ((x & 3) & (y - 5)) == Test92_var(x, y); + public int Test92_var(int x, int y) => (x & ToVar(3)) & (y - ToVar(5)); + + public bool Test93_cns(int x, int y) => ((x & 3) & (y | 5)) == Test93_var(x, y); + public int Test93_var(int x, int y) => (x & ToVar(3)) & (y | ToVar(5)); + + public bool Test94_cns(int x, int y) => ((x & 3) & (y & 5)) == Test94_var(x, y); + public int Test94_var(int x, int y) => (x & ToVar(3)) & (y & ToVar(5)); + + public bool Test95_cns(int x, int y) => ((x & 3) & (y ^ 5)) == Test95_var(x, y); + public int Test95_var(int x, int y) => (x & ToVar(3)) & (y ^ ToVar(5)); + + public bool Test96_cns(int x, int y) => ((x & 3) ^ (y + 5)) == Test96_var(x, y); + public int Test96_var(int x, int y) => (x & ToVar(3)) ^ (y + ToVar(5)); + + public bool Test97_cns(int x, int y) => ((x & 3) ^ (y - 5)) == Test97_var(x, y); + public int Test97_var(int x, int y) => (x & ToVar(3)) ^ (y - ToVar(5)); + + public bool Test98_cns(int x, int y) => ((x & 3) ^ (y | 5)) == Test98_var(x, y); + public int Test98_var(int x, int y) => (x & ToVar(3)) ^ (y | ToVar(5)); + + public bool Test99_cns(int x, int y) => ((x & 3) ^ (y & 5)) == Test99_var(x, y); + public int Test99_var(int x, int y) => (x & ToVar(3)) ^ (y & ToVar(5)); + + public bool Test100_cns(int x, int y) => ((x & 3) ^ (y ^ 5)) == Test100_var(x, y); + public int Test100_var(int x, int y) => (x & ToVar(3)) ^ (y ^ ToVar(5)); + + public bool Test101_cns(int x, int y) => ((x ^ 3) + (y + 5)) == Test101_var(x, y); + public int Test101_var(int x, int y) => (x ^ ToVar(3)) + (y + ToVar(5)); + + public bool Test102_cns(int x, int y) => ((x ^ 3) + (y - 5)) == Test102_var(x, y); + public int Test102_var(int x, int y) => (x ^ ToVar(3)) + (y - ToVar(5)); + + public bool Test103_cns(int x, int y) => ((x ^ 3) + (y | 5)) == Test103_var(x, y); + public int Test103_var(int x, int y) => (x ^ ToVar(3)) + (y | ToVar(5)); + + public bool Test104_cns(int x, int y) => ((x ^ 3) + (y & 5)) == Test104_var(x, y); + public int Test104_var(int x, int y) => (x ^ ToVar(3)) + (y & ToVar(5)); + + public bool Test105_cns(int x, int y) => ((x ^ 3) + (y ^ 5)) == Test105_var(x, y); + public int Test105_var(int x, int y) => (x ^ ToVar(3)) + (y ^ ToVar(5)); + + public bool Test106_cns(int x, int y) => ((x ^ 3) - (y + 5)) == Test106_var(x, y); + public int Test106_var(int x, int y) => (x ^ ToVar(3)) - (y + ToVar(5)); + + public bool Test107_cns(int x, int y) => ((x ^ 3) - (y - 5)) == Test107_var(x, y); + public int Test107_var(int x, int y) => (x ^ ToVar(3)) - (y - ToVar(5)); + + public bool Test108_cns(int x, int y) => ((x ^ 3) - (y | 5)) == Test108_var(x, y); + public int Test108_var(int x, int y) => (x ^ ToVar(3)) - (y | ToVar(5)); + + public bool Test109_cns(int x, int y) => ((x ^ 3) - (y & 5)) == Test109_var(x, y); + public int Test109_var(int x, int y) => (x ^ ToVar(3)) - (y & ToVar(5)); + + public bool Test110_cns(int x, int y) => ((x ^ 3) - (y ^ 5)) == Test110_var(x, y); + public int Test110_var(int x, int y) => (x ^ ToVar(3)) - (y ^ ToVar(5)); + + public bool Test111_cns(int x, int y) => ((x ^ 3) | (y + 5)) == Test111_var(x, y); + public int Test111_var(int x, int y) => (x ^ ToVar(3)) | (y + ToVar(5)); + + public bool Test112_cns(int x, int y) => ((x ^ 3) | (y - 5)) == Test112_var(x, y); + public int Test112_var(int x, int y) => (x ^ ToVar(3)) | (y - ToVar(5)); + + public bool Test113_cns(int x, int y) => ((x ^ 3) | (y | 5)) == Test113_var(x, y); + public int Test113_var(int x, int y) => (x ^ ToVar(3)) | (y | ToVar(5)); + + public bool Test114_cns(int x, int y) => ((x ^ 3) | (y & 5)) == Test114_var(x, y); + public int Test114_var(int x, int y) => (x ^ ToVar(3)) | (y & ToVar(5)); + + public bool Test115_cns(int x, int y) => ((x ^ 3) | (y ^ 5)) == Test115_var(x, y); + public int Test115_var(int x, int y) => (x ^ ToVar(3)) | (y ^ ToVar(5)); + + public bool Test116_cns(int x, int y) => ((x ^ 3) & (y + 5)) == Test116_var(x, y); + public int Test116_var(int x, int y) => (x ^ ToVar(3)) & (y + ToVar(5)); + + public bool Test117_cns(int x, int y) => ((x ^ 3) & (y - 5)) == Test117_var(x, y); + public int Test117_var(int x, int y) => (x ^ ToVar(3)) & (y - ToVar(5)); + + public bool Test118_cns(int x, int y) => ((x ^ 3) & (y | 5)) == Test118_var(x, y); + public int Test118_var(int x, int y) => (x ^ ToVar(3)) & (y | ToVar(5)); + + public bool Test119_cns(int x, int y) => ((x ^ 3) & (y & 5)) == Test119_var(x, y); + public int Test119_var(int x, int y) => (x ^ ToVar(3)) & (y & ToVar(5)); + + public bool Test120_cns(int x, int y) => ((x ^ 3) & (y ^ 5)) == Test120_var(x, y); + public int Test120_var(int x, int y) => (x ^ ToVar(3)) & (y ^ ToVar(5)); + + public bool Test121_cns(int x, int y) => ((x ^ 3) ^ (y + 5)) == Test121_var(x, y); + public int Test121_var(int x, int y) => (x ^ ToVar(3)) ^ (y + ToVar(5)); + + public bool Test122_cns(int x, int y) => ((x ^ 3) ^ (y - 5)) == Test122_var(x, y); + public int Test122_var(int x, int y) => (x ^ ToVar(3)) ^ (y - ToVar(5)); + + public bool Test123_cns(int x, int y) => ((x ^ 3) ^ (y | 5)) == Test123_var(x, y); + public int Test123_var(int x, int y) => (x ^ ToVar(3)) ^ (y | ToVar(5)); + + public bool Test124_cns(int x, int y) => ((x ^ 3) ^ (y & 5)) == Test124_var(x, y); + public int Test124_var(int x, int y) => (x ^ ToVar(3)) ^ (y & ToVar(5)); + + public bool Test125_cns(int x, int y) => ((x ^ 3) ^ (y ^ 5)) == Test125_var(x, y); + public int Test125_var(int x, int y) => (x ^ ToVar(3)) ^ (y ^ ToVar(5)); + + public static T ToVar(T v) => v; +} + +// Test constant folding for +// "(x cns1) (y cns2)" pattern +public class TestPattern2_ulong +{ + public bool Test1_cns(ulong x, ulong y) => ((x + 12345UL) + (y + 49UL)) == Test1_var(x, y); + public ulong Test1_var(ulong x, ulong y) => (x + ToVar(12345UL)) + (y + ToVar(49UL)); + + public bool Test2_cns(ulong x, ulong y) => ((x + 12345UL) + (y - 49UL)) == Test2_var(x, y); + public ulong Test2_var(ulong x, ulong y) => (x + ToVar(12345UL)) + (y - ToVar(49UL)); + + public bool Test3_cns(ulong x, ulong y) => ((x + 12345UL) + (y | 49UL)) == Test3_var(x, y); + public ulong Test3_var(ulong x, ulong y) => (x + ToVar(12345UL)) + (y | ToVar(49UL)); + + public bool Test4_cns(ulong x, ulong y) => ((x + 12345UL) + (y & 49UL)) == Test4_var(x, y); + public ulong Test4_var(ulong x, ulong y) => (x + ToVar(12345UL)) + (y & ToVar(49UL)); + + public bool Test5_cns(ulong x, ulong y) => ((x + 12345UL) + (y ^ 49UL)) == Test5_var(x, y); + public ulong Test5_var(ulong x, ulong y) => (x + ToVar(12345UL)) + (y ^ ToVar(49UL)); + + public bool Test6_cns(ulong x, ulong y) => ((x + 12345UL) - (y + 49UL)) == Test6_var(x, y); + public ulong Test6_var(ulong x, ulong y) => (x + ToVar(12345UL)) - (y + ToVar(49UL)); + + public bool Test7_cns(ulong x, ulong y) => ((x + 12345UL) - (y - 49UL)) == Test7_var(x, y); + public ulong Test7_var(ulong x, ulong y) => (x + ToVar(12345UL)) - (y - ToVar(49UL)); + + public bool Test8_cns(ulong x, ulong y) => ((x + 12345UL) - (y | 49UL)) == Test8_var(x, y); + public ulong Test8_var(ulong x, ulong y) => (x + ToVar(12345UL)) - (y | ToVar(49UL)); + + public bool Test9_cns(ulong x, ulong y) => ((x + 12345UL) - (y & 49UL)) == Test9_var(x, y); + public ulong Test9_var(ulong x, ulong y) => (x + ToVar(12345UL)) - (y & ToVar(49UL)); + + public bool Test10_cns(ulong x, ulong y) => ((x + 12345UL) - (y ^ 49UL)) == Test10_var(x, y); + public ulong Test10_var(ulong x, ulong y) => (x + ToVar(12345UL)) - (y ^ ToVar(49UL)); + + public bool Test11_cns(ulong x, ulong y) => ((x + 12345UL) | (y + 49UL)) == Test11_var(x, y); + public ulong Test11_var(ulong x, ulong y) => (x + ToVar(12345UL)) | (y + ToVar(49UL)); + + public bool Test12_cns(ulong x, ulong y) => ((x + 12345UL) | (y - 49UL)) == Test12_var(x, y); + public ulong Test12_var(ulong x, ulong y) => (x + ToVar(12345UL)) | (y - ToVar(49UL)); + + public bool Test13_cns(ulong x, ulong y) => ((x + 12345UL) | (y | 49UL)) == Test13_var(x, y); + public ulong Test13_var(ulong x, ulong y) => (x + ToVar(12345UL)) | (y | ToVar(49UL)); + + public bool Test14_cns(ulong x, ulong y) => ((x + 12345UL) | (y & 49UL)) == Test14_var(x, y); + public ulong Test14_var(ulong x, ulong y) => (x + ToVar(12345UL)) | (y & ToVar(49UL)); + + public bool Test15_cns(ulong x, ulong y) => ((x + 12345UL) | (y ^ 49UL)) == Test15_var(x, y); + public ulong Test15_var(ulong x, ulong y) => (x + ToVar(12345UL)) | (y ^ ToVar(49UL)); + + public bool Test16_cns(ulong x, ulong y) => ((x + 12345UL) & (y + 49UL)) == Test16_var(x, y); + public ulong Test16_var(ulong x, ulong y) => (x + ToVar(12345UL)) & (y + ToVar(49UL)); + + public bool Test17_cns(ulong x, ulong y) => ((x + 12345UL) & (y - 49UL)) == Test17_var(x, y); + public ulong Test17_var(ulong x, ulong y) => (x + ToVar(12345UL)) & (y - ToVar(49UL)); + + public bool Test18_cns(ulong x, ulong y) => ((x + 12345UL) & (y | 49UL)) == Test18_var(x, y); + public ulong Test18_var(ulong x, ulong y) => (x + ToVar(12345UL)) & (y | ToVar(49UL)); + + public bool Test19_cns(ulong x, ulong y) => ((x + 12345UL) & (y & 49UL)) == Test19_var(x, y); + public ulong Test19_var(ulong x, ulong y) => (x + ToVar(12345UL)) & (y & ToVar(49UL)); + + public bool Test20_cns(ulong x, ulong y) => ((x + 12345UL) & (y ^ 49UL)) == Test20_var(x, y); + public ulong Test20_var(ulong x, ulong y) => (x + ToVar(12345UL)) & (y ^ ToVar(49UL)); + + public bool Test21_cns(ulong x, ulong y) => ((x + 12345UL) ^ (y + 49UL)) == Test21_var(x, y); + public ulong Test21_var(ulong x, ulong y) => (x + ToVar(12345UL)) ^ (y + ToVar(49UL)); + + public bool Test22_cns(ulong x, ulong y) => ((x + 12345UL) ^ (y - 49UL)) == Test22_var(x, y); + public ulong Test22_var(ulong x, ulong y) => (x + ToVar(12345UL)) ^ (y - ToVar(49UL)); + + public bool Test23_cns(ulong x, ulong y) => ((x + 12345UL) ^ (y | 49UL)) == Test23_var(x, y); + public ulong Test23_var(ulong x, ulong y) => (x + ToVar(12345UL)) ^ (y | ToVar(49UL)); + + public bool Test24_cns(ulong x, ulong y) => ((x + 12345UL) ^ (y & 49UL)) == Test24_var(x, y); + public ulong Test24_var(ulong x, ulong y) => (x + ToVar(12345UL)) ^ (y & ToVar(49UL)); + + public bool Test25_cns(ulong x, ulong y) => ((x + 12345UL) ^ (y ^ 49UL)) == Test25_var(x, y); + public ulong Test25_var(ulong x, ulong y) => (x + ToVar(12345UL)) ^ (y ^ ToVar(49UL)); + + public bool Test26_cns(ulong x, ulong y) => ((x - 12345UL) + (y + 49UL)) == Test26_var(x, y); + public ulong Test26_var(ulong x, ulong y) => (x - ToVar(12345UL)) + (y + ToVar(49UL)); + + public bool Test27_cns(ulong x, ulong y) => ((x - 12345UL) + (y - 49UL)) == Test27_var(x, y); + public ulong Test27_var(ulong x, ulong y) => (x - ToVar(12345UL)) + (y - ToVar(49UL)); + + public bool Test28_cns(ulong x, ulong y) => ((x - 12345UL) + (y | 49UL)) == Test28_var(x, y); + public ulong Test28_var(ulong x, ulong y) => (x - ToVar(12345UL)) + (y | ToVar(49UL)); + + public bool Test29_cns(ulong x, ulong y) => ((x - 12345UL) + (y & 49UL)) == Test29_var(x, y); + public ulong Test29_var(ulong x, ulong y) => (x - ToVar(12345UL)) + (y & ToVar(49UL)); + + public bool Test30_cns(ulong x, ulong y) => ((x - 12345UL) + (y ^ 49UL)) == Test30_var(x, y); + public ulong Test30_var(ulong x, ulong y) => (x - ToVar(12345UL)) + (y ^ ToVar(49UL)); + + public bool Test31_cns(ulong x, ulong y) => ((x - 12345UL) - (y + 49UL)) == Test31_var(x, y); + public ulong Test31_var(ulong x, ulong y) => (x - ToVar(12345UL)) - (y + ToVar(49UL)); + + public bool Test32_cns(ulong x, ulong y) => ((x - 12345UL) - (y - 49UL)) == Test32_var(x, y); + public ulong Test32_var(ulong x, ulong y) => (x - ToVar(12345UL)) - (y - ToVar(49UL)); + + public bool Test33_cns(ulong x, ulong y) => ((x - 12345UL) - (y | 49UL)) == Test33_var(x, y); + public ulong Test33_var(ulong x, ulong y) => (x - ToVar(12345UL)) - (y | ToVar(49UL)); + + public bool Test34_cns(ulong x, ulong y) => ((x - 12345UL) - (y & 49UL)) == Test34_var(x, y); + public ulong Test34_var(ulong x, ulong y) => (x - ToVar(12345UL)) - (y & ToVar(49UL)); + + public bool Test35_cns(ulong x, ulong y) => ((x - 12345UL) - (y ^ 49UL)) == Test35_var(x, y); + public ulong Test35_var(ulong x, ulong y) => (x - ToVar(12345UL)) - (y ^ ToVar(49UL)); + + public bool Test36_cns(ulong x, ulong y) => ((x - 12345UL) | (y + 49UL)) == Test36_var(x, y); + public ulong Test36_var(ulong x, ulong y) => (x - ToVar(12345UL)) | (y + ToVar(49UL)); + + public bool Test37_cns(ulong x, ulong y) => ((x - 12345UL) | (y - 49UL)) == Test37_var(x, y); + public ulong Test37_var(ulong x, ulong y) => (x - ToVar(12345UL)) | (y - ToVar(49UL)); + + public bool Test38_cns(ulong x, ulong y) => ((x - 12345UL) | (y | 49UL)) == Test38_var(x, y); + public ulong Test38_var(ulong x, ulong y) => (x - ToVar(12345UL)) | (y | ToVar(49UL)); + + public bool Test39_cns(ulong x, ulong y) => ((x - 12345UL) | (y & 49UL)) == Test39_var(x, y); + public ulong Test39_var(ulong x, ulong y) => (x - ToVar(12345UL)) | (y & ToVar(49UL)); + + public bool Test40_cns(ulong x, ulong y) => ((x - 12345UL) | (y ^ 49UL)) == Test40_var(x, y); + public ulong Test40_var(ulong x, ulong y) => (x - ToVar(12345UL)) | (y ^ ToVar(49UL)); + + public bool Test41_cns(ulong x, ulong y) => ((x - 12345UL) & (y + 49UL)) == Test41_var(x, y); + public ulong Test41_var(ulong x, ulong y) => (x - ToVar(12345UL)) & (y + ToVar(49UL)); + + public bool Test42_cns(ulong x, ulong y) => ((x - 12345UL) & (y - 49UL)) == Test42_var(x, y); + public ulong Test42_var(ulong x, ulong y) => (x - ToVar(12345UL)) & (y - ToVar(49UL)); + + public bool Test43_cns(ulong x, ulong y) => ((x - 12345UL) & (y | 49UL)) == Test43_var(x, y); + public ulong Test43_var(ulong x, ulong y) => (x - ToVar(12345UL)) & (y | ToVar(49UL)); + + public bool Test44_cns(ulong x, ulong y) => ((x - 12345UL) & (y & 49UL)) == Test44_var(x, y); + public ulong Test44_var(ulong x, ulong y) => (x - ToVar(12345UL)) & (y & ToVar(49UL)); + + public bool Test45_cns(ulong x, ulong y) => ((x - 12345UL) & (y ^ 49UL)) == Test45_var(x, y); + public ulong Test45_var(ulong x, ulong y) => (x - ToVar(12345UL)) & (y ^ ToVar(49UL)); + + public bool Test46_cns(ulong x, ulong y) => ((x - 12345UL) ^ (y + 49UL)) == Test46_var(x, y); + public ulong Test46_var(ulong x, ulong y) => (x - ToVar(12345UL)) ^ (y + ToVar(49UL)); + + public bool Test47_cns(ulong x, ulong y) => ((x - 12345UL) ^ (y - 49UL)) == Test47_var(x, y); + public ulong Test47_var(ulong x, ulong y) => (x - ToVar(12345UL)) ^ (y - ToVar(49UL)); + + public bool Test48_cns(ulong x, ulong y) => ((x - 12345UL) ^ (y | 49UL)) == Test48_var(x, y); + public ulong Test48_var(ulong x, ulong y) => (x - ToVar(12345UL)) ^ (y | ToVar(49UL)); + + public bool Test49_cns(ulong x, ulong y) => ((x - 12345UL) ^ (y & 49UL)) == Test49_var(x, y); + public ulong Test49_var(ulong x, ulong y) => (x - ToVar(12345UL)) ^ (y & ToVar(49UL)); + + public bool Test50_cns(ulong x, ulong y) => ((x - 12345UL) ^ (y ^ 49UL)) == Test50_var(x, y); + public ulong Test50_var(ulong x, ulong y) => (x - ToVar(12345UL)) ^ (y ^ ToVar(49UL)); + + public bool Test51_cns(ulong x, ulong y) => ((x | 12345UL) + (y + 49UL)) == Test51_var(x, y); + public ulong Test51_var(ulong x, ulong y) => (x | ToVar(12345UL)) + (y + ToVar(49UL)); + + public bool Test52_cns(ulong x, ulong y) => ((x | 12345UL) + (y - 49UL)) == Test52_var(x, y); + public ulong Test52_var(ulong x, ulong y) => (x | ToVar(12345UL)) + (y - ToVar(49UL)); + + public bool Test53_cns(ulong x, ulong y) => ((x | 12345UL) + (y | 49UL)) == Test53_var(x, y); + public ulong Test53_var(ulong x, ulong y) => (x | ToVar(12345UL)) + (y | ToVar(49UL)); + + public bool Test54_cns(ulong x, ulong y) => ((x | 12345UL) + (y & 49UL)) == Test54_var(x, y); + public ulong Test54_var(ulong x, ulong y) => (x | ToVar(12345UL)) + (y & ToVar(49UL)); + + public bool Test55_cns(ulong x, ulong y) => ((x | 12345UL) + (y ^ 49UL)) == Test55_var(x, y); + public ulong Test55_var(ulong x, ulong y) => (x | ToVar(12345UL)) + (y ^ ToVar(49UL)); + + public bool Test56_cns(ulong x, ulong y) => ((x | 12345UL) - (y + 49UL)) == Test56_var(x, y); + public ulong Test56_var(ulong x, ulong y) => (x | ToVar(12345UL)) - (y + ToVar(49UL)); + + public bool Test57_cns(ulong x, ulong y) => ((x | 12345UL) - (y - 49UL)) == Test57_var(x, y); + public ulong Test57_var(ulong x, ulong y) => (x | ToVar(12345UL)) - (y - ToVar(49UL)); + + public bool Test58_cns(ulong x, ulong y) => ((x | 12345UL) - (y | 49UL)) == Test58_var(x, y); + public ulong Test58_var(ulong x, ulong y) => (x | ToVar(12345UL)) - (y | ToVar(49UL)); + + public bool Test59_cns(ulong x, ulong y) => ((x | 12345UL) - (y & 49UL)) == Test59_var(x, y); + public ulong Test59_var(ulong x, ulong y) => (x | ToVar(12345UL)) - (y & ToVar(49UL)); + + public bool Test60_cns(ulong x, ulong y) => ((x | 12345UL) - (y ^ 49UL)) == Test60_var(x, y); + public ulong Test60_var(ulong x, ulong y) => (x | ToVar(12345UL)) - (y ^ ToVar(49UL)); + + public bool Test61_cns(ulong x, ulong y) => ((x | 12345UL) | (y + 49UL)) == Test61_var(x, y); + public ulong Test61_var(ulong x, ulong y) => (x | ToVar(12345UL)) | (y + ToVar(49UL)); + + public bool Test62_cns(ulong x, ulong y) => ((x | 12345UL) | (y - 49UL)) == Test62_var(x, y); + public ulong Test62_var(ulong x, ulong y) => (x | ToVar(12345UL)) | (y - ToVar(49UL)); + + public bool Test63_cns(ulong x, ulong y) => ((x | 12345UL) | (y | 49UL)) == Test63_var(x, y); + public ulong Test63_var(ulong x, ulong y) => (x | ToVar(12345UL)) | (y | ToVar(49UL)); + + public bool Test64_cns(ulong x, ulong y) => ((x | 12345UL) | (y & 49UL)) == Test64_var(x, y); + public ulong Test64_var(ulong x, ulong y) => (x | ToVar(12345UL)) | (y & ToVar(49UL)); + + public bool Test65_cns(ulong x, ulong y) => ((x | 12345UL) | (y ^ 49UL)) == Test65_var(x, y); + public ulong Test65_var(ulong x, ulong y) => (x | ToVar(12345UL)) | (y ^ ToVar(49UL)); + + public bool Test66_cns(ulong x, ulong y) => ((x | 12345UL) & (y + 49UL)) == Test66_var(x, y); + public ulong Test66_var(ulong x, ulong y) => (x | ToVar(12345UL)) & (y + ToVar(49UL)); + + public bool Test67_cns(ulong x, ulong y) => ((x | 12345UL) & (y - 49UL)) == Test67_var(x, y); + public ulong Test67_var(ulong x, ulong y) => (x | ToVar(12345UL)) & (y - ToVar(49UL)); + + public bool Test68_cns(ulong x, ulong y) => ((x | 12345UL) & (y | 49UL)) == Test68_var(x, y); + public ulong Test68_var(ulong x, ulong y) => (x | ToVar(12345UL)) & (y | ToVar(49UL)); + + public bool Test69_cns(ulong x, ulong y) => ((x | 12345UL) & (y & 49UL)) == Test69_var(x, y); + public ulong Test69_var(ulong x, ulong y) => (x | ToVar(12345UL)) & (y & ToVar(49UL)); + + public bool Test70_cns(ulong x, ulong y) => ((x | 12345UL) & (y ^ 49UL)) == Test70_var(x, y); + public ulong Test70_var(ulong x, ulong y) => (x | ToVar(12345UL)) & (y ^ ToVar(49UL)); + + public bool Test71_cns(ulong x, ulong y) => ((x | 12345UL) ^ (y + 49UL)) == Test71_var(x, y); + public ulong Test71_var(ulong x, ulong y) => (x | ToVar(12345UL)) ^ (y + ToVar(49UL)); + + public bool Test72_cns(ulong x, ulong y) => ((x | 12345UL) ^ (y - 49UL)) == Test72_var(x, y); + public ulong Test72_var(ulong x, ulong y) => (x | ToVar(12345UL)) ^ (y - ToVar(49UL)); + + public bool Test73_cns(ulong x, ulong y) => ((x | 12345UL) ^ (y | 49UL)) == Test73_var(x, y); + public ulong Test73_var(ulong x, ulong y) => (x | ToVar(12345UL)) ^ (y | ToVar(49UL)); + + public bool Test74_cns(ulong x, ulong y) => ((x | 12345UL) ^ (y & 49UL)) == Test74_var(x, y); + public ulong Test74_var(ulong x, ulong y) => (x | ToVar(12345UL)) ^ (y & ToVar(49UL)); + + public bool Test75_cns(ulong x, ulong y) => ((x | 12345UL) ^ (y ^ 49UL)) == Test75_var(x, y); + public ulong Test75_var(ulong x, ulong y) => (x | ToVar(12345UL)) ^ (y ^ ToVar(49UL)); + + public bool Test76_cns(ulong x, ulong y) => ((x & 12345UL) + (y + 49UL)) == Test76_var(x, y); + public ulong Test76_var(ulong x, ulong y) => (x & ToVar(12345UL)) + (y + ToVar(49UL)); + + public bool Test77_cns(ulong x, ulong y) => ((x & 12345UL) + (y - 49UL)) == Test77_var(x, y); + public ulong Test77_var(ulong x, ulong y) => (x & ToVar(12345UL)) + (y - ToVar(49UL)); + + public bool Test78_cns(ulong x, ulong y) => ((x & 12345UL) + (y | 49UL)) == Test78_var(x, y); + public ulong Test78_var(ulong x, ulong y) => (x & ToVar(12345UL)) + (y | ToVar(49UL)); + + public bool Test79_cns(ulong x, ulong y) => ((x & 12345UL) + (y & 49UL)) == Test79_var(x, y); + public ulong Test79_var(ulong x, ulong y) => (x & ToVar(12345UL)) + (y & ToVar(49UL)); + + public bool Test80_cns(ulong x, ulong y) => ((x & 12345UL) + (y ^ 49UL)) == Test80_var(x, y); + public ulong Test80_var(ulong x, ulong y) => (x & ToVar(12345UL)) + (y ^ ToVar(49UL)); + + public bool Test81_cns(ulong x, ulong y) => ((x & 12345UL) - (y + 49UL)) == Test81_var(x, y); + public ulong Test81_var(ulong x, ulong y) => (x & ToVar(12345UL)) - (y + ToVar(49UL)); + + public bool Test82_cns(ulong x, ulong y) => ((x & 12345UL) - (y - 49UL)) == Test82_var(x, y); + public ulong Test82_var(ulong x, ulong y) => (x & ToVar(12345UL)) - (y - ToVar(49UL)); + + public bool Test83_cns(ulong x, ulong y) => ((x & 12345UL) - (y | 49UL)) == Test83_var(x, y); + public ulong Test83_var(ulong x, ulong y) => (x & ToVar(12345UL)) - (y | ToVar(49UL)); + + public bool Test84_cns(ulong x, ulong y) => ((x & 12345UL) - (y & 49UL)) == Test84_var(x, y); + public ulong Test84_var(ulong x, ulong y) => (x & ToVar(12345UL)) - (y & ToVar(49UL)); + + public bool Test85_cns(ulong x, ulong y) => ((x & 12345UL) - (y ^ 49UL)) == Test85_var(x, y); + public ulong Test85_var(ulong x, ulong y) => (x & ToVar(12345UL)) - (y ^ ToVar(49UL)); + + public bool Test86_cns(ulong x, ulong y) => ((x & 12345UL) | (y + 49UL)) == Test86_var(x, y); + public ulong Test86_var(ulong x, ulong y) => (x & ToVar(12345UL)) | (y + ToVar(49UL)); + + public bool Test87_cns(ulong x, ulong y) => ((x & 12345UL) | (y - 49UL)) == Test87_var(x, y); + public ulong Test87_var(ulong x, ulong y) => (x & ToVar(12345UL)) | (y - ToVar(49UL)); + + public bool Test88_cns(ulong x, ulong y) => ((x & 12345UL) | (y | 49UL)) == Test88_var(x, y); + public ulong Test88_var(ulong x, ulong y) => (x & ToVar(12345UL)) | (y | ToVar(49UL)); + + public bool Test89_cns(ulong x, ulong y) => ((x & 12345UL) | (y & 49UL)) == Test89_var(x, y); + public ulong Test89_var(ulong x, ulong y) => (x & ToVar(12345UL)) | (y & ToVar(49UL)); + + public bool Test90_cns(ulong x, ulong y) => ((x & 12345UL) | (y ^ 49UL)) == Test90_var(x, y); + public ulong Test90_var(ulong x, ulong y) => (x & ToVar(12345UL)) | (y ^ ToVar(49UL)); + + public bool Test91_cns(ulong x, ulong y) => ((x & 12345UL) & (y + 49UL)) == Test91_var(x, y); + public ulong Test91_var(ulong x, ulong y) => (x & ToVar(12345UL)) & (y + ToVar(49UL)); + + public bool Test92_cns(ulong x, ulong y) => ((x & 12345UL) & (y - 49UL)) == Test92_var(x, y); + public ulong Test92_var(ulong x, ulong y) => (x & ToVar(12345UL)) & (y - ToVar(49UL)); + + public bool Test93_cns(ulong x, ulong y) => ((x & 12345UL) & (y | 49UL)) == Test93_var(x, y); + public ulong Test93_var(ulong x, ulong y) => (x & ToVar(12345UL)) & (y | ToVar(49UL)); + + public bool Test94_cns(ulong x, ulong y) => ((x & 12345UL) & (y & 49UL)) == Test94_var(x, y); + public ulong Test94_var(ulong x, ulong y) => (x & ToVar(12345UL)) & (y & ToVar(49UL)); + + public bool Test95_cns(ulong x, ulong y) => ((x & 12345UL) & (y ^ 49UL)) == Test95_var(x, y); + public ulong Test95_var(ulong x, ulong y) => (x & ToVar(12345UL)) & (y ^ ToVar(49UL)); + + public bool Test96_cns(ulong x, ulong y) => ((x & 12345UL) ^ (y + 49UL)) == Test96_var(x, y); + public ulong Test96_var(ulong x, ulong y) => (x & ToVar(12345UL)) ^ (y + ToVar(49UL)); + + public bool Test97_cns(ulong x, ulong y) => ((x & 12345UL) ^ (y - 49UL)) == Test97_var(x, y); + public ulong Test97_var(ulong x, ulong y) => (x & ToVar(12345UL)) ^ (y - ToVar(49UL)); + + public bool Test98_cns(ulong x, ulong y) => ((x & 12345UL) ^ (y | 49UL)) == Test98_var(x, y); + public ulong Test98_var(ulong x, ulong y) => (x & ToVar(12345UL)) ^ (y | ToVar(49UL)); + + public bool Test99_cns(ulong x, ulong y) => ((x & 12345UL) ^ (y & 49UL)) == Test99_var(x, y); + public ulong Test99_var(ulong x, ulong y) => (x & ToVar(12345UL)) ^ (y & ToVar(49UL)); + + public bool Test100_cns(ulong x, ulong y) => ((x & 12345UL) ^ (y ^ 49UL)) == Test100_var(x, y); + public ulong Test100_var(ulong x, ulong y) => (x & ToVar(12345UL)) ^ (y ^ ToVar(49UL)); + + public bool Test101_cns(ulong x, ulong y) => ((x ^ 12345UL) + (y + 49UL)) == Test101_var(x, y); + public ulong Test101_var(ulong x, ulong y) => (x ^ ToVar(12345UL)) + (y + ToVar(49UL)); + + public bool Test102_cns(ulong x, ulong y) => ((x ^ 12345UL) + (y - 49UL)) == Test102_var(x, y); + public ulong Test102_var(ulong x, ulong y) => (x ^ ToVar(12345UL)) + (y - ToVar(49UL)); + + public bool Test103_cns(ulong x, ulong y) => ((x ^ 12345UL) + (y | 49UL)) == Test103_var(x, y); + public ulong Test103_var(ulong x, ulong y) => (x ^ ToVar(12345UL)) + (y | ToVar(49UL)); + + public bool Test104_cns(ulong x, ulong y) => ((x ^ 12345UL) + (y & 49UL)) == Test104_var(x, y); + public ulong Test104_var(ulong x, ulong y) => (x ^ ToVar(12345UL)) + (y & ToVar(49UL)); + + public bool Test105_cns(ulong x, ulong y) => ((x ^ 12345UL) + (y ^ 49UL)) == Test105_var(x, y); + public ulong Test105_var(ulong x, ulong y) => (x ^ ToVar(12345UL)) + (y ^ ToVar(49UL)); + + public bool Test106_cns(ulong x, ulong y) => ((x ^ 12345UL) - (y + 49UL)) == Test106_var(x, y); + public ulong Test106_var(ulong x, ulong y) => (x ^ ToVar(12345UL)) - (y + ToVar(49UL)); + + public bool Test107_cns(ulong x, ulong y) => ((x ^ 12345UL) - (y - 49UL)) == Test107_var(x, y); + public ulong Test107_var(ulong x, ulong y) => (x ^ ToVar(12345UL)) - (y - ToVar(49UL)); + + public bool Test108_cns(ulong x, ulong y) => ((x ^ 12345UL) - (y | 49UL)) == Test108_var(x, y); + public ulong Test108_var(ulong x, ulong y) => (x ^ ToVar(12345UL)) - (y | ToVar(49UL)); + + public bool Test109_cns(ulong x, ulong y) => ((x ^ 12345UL) - (y & 49UL)) == Test109_var(x, y); + public ulong Test109_var(ulong x, ulong y) => (x ^ ToVar(12345UL)) - (y & ToVar(49UL)); + + public bool Test110_cns(ulong x, ulong y) => ((x ^ 12345UL) - (y ^ 49UL)) == Test110_var(x, y); + public ulong Test110_var(ulong x, ulong y) => (x ^ ToVar(12345UL)) - (y ^ ToVar(49UL)); + + public bool Test111_cns(ulong x, ulong y) => ((x ^ 12345UL) | (y + 49UL)) == Test111_var(x, y); + public ulong Test111_var(ulong x, ulong y) => (x ^ ToVar(12345UL)) | (y + ToVar(49UL)); + + public bool Test112_cns(ulong x, ulong y) => ((x ^ 12345UL) | (y - 49UL)) == Test112_var(x, y); + public ulong Test112_var(ulong x, ulong y) => (x ^ ToVar(12345UL)) | (y - ToVar(49UL)); + + public bool Test113_cns(ulong x, ulong y) => ((x ^ 12345UL) | (y | 49UL)) == Test113_var(x, y); + public ulong Test113_var(ulong x, ulong y) => (x ^ ToVar(12345UL)) | (y | ToVar(49UL)); + + public bool Test114_cns(ulong x, ulong y) => ((x ^ 12345UL) | (y & 49UL)) == Test114_var(x, y); + public ulong Test114_var(ulong x, ulong y) => (x ^ ToVar(12345UL)) | (y & ToVar(49UL)); + + public bool Test115_cns(ulong x, ulong y) => ((x ^ 12345UL) | (y ^ 49UL)) == Test115_var(x, y); + public ulong Test115_var(ulong x, ulong y) => (x ^ ToVar(12345UL)) | (y ^ ToVar(49UL)); + + public bool Test116_cns(ulong x, ulong y) => ((x ^ 12345UL) & (y + 49UL)) == Test116_var(x, y); + public ulong Test116_var(ulong x, ulong y) => (x ^ ToVar(12345UL)) & (y + ToVar(49UL)); + + public bool Test117_cns(ulong x, ulong y) => ((x ^ 12345UL) & (y - 49UL)) == Test117_var(x, y); + public ulong Test117_var(ulong x, ulong y) => (x ^ ToVar(12345UL)) & (y - ToVar(49UL)); + + public bool Test118_cns(ulong x, ulong y) => ((x ^ 12345UL) & (y | 49UL)) == Test118_var(x, y); + public ulong Test118_var(ulong x, ulong y) => (x ^ ToVar(12345UL)) & (y | ToVar(49UL)); + + public bool Test119_cns(ulong x, ulong y) => ((x ^ 12345UL) & (y & 49UL)) == Test119_var(x, y); + public ulong Test119_var(ulong x, ulong y) => (x ^ ToVar(12345UL)) & (y & ToVar(49UL)); + + public bool Test120_cns(ulong x, ulong y) => ((x ^ 12345UL) & (y ^ 49UL)) == Test120_var(x, y); + public ulong Test120_var(ulong x, ulong y) => (x ^ ToVar(12345UL)) & (y ^ ToVar(49UL)); + + public bool Test121_cns(ulong x, ulong y) => ((x ^ 12345UL) ^ (y + 49UL)) == Test121_var(x, y); + public ulong Test121_var(ulong x, ulong y) => (x ^ ToVar(12345UL)) ^ (y + ToVar(49UL)); + + public bool Test122_cns(ulong x, ulong y) => ((x ^ 12345UL) ^ (y - 49UL)) == Test122_var(x, y); + public ulong Test122_var(ulong x, ulong y) => (x ^ ToVar(12345UL)) ^ (y - ToVar(49UL)); + + public bool Test123_cns(ulong x, ulong y) => ((x ^ 12345UL) ^ (y | 49UL)) == Test123_var(x, y); + public ulong Test123_var(ulong x, ulong y) => (x ^ ToVar(12345UL)) ^ (y | ToVar(49UL)); + + public bool Test124_cns(ulong x, ulong y) => ((x ^ 12345UL) ^ (y & 49UL)) == Test124_var(x, y); + public ulong Test124_var(ulong x, ulong y) => (x ^ ToVar(12345UL)) ^ (y & ToVar(49UL)); + + public bool Test125_cns(ulong x, ulong y) => ((x ^ 12345UL) ^ (y ^ 49UL)) == Test125_var(x, y); + public ulong Test125_var(ulong x, ulong y) => (x ^ ToVar(12345UL)) ^ (y ^ ToVar(49UL)); + + private static T ToVar(T v) => v; +} + +// Make sure JIT optimizations don't hide possible overflows +public class OverflowTests +{ + public void Test() + { + ThrowsOverflowException(() => Test0(0)); + ThrowsOverflowException(() => Test1(0, 0)); + ThrowsOverflowException(() => Test2(0)); + ThrowsOverflowException(() => Test3(0, 0)); + ThrowsOverflowException(() => Test4(0)); + ThrowsOverflowException(() => Test5(0)); + ThrowsOverflowException(() => Test6(0, 0)); + ThrowsOverflowException(() => Test7(0, 0)); + } + + public int Test0(int x) => checked((x + int.MaxValue + 1)); + public int Test1(int x, int y) => checked((x + int.MaxValue / 2 + 1) + (y + (int.MaxValue / 2 + 1))); + public byte Test2(byte x) => checked((byte)(x + byte.MaxValue + 1)); + public byte Test3(byte x, byte y) => checked((byte)((x + byte.MaxValue / 2 + 1) + (y + (byte.MaxValue / 2 + 1)))); + public ulong Test4(ulong x) => checked((x + ulong.MaxValue + 1)); + public ulong Test5(ulong x) => checked((1 + x + ulong.MaxValue)); + public ulong Test6(ulong x, ulong y) => checked((x + ulong.MaxValue / 2 + 1) + (y + (ulong.MaxValue / 2 + 1))); + public ulong Test7(ulong x, ulong y) => checked((1 + x + ulong.MaxValue / 2) + (1 + y + (ulong.MaxValue / 2))); + + static void ThrowsOverflowException(Func action) + { + try + { + action(); + } + catch (OverflowException) + { + return; + } + throw new Exception("OverflowException was expected"); + } +} \ No newline at end of file diff --git a/src/coreclr/tests/src/JIT/opt/InstructionCombining/MorphCommutative.csproj b/src/coreclr/tests/src/JIT/opt/InstructionCombining/MorphCommutative.csproj new file mode 100644 index 00000000000000..2861a99fe08124 --- /dev/null +++ b/src/coreclr/tests/src/JIT/opt/InstructionCombining/MorphCommutative.csproj @@ -0,0 +1,22 @@ + + + Exe + + + None + True + + + + + + + + + From 3e57d3d215929d9aba079a631efbcc5c03b839a3 Mon Sep 17 00:00:00 2001 From: EgorBo Date: Sun, 12 Jan 2020 03:09:05 +0300 Subject: [PATCH 7/9] Code formatting --- src/coreclr/src/jit/morph.cpp | 37 ++++++++++++++--------------------- 1 file changed, 15 insertions(+), 22 deletions(-) diff --git a/src/coreclr/src/jit/morph.cpp b/src/coreclr/src/jit/morph.cpp index f73343784d2e93..36c7e4b805f3d8 100644 --- a/src/coreclr/src/jit/morph.cpp +++ b/src/coreclr/src/jit/morph.cpp @@ -10830,15 +10830,15 @@ GenTree* Compiler::fgMorphFieldAssignToSIMDIntrinsicSet(GenTree* tree) #endif // FEATURE_SIMD - //------------------------------------------------------------------------ - // fgMorphCommutative: Fold constants in a tree with commutative operators (|, ^, &, +) - // - // Arguments: - // tree - This node will be checked for patterns where constants can be folded. - // - // Return Value: - // A GenTree* which points to the new tree with folded constants. - // +//------------------------------------------------------------------------ +// fgMorphCommutative: Fold constants in a tree with commutative operators (|, ^, &, +) +// +// Arguments: +// tree - This node will be checked for patterns where constants can be folded. +// +// Return Value: +// A GenTree* which points to the new tree with folded constants. +// GenTree* Compiler::fgMorphCommutative(GenTreeOp* tree) { @@ -10856,8 +10856,7 @@ GenTree* Compiler::fgMorphCommutative(GenTreeOp* tree) // If a GC happens, the byref won't get updated. This can happen if one // of the int components is negative. It also requires the address generation // be in a fully-interruptible code region. - if (!varTypeIsGC(op1->AsOp()->gtGetOp1()->TypeGet()) && - !varTypeIsGC(op2->AsOp()->gtGetOp1()->TypeGet())) + if (!varTypeIsGC(op1->AsOp()->gtGetOp1()->TypeGet()) && !varTypeIsGC(op2->AsOp()->gtGetOp1()->TypeGet())) { GenTreeIntCon* cns1 = op1->AsOp()->gtGetOp2()->AsIntCon(); GenTreeIntCon* cns2 = op2->AsOp()->gtGetOp2()->AsIntCon(); @@ -10909,12 +10908,9 @@ GenTree* Compiler::fgMorphCommutative(GenTreeOp* tree) if (op2->IsCnsIntOrI() && varTypeIsIntegralOrI(tree->TypeGet())) { // Fold "((x icon1) icon2) to (x (icon1 icon2))" - if (op1->OperIs(oper) && - !gtIsActiveCSE_Candidate(op1) && - op1->AsOp()->gtGetOp2()->IsCnsIntOrI() && + if (op1->OperIs(oper) && !gtIsActiveCSE_Candidate(op1) && op1->AsOp()->gtGetOp2()->IsCnsIntOrI() && (op1->AsOp()->gtGetOp2()->OperGet() == op2->OperGet()) && - !varTypeIsGC(op1->AsOp()->gtGetOp2()->TypeGet()) && - !varTypeIsGC(op2->TypeGet())) + !varTypeIsGC(op1->AsOp()->gtGetOp2()->TypeGet()) && !varTypeIsGC(op2->TypeGet())) { GenTreeIntConCommon* cns1 = op1->AsOp()->gtGetOp2()->AsIntConCommon(); GenTreeIntConCommon* cns2 = op2->AsIntConCommon(); @@ -10975,8 +10971,7 @@ GenTree* Compiler::fgMorphCommutative(GenTreeOp* tree) // Dereferencing the pointer in either case will have the // same effect. - if (!optValnumCSE_phase && varTypeIsGC(op2->TypeGet()) && - ((op1->gtFlags & GTF_ALL_EFFECT) == 0)) + if (!optValnumCSE_phase && varTypeIsGC(op2->TypeGet()) && ((op1->gtFlags & GTF_ALL_EFFECT) == 0)) { op2->gtType = tree->gtType; DEBUG_DESTROY_NODE(op1); @@ -10987,11 +10982,9 @@ GenTree* Compiler::fgMorphCommutative(GenTreeOp* tree) // Remove the addition if it won't change the tree type // to TYP_REF. - if (!gtIsActiveCSE_Candidate(op2) && - ((op1->TypeGet() == tree->TypeGet()) || (op1->TypeGet() != TYP_REF))) + if (!gtIsActiveCSE_Candidate(op2) && ((op1->TypeGet() == tree->TypeGet()) || (op1->TypeGet() != TYP_REF))) { - if (fgGlobalMorph && (op2->OperGet() == GT_CNS_INT) && - (op2->AsIntCon()->gtFieldSeq != nullptr) && + if (fgGlobalMorph && (op2->OperGet() == GT_CNS_INT) && (op2->AsIntCon()->gtFieldSeq != nullptr) && (op2->AsIntCon()->gtFieldSeq != FieldSeqStore::NotAField())) { fgAddFieldSeqForZeroOffset(op1, op2->AsIntCon()->gtFieldSeq); From 409ddf69e1671dcf6756ad9005683fe36ed7683a Mon Sep 17 00:00:00 2001 From: EgorBo Date: Thu, 16 Jan 2020 16:04:04 +0300 Subject: [PATCH 8/9] Simplify checks --- src/coreclr/src/jit/morph.cpp | 39 ++++++++++++++++------------------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/src/coreclr/src/jit/morph.cpp b/src/coreclr/src/jit/morph.cpp index 36c7e4b805f3d8..fec6194198008a 100644 --- a/src/coreclr/src/jit/morph.cpp +++ b/src/coreclr/src/jit/morph.cpp @@ -10848,9 +10848,11 @@ GenTree* Compiler::fgMorphCommutative(GenTreeOp* tree) GenTree* op2 = tree->gtGetOp2(); genTreeOps oper = tree->OperGet(); - // Fold "((x icon1) (y icon2))" to "((x y) (icon1 icon2))" - if (op1->OperIs(op2->OperGet()) && op1->OperIs(oper) && !gtIsActiveCSE_Candidate(op2) && - op1->AsOp()->gtGetOp2()->IsCnsIntOrI() && op2->AsOp()->gtGetOp2()->IsCnsIntOrI()) + // Fold (X C1) (Y C2) + // to (X Y) (C1 C2) + if (op1->OperIs(oper) && op2->OperIs(oper) && + op1->AsOp()->gtGetOp2()->IsCnsIntOrI() && op2->AsOp()->gtGetOp2()->IsCnsIntOrI() && + !gtIsActiveCSE_Candidate(op2)) { // Don't create a byref pointer that may point outside of the ref object. // If a GC happens, the byref won't get updated. This can happen if one @@ -10860,8 +10862,6 @@ GenTree* Compiler::fgMorphCommutative(GenTreeOp* tree) { GenTreeIntCon* cns1 = op1->AsOp()->gtGetOp2()->AsIntCon(); GenTreeIntCon* cns2 = op2->AsOp()->gtGetOp2()->AsIntCon(); - const ssize_t icon1 = cns1->IconValue(); - const ssize_t icon2 = cns2->IconValue(); if (oper == GT_ADD) { @@ -10869,19 +10869,19 @@ GenTree* Compiler::fgMorphCommutative(GenTreeOp* tree) { return tree; } - cns1->SetIconValue(icon1 + icon2); + cns1->SetIconValue(cns1->IconValue() + cns2->IconValue()); } else if (oper == GT_OR) { - cns1->SetIconValue(icon1 | icon2); + cns1->SetIconValue(cns1->IconValue() | cns2->IconValue()); } else if (oper == GT_XOR) { - cns1->SetIconValue(icon1 ^ icon2); + cns1->SetIconValue(cns1->IconValue() ^ cns2->IconValue()); } else if (oper == GT_AND) { - cns1->SetIconValue(icon1 & icon2); + cns1->SetIconValue(cns1->IconValue() & cns2->IconValue()); } else { @@ -10907,15 +10907,14 @@ GenTree* Compiler::fgMorphCommutative(GenTreeOp* tree) if (op2->IsCnsIntOrI() && varTypeIsIntegralOrI(tree->TypeGet())) { - // Fold "((x icon1) icon2) to (x (icon1 icon2))" + // Fold (X C1) C2 + // to (X (C1 C2) if (op1->OperIs(oper) && !gtIsActiveCSE_Candidate(op1) && op1->AsOp()->gtGetOp2()->IsCnsIntOrI() && (op1->AsOp()->gtGetOp2()->OperGet() == op2->OperGet()) && !varTypeIsGC(op1->AsOp()->gtGetOp2()->TypeGet()) && !varTypeIsGC(op2->TypeGet())) { GenTreeIntConCommon* cns1 = op1->AsOp()->gtGetOp2()->AsIntConCommon(); GenTreeIntConCommon* cns2 = op2->AsIntConCommon(); - const ssize_t icon1 = cns1->IconValue(); - const ssize_t icon2 = cns2->IconValue(); if (oper == GT_ADD) { @@ -10923,19 +10922,19 @@ GenTree* Compiler::fgMorphCommutative(GenTreeOp* tree) { return tree; } - cns2->SetIconValue(icon1 + icon2); + cns2->SetIconValue(cns1->IconValue() + cns2->IconValue()); } else if (oper == GT_OR) { - cns2->SetIconValue(icon1 | icon2); + cns2->SetIconValue(cns1->IconValue() | cns2->IconValue()); } else if (oper == GT_XOR) { - cns2->SetIconValue(icon1 ^ icon2); + cns2->SetIconValue(cns1->IconValue() ^ cns2->IconValue()); } else if (oper == GT_AND) { - cns2->SetIconValue(icon1 & icon2); + cns2->SetIconValue(cns1->IconValue() & cns2->IconValue()); } else { @@ -10954,23 +10953,22 @@ GenTree* Compiler::fgMorphCommutative(GenTreeOp* tree) op2->AsIntCon()->gtFieldSeq = GetFieldSeqStore()->Append(cns1->AsIntCon()->gtFieldSeq, op2->AsIntCon()->gtFieldSeq); } - DEBUG_DESTROY_NODE(cns1); + DEBUG_DESTROY_NODE(cns1); tree->gtOp1 = op1->AsOp()->gtOp1; DEBUG_DESTROY_NODE(op1); op1 = tree->gtOp1; } - // Fold (x 0) for GT_ADD, GT_OR and GT_XOR. + // Fold X 0 + // to X if (tree->OperIs(GT_ADD, GT_OR, GT_XOR) && (op2->AsIntConCommon()->IconValue() == 0) && !gtIsActiveCSE_Candidate(tree)) { - // If this addition is adding an offset to a null pointer, // avoid the work and yield the null pointer immediately. // Dereferencing the pointer in either case will have the // same effect. - if (!optValnumCSE_phase && varTypeIsGC(op2->TypeGet()) && ((op1->gtFlags & GTF_ALL_EFFECT) == 0)) { op2->gtType = tree->gtType; @@ -10981,7 +10979,6 @@ GenTree* Compiler::fgMorphCommutative(GenTreeOp* tree) // Remove the addition if it won't change the tree type // to TYP_REF. - if (!gtIsActiveCSE_Candidate(op2) && ((op1->TypeGet() == tree->TypeGet()) || (op1->TypeGet() != TYP_REF))) { if (fgGlobalMorph && (op2->OperGet() == GT_CNS_INT) && (op2->AsIntCon()->gtFieldSeq != nullptr) && From be96dd03f58cbc1f991d2a7ce58e580f4a730104 Mon Sep 17 00:00:00 2001 From: EgorBo Date: Thu, 16 Jan 2020 19:47:52 +0300 Subject: [PATCH 9/9] Address feedback --- src/coreclr/src/jit/morph.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/coreclr/src/jit/morph.cpp b/src/coreclr/src/jit/morph.cpp index fec6194198008a..064707a86f6160 100644 --- a/src/coreclr/src/jit/morph.cpp +++ b/src/coreclr/src/jit/morph.cpp @@ -10852,7 +10852,7 @@ GenTree* Compiler::fgMorphCommutative(GenTreeOp* tree) // to (X Y) (C1 C2) if (op1->OperIs(oper) && op2->OperIs(oper) && op1->AsOp()->gtGetOp2()->IsCnsIntOrI() && op2->AsOp()->gtGetOp2()->IsCnsIntOrI() && - !gtIsActiveCSE_Candidate(op2)) + !gtIsActiveCSE_Candidate(op1) && !gtIsActiveCSE_Candidate(op2)) { // Don't create a byref pointer that may point outside of the ref object. // If a GC happens, the byref won't get updated. This can happen if one @@ -10911,7 +10911,7 @@ GenTree* Compiler::fgMorphCommutative(GenTreeOp* tree) // to (X (C1 C2) if (op1->OperIs(oper) && !gtIsActiveCSE_Candidate(op1) && op1->AsOp()->gtGetOp2()->IsCnsIntOrI() && (op1->AsOp()->gtGetOp2()->OperGet() == op2->OperGet()) && - !varTypeIsGC(op1->AsOp()->gtGetOp2()->TypeGet()) && !varTypeIsGC(op2->TypeGet())) + !varTypeIsGC(op1->AsOp()->gtGetOp2()->TypeGet())) { GenTreeIntConCommon* cns1 = op1->AsOp()->gtGetOp2()->AsIntConCommon(); GenTreeIntConCommon* cns2 = op2->AsIntConCommon();