Rollback CS#1603899 that led to a JIT assert ngen'ing System.Windows.Forms.dll
authorBruce Forstall <brucefo@microsoft.com>
Wed, 18 May 2016 17:33:28 +0000 (10:33 -0700)
committerBruce Forstall <brucefo@microsoft.com>
Wed, 18 May 2016 17:33:28 +0000 (10:33 -0700)
commitce8e7e3a0d6ad3dd34a8b3487c8068e49c6b45e0
treeaba17ec49f0ba939bc66696757f208e4bd43d4cf
parent7d78bb285816c69f39c016950d3add07f650483e
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]
16 files changed:
src/jit/codegenarm64.cpp
src/jit/codegenlinear.h
src/jit/codegenxarch.cpp
src/jit/lower.cpp
src/jit/lower.h
src/jit/lowerarm64.cpp
src/jit/lowerxarch.cpp
src/jit/morph.cpp
tests/src/JIT/CodeGenBringUpTests/DivConst.cs [deleted file]
tests/src/JIT/CodeGenBringUpTests/DivConst.csproj [deleted file]
tests/src/JIT/CodeGenBringUpTests/ModConst.cs [deleted file]
tests/src/JIT/CodeGenBringUpTests/ModConst.csproj [deleted file]
tests/src/JIT/CodeGenBringUpTests/UDivConst.cs [deleted file]
tests/src/JIT/CodeGenBringUpTests/UDivConst.csproj [deleted file]
tests/src/JIT/CodeGenBringUpTests/UModConst.cs [deleted file]
tests/src/JIT/CodeGenBringUpTests/UModConst.csproj [deleted file]