Update the JIT to track `Span.Length` and `ReadOnlySpan.Length` as "never negative...
authorTanner Gooding <tagoo@outlook.com>
Thu, 26 Jan 2023 01:24:09 +0000 (17:24 -0800)
committerGitHub <noreply@github.com>
Thu, 26 Jan 2023 01:24:09 +0000 (17:24 -0800)
commitf54716dabfd90610a8dedb0e6abdc68e20d48916
treebc4352dc480235b260d0a9ee75321d8d6bbae155
parentc156b6406a7c7cb92abc01e23ace0f2f24e8d85d
Update the JIT to track `Span.Length` and `ReadOnlySpan.Length` as "never negative" (#81055)

* Update the JIT to track `Span.Length` and `ReadOnlySpan.Length` as "never negative"

* Updating the "is never negative" info to be tracked in LclVarDsc

* Apply formatting patch

* Ensure lvIsNeverNegative is propagated to shadows

* Update src/coreclr/jit/gentree.h

Co-authored-by: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com>
* Responding to PR feedback

* Adding two asserts

* Rename GenTreeField::IsNeverNegative to IsSpanLength and add a comment

* Fix an assert

Co-authored-by: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com>
src/coreclr/jit/assertionprop.cpp
src/coreclr/jit/compiler.h
src/coreclr/jit/gentree.cpp
src/coreclr/jit/gentree.h
src/coreclr/jit/gschecks.cpp
src/coreclr/jit/importercalls.cpp
src/coreclr/jit/lclmorph.cpp