Faster unsigned division by constants (#49585)
authorPent Ploompuu <kaalikas@gmail.com>
Tue, 18 May 2021 03:06:50 +0000 (06:06 +0300)
committerGitHub <noreply@github.com>
Tue, 18 May 2021 03:06:50 +0000 (03:06 +0000)
commite4b4807e2fae2164d9116fbcdd49ba9044461e7e
tree560566356723e2e9858253a4c5b9f29c72282dea
parent63ea9c6b962c9f7df635220b7bdf102911b9d336
Faster unsigned division by constants (#49585)

* Faster unsigned division by constants

* Fix Arm build and add some tests.

* Improve register allocation

* Fix ARM64 codegen

* Fix MULHI flags

* Remove ARM32 codegen

* Widen 32bit UDIV to 64bit MULHI when possible. Improve register allocation.

* Always widen 32bit UDIV to 64bit MUL/MULHI

* Cleanup

* Final optimization

* Fix typo
15 files changed:
THIRD-PARTY-NOTICES.TXT
src/coreclr/jit/assertionprop.cpp
src/coreclr/jit/codegen.h
src/coreclr/jit/codegenarm64.cpp
src/coreclr/jit/codegenarmarch.cpp
src/coreclr/jit/codegenxarch.cpp
src/coreclr/jit/compiler.h
src/coreclr/jit/compiler.hpp
src/coreclr/jit/gentree.cpp
src/coreclr/jit/gtlist.h
src/coreclr/jit/lower.cpp
src/coreclr/jit/utils.cpp
src/coreclr/jit/utils.h
src/tests/JIT/Math/Functions/DivideByConst.cs [new file with mode: 0644]
src/tests/JIT/Math/Functions/Program.cs