Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove some unneeded code from division morphing (#53464)
* Remove GTF_UNSIGNED check from the condition It is not necessary: GTF_UNSIGNED does not have anything to do with the operands being unsigned. Some positive diffs in runtime tests for win-x86 and one regression in System.Net.WebSockets.ManagedWebSocket.ApplyMask. The regressions is because we generate two "div"s for a long UMOD on x86 with a constant divisor, always, even for powers of two. Something to improve for sure. Naturally, no diffs for win-x64, linux-x64 or linux-arm. * Don't fold casts from constants in UMOD morphing It used to be that "ldc.i4.1 conv.i8" sequences survived importation, and since UMOD morphing is sensitive to constant divisors, morph tried to fold them. This is no longer the case, so stop doing that. Of course, morph can be called from anywhere at any point, but if some code is creating casts from constants, the proper place to fix is that code. No diffs for win-x86 or win-x64 or linux-arm. * Some code modernization Use modern helpers and move comments around.
- Loading branch information