[JIT] ARM64 - Optimize `x < 0` and `x >= 0` (#83176)
authorWill Smith <lol.tihan@gmail.com>
Thu, 16 Mar 2023 23:59:39 +0000 (16:59 -0700)
committerGitHub <noreply@github.com>
Thu, 16 Mar 2023 23:59:39 +0000 (16:59 -0700)
commitc5866851402a30c90dc0ce968d895d8eee88cf66
tree16bc3c36d19fcdcfca2c9bae4ce683a823781a4a
parent5ab1c92d21697d670148e875adea5a5db2db1f64
[JIT] ARM64 - Optimize `x < 0` and `x >= 0` (#83176)

* Initial work that allows optimizing x < 0

* Few tweaks

* Optimized x < 0 and x >= 0 for conditionals

* Removed old commented code. Switched tbz and tbnz

* Simplified

* Fix build

* Check for possible interference

* Reverse

* Check invariant-range

* Cleanup

* Cleanup

* Handle new JCMP flags in gtReverseCond

* Comment update

* Remove extra flags

* Simplify further

* Fix warning

* Update src/coreclr/jit/lower.cpp

Co-authored-by: Jakob Botsch Nielsen <Jakob.botsch.nielsen@gmail.com>
* Fix warning

* Fixing assert

---------

Co-authored-by: Jakob Botsch Nielsen <Jakob.botsch.nielsen@gmail.com>
src/coreclr/jit/codegenarm64.cpp
src/coreclr/jit/gentree.cpp
src/coreclr/jit/lower.cpp