summaryrefslogtreecommitdiff
path: root/tests/src/JIT/CodeGenBringUpTests/UModConst.cs
diff options
context:
space:
mode:
authorBruce Forstall <brucefo@microsoft.com>2016-05-18 10:33:28 -0700
committerBruce Forstall <brucefo@microsoft.com>2016-05-18 10:33:28 -0700
commitce8e7e3a0d6ad3dd34a8b3487c8068e49c6b45e0 (patch)
treeaba17ec49f0ba939bc66696757f208e4bd43d4cf /tests/src/JIT/CodeGenBringUpTests/UModConst.cs
parent7d78bb285816c69f39c016950d3add07f650483e (diff)
downloadcoreclr-ce8e7e3a0d6ad3dd34a8b3487c8068e49c6b45e0.tar.gz
coreclr-ce8e7e3a0d6ad3dd34a8b3487c8068e49c6b45e0.tar.bz2
coreclr-ce8e7e3a0d6ad3dd34a8b3487c8068e49c6b45e0.zip
Rollback CS#1603899 that led to a JIT assert ngen'ing System.Windows.Forms.dll
==================== 007551: Merge pull request #1241 from mikedn/modopt Extend the DIV/MOD dividend into RDX:RAX only if needed ==================== Assert failure(PID 33656 [0x00008378], Thread: 17792 [0x4580]): Assertion failed 'addr->OperIsAddrMode() || (addr->IsCnsIntOrI() && addr->isContained()) || !addr->isContained()' in 'System.Windows.Forms.CheckedListBox:OnDrawItem(ref):this' (IL size 1216) File: e:\dd\projectk\src\ndp\clr\src\jit\emitxarch.cpp Line: 2698 Image: C:\Windows\Microsoft.NET\Framework64\v4.0.rb1605209\mscorsvw.exe The tree: ***** BB41, stmt 82 (embedded) ( 6, 8) [003723] ------------ * stmtExpr void (embedded) (IL 0x109... ???) N1045 ( 3, 2) [000115] ------------ | /--* lclVar ref V00 this u:2 REG rcx $80 N1047 ( 1, 4) [002642] ------------ | +--* const long 344 field offset Fseq[idealCheckSize] REG NA $10b N1049 ( 4, 6) [002643] -------N---- | /--* + byref REG NA $356 N1051 ( 6, 8) [000116] ----GO------ | /--* indir int REG rcx <l:$685, c:$2ef> N1053 ( 6, 8) [003669] DA--GO------ \--* st.lclVar int V172 cse1 rcx REG rcx RV During codegen: Generating BB41, stmt 71 Holding variables: [rbx rsi rdi r12-r15] Generating: N1043 ( 3, 2) [000114] ------------ * lclVar int V05 loc3 u:3 r12 (last use) REG r12 RV $31a Generating: N1045 ( 3, 2) [000115] ------------ * lclVar ref V00 this u:2 REG rcx $80 IN00db: mov rcx, gword ptr [V00 rbp+10H] GC regs: 00000040 {rsi} => 00000042 {rcx rsi} Generating: N1047 ( 1, 4) [002642] ------------ * const long 344 field offset Fseq[idealCheckSize] REG NA $10b Generating: N1049 ( 4, 6) [002643] -------N---- * + byref REG NA $356 Generating: N1051 ( 6, 8) [000116] ----GO------ * indir int REG rcx <l:$685, c:$2ef> ... assert ... (This is rollback #2: the TFS/GitHub mirror unfortunately undid rollback CS#1605814 with CS#1605840. This change should avoid that problem.) [tfs-changeset: 1605917]
Diffstat (limited to 'tests/src/JIT/CodeGenBringUpTests/UModConst.cs')
-rw-r--r--tests/src/JIT/CodeGenBringUpTests/UModConst.cs224
1 files changed, 0 insertions, 224 deletions
diff --git a/tests/src/JIT/CodeGenBringUpTests/UModConst.cs b/tests/src/JIT/CodeGenBringUpTests/UModConst.cs
deleted file mode 100644
index 06cc28d8a8..0000000000
--- a/tests/src/JIT/CodeGenBringUpTests/UModConst.cs
+++ /dev/null
@@ -1,224 +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.
-
-using System;
-using System.Runtime.CompilerServices;
-
-static class UModConst
-{
- // U4
-
- [MethodImpl(MethodImplOptions.NoInlining)]
- public static uint U4_Mod_0(uint u4)
- {
- return u4 % 0;
- }
-
- [MethodImpl(MethodImplOptions.NoInlining)]
- public static uint U4_Mod_1(uint u4)
- {
- return u4 % 1;
- }
-
- [MethodImpl(MethodImplOptions.NoInlining)]
- public static uint U4_Mod_3(uint u4)
- {
- return u4 % 3;
- }
-
- [MethodImpl(MethodImplOptions.NoInlining)]
- public static uint U4_Mod_5(uint u4)
- {
- return u4 % 5;
- }
-
- [MethodImpl(MethodImplOptions.NoInlining)]
- public static uint U4_Mod_7(uint u4)
- {
- return u4 % 7;
- }
-
- [MethodImpl(MethodImplOptions.NoInlining)]
- public static uint U4_ModPow2_16(uint u4)
- {
- return u4 % 16;
- }
-
- [MethodImpl(MethodImplOptions.NoInlining)]
- public static uint U4_ModPow2_0x80000000(uint u4)
- {
- return u4 % 0x80000000u;
- }
-
- // U8
-
- [MethodImpl(MethodImplOptions.NoInlining)]
- public static ulong U8_Mod_0(ulong u8)
- {
- return u8 % 0;
- }
-
- [MethodImpl(MethodImplOptions.NoInlining)]
- public static ulong U8_Mod_1(ulong u8)
- {
- return u8 % 1;
- }
-
- [MethodImpl(MethodImplOptions.NoInlining)]
- public static ulong U8_Mod_3(ulong u8)
- {
- return u8 % 3;
- }
-
- [MethodImpl(MethodImplOptions.NoInlining)]
- public static ulong U8_Mod_5(ulong u8)
- {
- return u8 % 5;
- }
-
- [MethodImpl(MethodImplOptions.NoInlining)]
- public static ulong U8_Mod_7(ulong u8)
- {
- return u8 % 7;
- }
-
- [MethodImpl(MethodImplOptions.NoInlining)]
- public static ulong U8_ModUncontained_I8Max(ulong u8)
- {
- return u8 % ulong.MaxValue;
- }
-
- [MethodImpl(MethodImplOptions.NoInlining)]
- public static ulong U8_ModPow2_8(ulong u8)
- {
- return u8 % 8;
- }
-
- [MethodImpl(MethodImplOptions.NoInlining)]
- public static ulong U8_ModUncontainedPow2_1Shl32(ulong u8)
- {
- return u8 % (1UL << 32);
- }
-}
-
-static class UModProgram
-{
- public static int Main()
- {
- const int Pass = 100;
- const int Fail = -1;
-
- // U4
-
- try
- {
- UModConst.U4_Mod_0(42);
- return Fail;
- }
- catch (DivideByZeroException)
- {
- }
- catch (Exception)
- {
- return Fail;
- }
-
- if (UModConst.U4_Mod_1(42) != 0)
- {
- return Fail;
- }
-
- if (UModConst.U4_Mod_3(43) != 1)
- {
- return Fail;
- }
-
- if (UModConst.U4_Mod_5(42) != 2)
- {
- return Fail;
- }
-
- if (UModConst.U4_Mod_7(43) != 1)
- {
- return Fail;
- }
-
- if (UModConst.U4_ModPow2_16(42) != 10)
- {
- return Fail;
- }
-
- if (UModConst.U4_ModPow2_0x80000000(3) != 3)
- {
- return Fail;
- }
-
- if (UModConst.U4_ModPow2_0x80000000(0x80000001u) != 1)
- {
- return Fail;
- }
-
- // U8
-
- try
- {
- UModConst.U8_Mod_0(42);
- return Fail;
- }
- catch (DivideByZeroException)
- {
- }
- catch (Exception)
- {
- return Fail;
- }
-
- if (UModConst.U8_Mod_1(42) != 0)
- {
- return Fail;
- }
-
- if (UModConst.U8_Mod_3(43) != 1)
- {
- return Fail;
- }
-
- if (UModConst.U8_Mod_5(42) != 2)
- {
- return Fail;
- }
-
- if (UModConst.U8_Mod_7(420) != 0)
- {
- return Fail;
- }
-
- if (UModConst.U8_ModUncontained_I8Max(ulong.MaxValue - 1) != ulong.MaxValue - 1)
- {
- return Fail;
- }
-
- if (UModConst.U8_ModUncontained_I8Max(ulong.MaxValue) != 0)
- {
- return Fail;
- }
-
- if (UModConst.U8_ModPow2_8(42) != 2)
- {
- return Fail;
- }
-
- if (UModConst.U8_ModPow2_8(43) != 3)
- {
- return Fail;
- }
-
- if (UModConst.U8_ModUncontainedPow2_1Shl32((1UL << 33) + 42) != 42)
- {
- return Fail;
- }
-
- return Pass;
- }
-}