-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Optimize redundant sign extensions in assertprop #111305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
So this optimization just repeats what we do in morph, but this time with help of global assertions. Diffs - no size improvements on arm64 due to fixed size encoding, but perf wise cc @dotnet/jit-contrib |
|
@EgorBo Will this enable the removal of tricks to force zero-extension like the following:
|
I would expect so |
@EgorBo Not quite: https://csharp.godbolt.org/z/fq15ch7EM |
Closes #111304
; Method Bench:Foo1(int):ulong (FullOpts) xor eax, eax - movsxd rdx, ecx + mov edx, ecx shl rdx, 60 cmp ecx, 10 cmovb rax, rdx ret -; Total bytes of code: 17 +; Total bytes of code: 16