[LEGACY_BACKEND] Assertion failed '(op1->gtOper != GT_CNS_INT && ...
Tests failing in Windows arm32 legacy_backend test run.
Assert failure(PID 2992 [0x00000bb0], Thread: 8784 [0x2250]): Assertion failed '(op1->gtOper != GT_CNS_INT && op1->gtOper != GT_CNS_LNG && op1->gtOper != GT_CNS_DBL) || tree->gtOverflow() || (op1->gtOper == GT_CNS_DBL && !_finite(op1->gtDblCon.gtDconVal)) || !compiler->opts.OptEnabled(CLFLG_CONSTANTFOLD)' in 'ILGEN_0xd01d9fe9:Method_0x594ff2c5(short,ubyte,char,long,int,byte,ubyte,char,int,int,int,ubyte,int,byte):int' (IL size 493)
File: e:\gh\coreclr2\src\jit\codegenlegacy.cpp Line: 10605
Image: c:\brucefo\core_root\Windows_NT.arm.Checked.2017-06-28\CoreRun.exe
Tests with failure:
JIT\Methodical\flowgraph\dev10_bug679955\volatileLocal1\volatileLocal1.cmd
JIT\Regression\CLR-x86-JIT\V1-M11-Beta1\b41129\b41129\b41129.cmd
JIT\Regression\CLR-x86-JIT\V1-M12-Beta2\b54566\b54566\b54566.cmd
JIT\Regression\CLR-x86-JIT\V1-M12-Beta2\b59782\b59782\b59782.cmd
JIT\Methodical\Overflow\FloatOvfToInt2_do\FloatOvfToInt2_do.cmd
JIT\Methodical\Overflow\FloatOvfToInt2_ro\FloatOvfToInt2_ro.cmd
There is an same issue dotnet/runtime#8219 which was reported while debugging ryujit/arm32 with legacy fallback.
I also confirm that this assertion is observed from all above six tests on Rpi3 Ubuntu.16.04-arm.
@BruceForstall Do you have history for these test ? Because we don't have history of Checked/Debug build result, it would be helpful if there is a history to determine whether this is a regression or a silent bug reside for a long time.
Do you have history for these test ?
I don't. This is the first time I've run this.
Part of JitDump
Generating BB01, stmt 4 Holding variables: [r9-r10]
( 10, 12) [000031] ------------- * STMT void (IL 0x029...0x035)
N005 ( 10, 12) [000030] ------------- \--* JTRUE void
N003 ( 1, 1) [000028] ------------- | /--* CNS_INT int 6 $45
N004 ( 8, 10) [000029] N------N-US-- \--* NE int $301
N002 ( 6, 8) [000026] ------------- \--* CAST int <- uint <- double $300
N001 ( 3, 4) [000025] ------------- \--* CNS_DBL double -1.5580955380790166e+37 $2c0
Execution Order:
N001 ( 3, 4) [000025] ------------- * CNS_DBL double -1.5580955380790166e+37 $2c0
N002 ( 6, 8) [000026] ------------- * CAST int <- uint <- double $300
N003 ( 1, 1) [000028] ------------- * CNS_INT int 6 $45
N004 ( 8, 10) [000029] N------N-US-- * NE int $301
N005 ( 10, 12) [000030] ------------- * JTRUE void
Assert failure(PID 23111 [0x00005a47], Thread: 23111 [0x5a47]): Assertion failed '(op1->gtOper != GT_CNS_INT && op1->gtOper != GT_CNS_LNG && op1->gtOper != GT_CNS_DBL) || tree->gtOverflow() || (op1->gtOper == GT_CNS_DBL && !_finite(op1->gtDblCon.gtDconVal)) || !compiler->opts.OptEnabled(CLFLG_CONSTANTFOLD)' in 'ILGEN_0x7971e09f:Method_0xd939d2c1(int,int):int' (IL size 210)
File: /opt/code/work/src/jit/codegenlegacy.cpp Line: 10618
Image: /work/nfs/dotnet/arm/coreoverlay/corerun
Part of Backtrace
dotnet/coreclr#12 0x702cfedc in noWayAssertBodyConditional (
cond=0x705a4c84 "(op1->gtOper != GT_CNS_INT && op1->gtOper != GT_CNS_LNG && op1->gtOper != GT_CNS_DBL) || tree->gtOverflow() || (op1->gtOper == GT_CNS_DBL && !_finite(op1->gtDblCon.gtDconVal)) || !compiler->opts.OptEn"...,
file=0x705a2d53 "/opt/code/work/src/jit/codegenlegacy.cpp", line=10618) at /opt/code/work/src/jit/error.cpp:517
dotnet/coreclr#13 0x704232ce in CodeGen::genCodeForNumericCast (this=0x88cbc, tree=0x8b294, destReg=22527, bestReg=0)
at /opt/code/work/src/jit/codegenlegacy.cpp:10616
dotnet/coreclr#14 0x70420f48 in CodeGen::genCodeForTreeSmpOp (this=0x88cbc, tree=0x8b294, destReg=22527, bestReg=0)
at /opt/code/work/src/jit/codegenlegacy.cpp:9916
dotnet/coreclr#15 0x7040c2ca in CodeGen::genCodeForTree (this=0x88cbc, tree=0x8b294, destReg=22527, bestReg=0)
at /opt/code/work/src/jit/codegenlegacy.cpp:12373
dotnet/coreclr#16 0x70413ac0 in CodeGen::genMakeAddressable2 (this=0x88cbc, tree=0x8b294, needReg=0, keepReg=RegSet::KEEP_REG, forLoadStore=false,
smallOK=true, deferOK=false, evalSideEffs=false) at /opt/code/work/src/jit/codegenlegacy.cpp:2501
dotnet/coreclr#17 0x704139ee in CodeGen::genMakeRvalueAddressable (this=0x88cbc, tree=0x8b294, needReg=0, keepReg=RegSet::KEEP_REG, forLoadStore=false,
smallOK=true) at /opt/code/work/src/jit/codegenlegacy.cpp:2047