[RyuJIT/ARM32] Assertion failed '(node->gtLsraInfo.dstCount == 0) || node->IsValue()' for all tests
With the latest commit (79c97d9d008e7ffc5208e0932c878357b3013ebd), all tests fails with a following assertion in Checked build.
FAILED - [ 0][ 4s]JIT/CodeGenBringUpTests/Add1/Add1.sh
BEGIN EXECUTION
/mnt/albireo/mywork/device/rpi3/unittests/coreoverlays/coreoverlay.test20170830.Checked.debugging/corerun Add1.exe
Assert failure(PID 21232 [0x000052f0], Thread: 21232 [0x52f0]): Assertion failed '(node->gtLsraInfo.dstCount == 0) || node->IsValue()' in 'System.String:InternalSubString(int,int):ref:this' (IL size 114)
File: /opt/code/github/hqueue/coreclr/src/jit/lower.cpp Line: 4858
Image: /mnt/albireo/mywork/device/rpi3/unittests/coreoverlays/coreoverlay.test20170830.Checked.debugging/corerun
./Add1.sh: line 243: 21232 Aborted (core dumped) $_DebuggerFullPath "$CORE_ROOT/corerun" $ExePath $CLRTestExecutionArguments
Expected: 100
Actual: 134
END EXECUTION - FAILED
Although this assertion fails, we can pass most of the test in Release build without problem except 2X tests.
Location of the assertion is just after calling m_lsra->TreeNodeInfoInit(node); at https://github.com/dotnet/coreclr/blob/master/src/jit/lower.cpp#L4855-L4858
@CarolEidt Is it a known issue ?
/cc: @dotnet/arm32-contrib
Is it a known issue ?
It is not known to me, and it is unclear to me how that commit would have caused this.
and it is unclear to me how that commit would have caused this.
@CarolEidt I just mentioned the commit to refer the latest master branch and does not mean the commit caused this assertion. I'm also investigating this.
It is related with lsra & codegen for GT_NULLCHECK.
GT_NULLCHECK is defined as GTK_NOVALUE (no target register), but only ARM32, GT_NULLCHECK use one target register.
One solution: not define GTK_NOVALUE in ARM32 only
Other solution: change codegen & lsra initialization for GT_NULLCHECK.
Or I think we can make it use an internal register instead of dst register at lsra initialiation.
It seems that the GT_NULLCHECK just tryto raise a trap using ldr.
@hseok-oh what do you think of it?
@hqueue I also think so.
I've confirmed that it works well when we set internal reg count as 1 and use this instead of target register.